On Thu, 28 Dec 2000, Marcelo Tosatti wrote:
>
> If we call mark_buffer_dirty() on an already dirty buffer, we may sleep
> waiting for bdflush even if we haven't caused _any_ real disk IO (because
> the buffer was already dirty anyway).
>
> I think it makes more sense if we only call balance_dirty if we actually
> caused real disk IO.
>
> Would you accept a patch to change that situation by making
> __mark_buffer_dirty return the old dirty bit value and make
> mark_buffer_dirty only sleep on bdflush if we dirtied a clean buffer?
I would actually prefer not having the balance_dirty() in
mark_buffer_dirty() at all, and then just potentially adding an explicit
balance_dirty to strategic places. There would probably not be that many
of those strategic places.
As it stands, this is a bit too subtle for my taste, having people who
sleep without really realizing it, and not necessarily really wanting to
(not for correctness issues, but for latency issues - that superblock lock
can be quite nasty)
Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/