Re: [PATCH 1/3] block_write_full_page: Use synchronous writes for WBC_SYNC_ALL writebacks

Andrew Morton
2009-04-07T06:55:00Z

On Mon, 6 Apr 2009 23:21:41 -0700 Andrew Morton <akpm@linux-foundation.org> wrote:

> I mean, let's graph it:
>
> WRITE_SYNC -> WRITE_SYNC_PLUG -> BIO_RW_SYNCIO -> bio_sync() -> REQ_RW_SYNC -> rw_is_sync() -> does something mysterious in get_request()
> -> rq_is_sync() -> does something mysterious in IO schedulers
> -> BIO_RW_NOIDLE -> bio_noidle() -> REQ_NOIDLE -> rq_noidle() -> does something mysterious in cfq-iosched only
> -> BIO_RW_UNPLUG -> bio_unplug() -> REQ_UNPLUG -> OK, the cognoscenti know what this is supposed to do, but it is unused!

whoop, I found a use of bio_unplug() in __make_request().

So it appears that the intent of your patch is to cause an unplug after
submission of each WB_SYNC_ALL block?

But what about all the other stuff which WRITE_SYNC might or might not
do? What does WRITE_SYNC _actually_ do, and what are the actual
effects of this change??

And what effect will this large stream of unplugs have upon merging?