On Tue, 15 Jun 2010 13:20:34 +1000 Dave Chinner <david@fromorbit.com> wrote:
Yes you can. That's exactly what you're recommending! Only you're
recommending doing it at the wrong level. The fs-writeback radix-tree
walks do it at the wrong level too. Sorting should be done within, or
in a layer above the block queues, not within the large number of
individual callers.
Nope. Large-number-of-small-files is a pretty common case. If the fs
doesn't handle that well (ie: by placing them nearby on disk), it's
borked.
We can, but it shouldn't be specific to page reclaim. Other places
submit IO too, and want the same treatment.
The only difference is that pages which are in the queue (current
implementation thereof) can't be shot down by truncate.
mm, a little bit still, I guess. Mainly because dirty memory
management isn't zone aware, so even though we limit dirty memory
globally, a particular zone(set) can get excessively dirtied.
Most of this problem happen on the balance_dirty_pages() path, where we
already sort the pages in ascending logical order.
It's a hack and a workaround. And I suspect it won't make any
difference, especially given Mel's measurements of the number of dirty
pages he's seeing coming off the LRU. Although those numbers may well
be due to the new quite-low dirty memory thresholds.
It would be interesting to code up a little test patch though, see if
there's benefit to be had going down this path.
--