public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC 0/5] dio: clean up completion phase of direct_io_worker()
@ 2006-09-05 23:57 Zach Brown
  2006-09-05 23:57 ` [RFC 1/5] dio: centralize completion in dio_complete() Zach Brown
                   ` (7 more replies)
  0 siblings, 8 replies; 35+ messages in thread
From: Zach Brown @ 2006-09-05 23:57 UTC (permalink / raw)
  To: linux-fsdevel, linux-aio, linux-kernel

dio: clean up completion phase of direct_io_worker()

There have been a lot of bugs recently due to the way direct_io_worker() tries
to decide how to finish direct IO operations.  In the worst examples it has
failed to call aio_complete() at all (hang) or called it too many times (oops).

This set of patches cleans up the completion phase with the goal of removing
the complexity that lead to these bugs.  We end up with one path that
calculates the result of the operation after all off the bios have completed.
We decide when to generate a result of the operation using that path based on
the final release of a refcount on the dio structure.

I tried to progress towards the final state in steps that were relatively easy
to understand.  Each step should compile but I only tested the final result of
having all the patches applied.

The patches result in a slight net decrease in code and binary size:

 2.6.18-rc4-dio-cleanup/fs/direct-io.c |    8
 2.6.18-rc5-dio-cleanup/fs/direct-io.c |   94 +++++------
 2.6.18-rc5-dio-cleanup/mm/filemap.c   |    4
 fs/direct-io.c                        |  273 ++++++++++++++--------------------
 4 files changed, 159 insertions(+), 220 deletions(-)

   text    data     bss     dec     hex filename
2592385  450996  210296 3253677  31a5ad vmlinux.before
2592113  450980  210296 3253389  31a48d vmlinux.after

The patches pass light testing with aio-stress, the direct IO tests I could
manage to get running in LTP, and some home-brew functional tests.  It's still
making its way through stress testing.  It should not be merged until we hear
from that more rigorous testing, I don't think.

I hoped to get some feedback (and maybe volunteers for testing!) by sending the
patches out before waiting for the stress tests.

- z

^ permalink raw reply	[flat|nested] 35+ messages in thread
* Re: bogofilter ate 3/5
@ 2006-09-06  5:37 Rick Ellis
  2006-09-06 18:00 ` Willy Tarreau
  0 siblings, 1 reply; 35+ messages in thread
From: Rick Ellis @ 2006-09-06  5:37 UTC (permalink / raw)
  To: linux-kernel

On Wed, 6 Sep 2006 07:00:44 +0200 Willy Tarreau wrote:

> spam has never been a real problem for me on LKML

I spend a lot of time deleting spam from the mailing lists I
archive. The kernel list gets a lot of spam--it's just not
as obvious as it is on some lists because of the large amount
of legit traffic. Some of the slower lists get nothing but
spam for weeks at a time.

While bogofilter may not be the answer, doing something may
be quite desirable.

--
http://www.spinics.net/lists/kernel/

^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2006-09-08 22:16 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-05 23:57 [RFC 0/5] dio: clean up completion phase of direct_io_worker() Zach Brown
2006-09-05 23:57 ` [RFC 1/5] dio: centralize completion in dio_complete() Zach Brown
2006-09-05 23:57 ` [RFC 2/5] dio: call blk_run_address_space() once per op Zach Brown
2006-09-05 23:57 ` [RFC 3/5] dio: formalize bio counters as a dio reference count Zach Brown
2006-09-05 23:57 ` [RFC 4/5] dio: remove duplicate bio wait code Zach Brown
2006-09-05 23:57 ` [RFC 5/5] dio: only call aio_complete() after returning -EIOCBQUEUED Zach Brown
2006-09-06  4:35 ` bogofilter ate 3/5 Zach Brown
2006-09-06  5:00   ` Willy Tarreau
2006-09-06  7:22   ` Mike Galbraith
2006-09-08 22:16   ` Matthias Andree
2006-09-06  7:36 ` [RFC 0/5] dio: clean up completion phase of direct_io_worker() Suparna Bhattacharya
2006-09-06 16:36   ` Zach Brown
2006-09-06 14:57 ` Jeff Moyer
2006-09-06 16:46   ` Zach Brown
2006-09-06 18:13     ` Jeff Moyer
  -- strict thread matches above, loose matches on Subject: below --
2006-09-06  5:37 bogofilter ate 3/5 Rick Ellis
2006-09-06 18:00 ` Willy Tarreau
2006-09-06 18:04   ` Willy Tarreau
2006-09-06 18:56   ` ellis
2006-09-06 19:15     ` Chase Venters
2006-09-06 20:56       ` Krzysztof Halasa
2006-09-06 22:05         ` Chase Venters
2006-09-07 11:55           ` Krzysztof Halasa
2006-09-07 13:46             ` Chase Venters
2006-09-07 22:33               ` Krzysztof Halasa
2006-09-07 22:37                 ` Chase Venters
2006-09-07 22:58                   ` Krzysztof Halasa
2006-09-07 23:02                     ` Matti Aarnio
2006-09-07 13:58           ` Stuart MacDonald
2006-09-07 14:27             ` Chase Venters
2006-09-07 17:35               ` Stuart MacDonald
2006-09-07 18:25                 ` Chase Venters
2006-09-07 21:05                   ` Stuart MacDonald
2006-09-07  9:52       ` Matti Aarnio
2006-09-06 20:13     ` Willy Tarreau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox