Re: Possible Idea with filesystem buffering.

Chris Mason
2002-01-22T14:04:52Z

On Monday, January 21, 2002 11:02:49 PM -0700 Andreas Dilger
<adilger@turbolabs.com> wrote:

[ snip ]

It seems like the basic features we are suggesting are very close, I'll try
one last time to make a case against the 'free_some_pages' call ;-)

>
> The VM can make better _specific_ judgements when it needs to (e.g. free
> a DMA page or another specific page to allow a larger contiguous chunk of
> memory to be allocated), but in the cases where it just wants _some_
> page(s) to be freed, it should allow the FS to decide which one(s), if it
> cares.

I'd rather see the VM trigger a flush on a specific page, but tell the FS
it's OK to do broader actions if it wants to. In the case of write
throttling, the FS doesn't know which page has been dirty the longest,
unless it starts maintaining its own lists. The VM has all that
information, so it kicks the throttle or periodic write off with one
buffer, and lets the FS trigger other events because we aren't under huge
memory load.

The FS doesn't know how long a page has been dirty, or how often it gets
used, or anything other than this page is pinned and waiting for X event to
take place. If we really can't get this info to the VM in a useful
fashion, that's one thing. But if we can clue the VM in a little and put
the decision making there, I think the end result will be more likely to
clean the right page. That does affect performance even when we're not
under heavy memory pressure.

-chris