Messages in this thread | | | Date | Fri, 13 Sep 2002 12:34:36 -0700 | From | Andrew Morton <> | Subject | Re: [PATCH] 2.5 port of aio-20020619 for raw devices |
| |
Jens Axboe wrote: > > ... > alloc_bio non-blocking can be done by caller himself, submit_bio > non-blocking can be assured with BIO_RW_AHEAD.
I haven't really found that to be usable - by the time you've called submit_bio() it's just waaaay too late to back out and undo everything. Mark pages dirty again, unlock them, clear the writeback bits, tell the caller that we really didn't write these many pages, tell the caller that things aren't working out, stop sending us pages, etc.
It's made harder by the fact that submit_bio() always returns "1". So you need to work out what happened in the bi_end_io() handler and pass all that back again. And somehow work out whether it was a failed WRITEA and not an IO error...
That's why I added the ability to ask "is this mapping's queue congested". It is much simpler to use and test from the perspective of the upper layers.
It has the disadvantage that we may have some data which is mergeable, and would in fact nonblockingly fit into a "congested" queue. Don't know if that makes a lot of difference in practice.
But there are some more things we can do to improve IO scheduling from the top layer. The most prominent of these is to write back the blockdev mapping's dirty pages in pgoff_t order (ie: LBA order) rather than in chronological mapping->dirty_pages order. That's happening, slowly, but involves significant surgery on radix_tree_brains. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |