|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] poor domU VBD performance.
On Thu, Mar 31 2005, Keir Fraser wrote:
> >What I was getting at was that the backend will split requests
> >up and issue each physical segment as a separate bio (at least in
> >the 2.0.5 tree I have in front of me). And that none of these
> >physical segments was more that 1 page.
> >
> >So the request merging in the back end OS is important, no?
>
> Ah, this reminds me I have one more question for Jens.
>
> Since all the bio's that I queue up in a single invocation of
> dispatch_rw_block_io() will actually be adjacent to each other (because
> they're all from the same scatter-gather list) can I actually do
> something like (very roughly):
>
> bio = bio_alloc(GFP_KERNEL, nr_psegs);
> for ( i = 0; i < nr_psegs; i++ )
> bio_add_page(bio, blah...);
> submit_bio(operation, bio);
>
> Each of the biovecs that I queue may not be a full page in size (but
> won't straddle a page boundary of course).
Yes, this is precisely what you should do, the current method is pretty
suboptimal. Basically allocate a bio with nr_psegs, and call
bio_add_page() for each page until it returns _less_ than the number of
bytes you requested. When it does that, submit that bio for io and
allocate a new bio with nr_psegs-submitted_segs bio_vecs attached.
Continue until you are done.
--
Jens Axboe
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|