From: Neil Schemenauer <nascheme@enme.ucalgary.ca>
To: "Juan J. Quintela" <quintela@fi.udc.es>
Cc: linux-mm@kvack.org, linux-fsdevel@vger.rutgers.edu,
lkml <linux-kernel@vger.rutgers.edu>
Subject: VM callbacks and VM design
Date: Wed, 7 Jun 2000 18:07:37 -0600 [thread overview]
Message-ID: <20000607180737.A5943@acs.ucalgary.ca> (raw)
In-Reply-To: <yttem69ccax.fsf@serpe.mitica>; from quintela@fi.udc.es on Thu, Jun 08, 2000 at 01:16:06AM +0200
On Thu, Jun 08, 2000 at 01:16:06AM +0200, Juan J. Quintela wrote:
> After I have been chatting with Ben LaHaise, he has suggested, instead
> of using especial code for NFS pages and block pages to change/add a
> new function to address_operations to do the swapout in
> try_to_swap_pages and the writepage in shrink_mmap.
I believe that is exactly what David's anon patch does. The
function is called try_to_free_page. Personally, I think it is a
great idea.
IMHO, the long term goal should be to futher unify the Linux VM
system. Here is my (possibly misinformed) take on the issue:
The resource being managed the the VM system is physical pages.
When this resource becomes scarce, pressure must be placed on the
users of these pages. Pages which well not be needed in the near
future should be the ones to be freed.
In order to decide which pages are good candidates for freeing
the temporal locality heuristic should be used (ie. pages needed
recently will also be needed in the near future). Note that this
is different that "most often used". I think Rik's latest aging
patch is slightly wrong in this regard.
The users who have lots of physical pages in memory will feel the
most pressure. If they are actively using these pages the
pressure will be reduced. LRU (or some variant to eliminate
pathological worst case behavior) should be the unified heuristic
to determine which pages should be freed. This will provide good
performance and balance to the system.
Creating a bunch of distinct caches and trying to balance them is
the wrong solution.
Unfortunately with the current design we do not have a relation
from physical pages to users of those pages (at least not for all
types of pages). David's anon patch fixes this for anonymous
pages. With this change the memory management code becomes much
simpler. A similar approach should be taken with the SHM code.
Unfortunately these kinds of changes are too radical to make
during the so called code freeze so we will have to wait until
2.5. I look forward to getting my hands dirty and providing some
help in this effort.
Thanks for the patch Juan.
Neil
--
"Everyone can be taught to sculpt: Michelangelo would have had to
be taught how not to. So it is with the great programmers" -- Alan Perlis
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/
next prev parent reply other threads:[~2000-06-08 0:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-06-07 23:16 PATCH: deferred writes of mmaped pages [WIP] (1st try) Juan J. Quintela
2000-06-08 0:07 ` Neil Schemenauer [this message]
2000-06-11 22:16 ` VM callbacks and VM design John Fremlin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20000607180737.A5943@acs.ucalgary.ca \
--to=nascheme@enme.ucalgary.ca \
--cc=linux-fsdevel@vger.rutgers.edu \
--cc=linux-kernel@vger.rutgers.edu \
--cc=linux-mm@kvack.org \
--cc=quintela@fi.udc.es \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox