WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Re: questions about the block backend/frontend driver

To: "Konrad Rzeszutek" <konrad@xxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Re: questions about the block backend/frontend driver
From: "Yuming fang" <fangyuming.leo@xxxxxxxxx>
Date: Thu, 11 Sep 2008 14:35:56 +0800
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 10 Sep 2008 23:36:20 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type:references; bh=Tkl8xaMhS9/05Ql27DhbTdQjFyY2YVNK+BP4KCYEV2s=; b=MdIadOBq5uSaMT7jJCY8Glr5uqTOSIO/WR+/D6jDqlGV0UToRv7d2FQnKiAD+3Y2Mu +fGQDuRWeWo99mqWoZv1PddP417UMuP2N40e/wlvUiKUAO0uEqi4FeVE/BfYW6F8J7pN xKhcCTAozdNxOY0uUGFMHN53xOr43zbkIrxGk=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=ttiNJIgwYFW2ZIT2VE/hZmMlOgHe1ZFvWhTB1EK63sZPMTB8CQi/D9oMlCtXhN4Dpw fu5aXF3nLN4yc/qVqU7OfPsxplVhEprmiY1VSbdLzVZUb1wVSIvwwWItwj1eHtkmYJg1 +VT32s/rivaHeR+CieXzSjP5N0EYlujbnA7E0=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20080909142613.GA5223@xxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <411dc87e0809080005m1aa6d9c0pffa94be36277bf70@xxxxxxxxxxxxxx> <411dc87e0809090543s2b5066ddudd6346481c02c63c@xxxxxxxxxxxxxx> <20080909142613.GA5223@xxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
 
Thank you very much for your reply.
2008/9/9 Konrad Rzeszutek <konrad@xxxxxxxxxxxxxxx>
On Tue, Sep 09, 2008 at 08:43:07PM +0800, Yuming fang wrote:
> Nobody answer these questions? I want to know if I could implement the I/O
> disk scheduling in Xen and then I could not modify the corresponding
> code(I/O Scheduling algorithms) of Linux Kernel?

I would recommend you get 'blktrace' programs and run them under Dom0 to
get a practical answer to your question.
 
 
I run the blktrace programs and could get the detailed information of disk I/O read/write requests. However, the blktrace is a tool which provides detailed information about request queue operations to the user space.
 


>
> Yuming
>
> 2008/9/8 Yuming fang <fangyuming.leo@xxxxxxxxx>
>
> >  Hi, Everyone,
> >
> > I am trying to understand the code of the block backend/frontend driver. I
> > konw the blkback and blkfront communicate with each other through event
> > channel and buffer ring. But there are some questions I could not
> > understand.
> >
> > 1. When dom0 receive one disk request from domU1 and another disk request
> > from domU2 simultaneously, how these two disk requests are pushed into Linux
> > Kernel I/O Scheduler? How the Xen sort them before pushing them into the
> > Linux Kernel I/O Scheduler?

That depends on which elevator you have. Xen does not sort them, just issues
a bio request.
 
 
 
Yeah, after your explanation, I read the code of blkback.c and understand some about it. In the Xen3.3 version, I find there is a \linux-2.6.18-xen-3.3.0\block\ directory, which includes the elevator.c, Linux I/O Scheduling algorithm files(cfq-iosched.c, deadline-iosched.c and so on).  Do these files decide the disk I/O Scheduling Algorithm of the Linux-xen0? And if I want to add a different disk I/O Scheduling algorithm in Xen3.3, could I add it in this directory(linux-2.6.18-xen-3.3.0\linux-2.6.18-xen-3.3.0\block\)?
 
 

> >
> > 2. Is there a disk request queue in the Xen to hold these disk requests, so
> > that the Xen could only push the disk requests in the queue into the linux
> > kernel I/O Scheduler?

No. It uses the block devices queue to submit requests,
 
 
 
I think it uses the functions of unplug_queue(blkif_t *blkif) and plug_queue(blkif_t *blkif, struct bio *bio)  (in \linux-2.6.18-xen-3.3.0\drivers\xen\blkback\blkback,.c) to process the requests. Is my explanation right?
 
 
Thanks
Yuming

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>