From: Keir Fraser Subject: Re: [patch 0/6] xenblk: Add O_DIRECT and O_SYNC support. Date: Wed, 05 Nov 2008 13:52:13 +0000 Message-ID: References: <20081105133342.GM21867@kernel.dk> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20081105133342.GM21867@kernel.dk> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jens Axboe Cc: Xen-devel@lists.xensource.com, kurt.hackel@oracle.com, shinya.narahara@oracle.com, Joe Jin , greg.marsden@oracle.com, wen.gang.wang@oracle.com List-Id: xen-devel@lists.xenproject.org On 5/11/08 13:33, "Jens Axboe" wrote: > If you only complete the request once you get a completion in, then > there's no issue. I thought it did queuing, serves me well for not > actually having the code handy to look at... There's still some merit to > Joe's patch, he should have split #2 into two pieces - some of it is > actually a real bug fix (you must not do bio_alloc() without having > submitted the previous bio you allocated, and you should use a private > bioset if you stack). This much is at least visible from just looking at > the patch! blkfront can queue multiple requests to blkback, each of which is a scatter-gather list. Each request is turned into one or more bios by blkback, and each is individually submit_bio()ed. When ->bi_end_io(0) is called for all bios corresponding to a request, only then is a response queued for collection by blkfront. I wasn't aware of limitations on number of times you can call bio_alloc(). Perhaps we should arrange to submit_bio() more eagerly, rather than batching up (we plug the queue previously, so there's no need to batch up submit_bio() calls for scheduling purposes). Would that be better than a bioset, or is a bioset easier do you think? > Does blkback propagate unplug events downwards? Not sure what that means. blkback does its own limited queue plugging to try to develop usefully schedulable batches of I/O. There's no concept of plugging across the blkfront/blkback interface. -- Keir