From: Jens Axboe <jens.axboe@oracle.com>
To: Nate Diller <nate.diller@gmail.com>
Cc: "Chen, Kenneth W" <kenneth.w.chen@intel.com>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [patch] speed up single bio_vec allocation
Date: Fri, 8 Dec 2006 09:01:19 +0100 [thread overview]
Message-ID: <20061208080118.GD23887@kernel.dk> (raw)
In-Reply-To: <5c49b0ed0612071433o3a77be20h9b19326bf6a70281@mail.gmail.com>
On Thu, Dec 07 2006, Nate Diller wrote:
> On 12/7/06, Chen, Kenneth W <kenneth.w.chen@intel.com> wrote:
> >Nate Diller wrote on Thursday, December 07, 2006 1:46 PM
> >> the current code is straightforward and obviously correct. you want
> >> to make the alloc/dealloc paths more complex, by special-casing for an
> >> arbitrary limit of "small" I/O, AFAICT. of *course* you can expect
> >> less overhead when you're doing one large I/O vs. two small ones,
> >> that's the whole reason we have all this code to try to coalesce
> >> contiguous I/O, do readahead, swap page clustering, etc. we *want*
> >> more complexity if it will get us bigger I/Os. I don't see why we
> >> want more complexity to reduce the *inherent* penalty of doing smaller
> >> ones.
> >
> >You should check out the latest proposal from Jens Axboe which treats
> >all biovec size the same and stuff it along with struct bio. I think
> >it is a better approach than my first cut of special casing 1 segment
> >biovec. His patch will speed up all sized I/O.
>
> i rather agree with his reservations on that, since we'd be making the
> allocator's job harder by requesting order 1 pages for all allocations
> on x86_64 large I/O patterns. but it reduces complexity instead of
> increasing it ... can you produce some benchmarks not just for your
> workload but for one that triggers the order 1 case? biovec-(256)
> transfers are more common than you seem to think, and if the allocator
> can't do it, that forces the bio code to fall back to 2 x biovec-128,
> which, as you indicated above, would show a real penalty.
The question is if the slab allocator is only doing 2^0 order
allocations for the 256-page bio_vec currently - it's at 4096 bytes, so
potentially (I suspect) the worst size it could be.
On the 1 vs many page bio_vec patterns, I agree with Nate. I do see lots
of larger bio_vecs here. > 1 page bio_vec usage is also becoming more
prevalent, not less. So optimizing for a benchmark case that
predominately uses 1 page bio's is indeed a silly thing.
--
Jens Axboe
next prev parent reply other threads:[~2006-12-08 8:00 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-04 19:27 [patch] speed up single bio_vec allocation Chen, Kenneth W
2006-12-04 20:06 ` Jens Axboe
2006-12-04 20:36 ` Chen, Kenneth W
2006-12-04 20:43 ` Jens Axboe
2006-12-06 10:08 ` Jens Axboe
2006-12-06 10:56 ` Jens Axboe
2006-12-06 18:19 ` Chen, Kenneth W
2006-12-07 19:22 ` Nate Diller
2006-12-07 19:36 ` Chen, Kenneth W
2006-12-07 21:46 ` Nate Diller
2006-12-07 21:52 ` Chen, Kenneth W
2006-12-07 22:33 ` Nate Diller
2006-12-08 8:01 ` Jens Axboe [this message]
2006-12-08 2:27 ` Andi Kleen
2006-12-08 4:23 ` Chen, Kenneth W
2006-12-08 4:37 ` Andi Kleen
-- strict thread matches above, loose matches on Subject: below --
2006-12-08 22:14 Chen, Kenneth W
2006-12-14 20:23 ` Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061208080118.GD23887@kernel.dk \
--to=jens.axboe@oracle.com \
--cc=kenneth.w.chen@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nate.diller@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.