linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Benjamin C.R. LaHaise" <blah@kvack.org>
To: Rik van Riel <H.H.vanRiel@fys.ruu.nl>
Cc: "Albert D. Cahalan" <acahalan@cs.uml.edu>, linux-mm <linux-mm@kvack.org>
Subject: Re: how mm could work
Date: Wed, 10 Dec 1997 13:38:49 -0500 (EST)	[thread overview]
Message-ID: <Pine.LNX.3.95.971210131331.5452B-100000@as200.spellcast.com> (raw)
In-Reply-To: <Pine.LNX.3.91.971210124512.7823D-100000@mirkwood.dummy.home>

On Wed, 10 Dec 1997, Rik van Riel wrote:

> On Wed, 10 Dec 1997, Albert D. Cahalan wrote:

> [ the quoted part is from a _forwarded_ message, not from Albert!!!]
> 
> > FreeBSD's paging system is both simple and complex.  The basic premis,
> > though, is that a page must go through several states before it is 
> > actually unrecoverably freed.
> > 
> > In FreeBSD a page can be:
> > 
> > 	wired		most active state
> > 	active		nominally active state
> > 	inactive	dirty & inactive (can be reclaimed to active/wired)
> > 	cache		clean & inactive (can be reclaimed to active/wired)
> > 	free		truely free

That's pretty close to how Linux is set up, except pages cannot be dirty
and unmapped - so we lose out on some write-behind with shared mmappings
right now - the last user triggers the write.  The model I'm slowly
working towards is the above, plus an 'almost-free' state.  Almost free
could essentially be the bottom X% of the cache pages - which could be
reclaimed within interrupts if nescessary.

Another idea lurking in the back of my head is to use a slab-like scheme
for pages overall.  This idea is completely undeveloped, but the core to
it is that unswappable kernel-used pages should sit together, and not
spread around memory, resulting in fragmentation.

> > paging against cache maintenance.  The larger the minimum 'cache' size,
> > the more aggressive FreeBSD pages in order to maintain the larger
> > 'cache'.  A smaller minimum 'cache' size results in less aggressive
> > paging, but a higher chance of paging an active page out in a heavily
> > loaded system.
> 
> This is 'wrong' IMO, the system should balance between swaps
> and FS-pages... It keeps statistics of both of them, so it
> could just adjust the minimum-size so swapping and FS-reads
> are balanced (when in heavy load).

One mechanism suggested for attacking this problem is to get rid of the
buffer cache completely, and rely solely on the page cache.  This is
something for 2.3, though.  My current development plans for the
pte-linking and assorted stuff is to work on it from now though 2.2 and
have something to submit for 2.3...

		-ben

      reply	other threads:[~1997-12-10 18:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <199712100745.CAA11790@jupiter.cs.uml.edu>
1997-12-10 12:11 ` Rik van Riel
1997-12-10 18:38   ` Benjamin C.R. LaHaise [this message]

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=Pine.LNX.3.95.971210131331.5452B-100000@as200.spellcast.com \
    --to=blah@kvack.org \
    --cc=H.H.vanRiel@fys.ruu.nl \
    --cc=acahalan@cs.uml.edu \
    --cc=linux-mm@kvack.org \
    /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