Re: Best way to extend try_to_free_pages()?

From: Stephen C. Tweedie (sct@redhat.com)
Date: Wed May 17 2000 - 03:08:39 EST


Hi,

On Tue, May 16, 2000 at 09:51:17PM -0400, frankeh@us.ibm.com wrote:

> I assume everything could register as a first class citizen, including file
> cache, etc.....
> Some thoughts along the line.
> Would it make sense to priorities such <kernel-memory-clients>.
> Wouldn't it make sense to specify the number of pages as part of the
> interface?
> Do you assume fairness among memory clients based on the cyclic queue if
> priorities is not desirable.

Chris Mason and I have already been looking at doing something
similar, but on a per-page basis, to allow advanced filesystems to
release memory in a controlled manner. This is particularly
necessary for journaled filesystems, in which releasing certain
data may require a transaction commit --- until the commit, there
is just no way shrink_mmap() will be able to free those pages, so
there has to be a way for shrink_mmap() to let the filesystem know
that it wants some memory back.

The route we'll probably go for this is through address_space_operations
callbacks from shrink_mmap. That allows proper fairness --- all fses
can share the same lru that way.

--Stephen

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue May 23 2000 - 21:00:12 EST