[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAAK6Zt2nkBX5ak=p-hAj4=UHiGd6WXRgeFYntAeWV++iaaGN4w@mail.gmail.com>
Date: Thu, 22 Sep 2011 17:33:29 -0700
From: Daniel Ehrenberg <dehrenberg@...gle.com>
To: Jeff Moyer <jmoyer@...hat.com>
Cc: linux-kernel@...r.kernel.org, linux-aio@...ck.org,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [patch, v3] aio: allocate kiocbs in batches
On Thu, Sep 22, 2011 at 9:41 AM, Jeff Moyer <jmoyer@...hat.com> wrote:
> Hi,
>
> In testing aio on a fast storage device, I found that the context lock
> takes up a fair amount of cpu time in the I/O submission path. The
> reason is that we take it for every I/O submitted (see __aio_get_req).
> Since we know how many I/Os are passed to io_submit, we can preallocate
> the kiocbs in batches, reducing the number of times we take and release
> the lock. In my testing, I was able to reduce the amount of time spent
> in _raw_spin_lock_irq by .56% (average of 3 runs). The command I used
> to test this was:
> aio-stress -O -o 2 -o 3 -r 8 -d 128 -b 32 -i 32 -s 16384 <dev>
>
> I also tested the patch with various numbers of events passed to
> io_submit, and I ran the xfstests aio group of tests to ensure I didn't
> break anything.
>
This patch looks great! It produces a significant speedup on a
benchmark I care about.
I have been looking into improving the efficiency of io_submit, and I
believe there is still more work that can be done.
Dan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists