From: Suparna Bhattacharya <suparna@in.ibm.com>
To: Zach Brown <zach.brown@oracle.com>
Cc: linux-fsdevel@vger.kernel.org, linux-aio@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [RFC 0/5] dio: clean up completion phase of direct_io_worker()
Date: Wed, 6 Sep 2006 13:06:43 +0530 [thread overview]
Message-ID: <20060906073643.GA27784@in.ibm.com> (raw)
In-Reply-To: <20060905235732.29630.3950.sendpatchset@tetsuo.zabbo.net>
On Tue, Sep 05, 2006 at 04:57:32PM -0700, Zach Brown wrote:
> 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.
Very nice piece of work ! Thanks for taking this up :)
I have looked through all the patches and the completion path unification
logic looks sound to me (btw, the explanations and comments are very good too).
Not the usual bandaids that we often end up with, but a real cleanup that
should go some way in making at least the most errorprone part of the DIO
code more maintainable (I hope/wish we could also do something similar with
simplifying the locking as well).
Of course with this code, we have to await rigorous testing
... and more reviews, but please consider this as my ack for the approach.
Regards
Suparna
>
> 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
>
> --
> To unsubscribe, send a message with 'unsubscribe linux-aio' in
> the body to majordomo@kvack.org. For more info on Linux AIO,
> see: http://www.kvack.org/aio/
> Don't email: <a href=mailto:"aart@kvack.org">aart@kvack.org</a>
--
Suparna Bhattacharya (suparna@in.ibm.com)
Linux Technology Center
IBM Software Lab, India
next prev parent reply other threads:[~2006-09-06 7:35 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Suparna Bhattacharya [this message]
2006-09-06 16:36 ` [RFC 0/5] dio: clean up completion phase of direct_io_worker() 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-21 12:24 Veerendra Chandrappa
[not found] <OFBE544A3C.7C1B2C64-ON652571F0.003C21B6-652571F0.003C2DF3@in.ibm.com>
2006-09-21 18:38 ` Zach Brown
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=20060906073643.GA27784@in.ibm.com \
--to=suparna@in.ibm.com \
--cc=linux-aio@kvack.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=zach.brown@oracle.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).