public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Balbir Singh <balbir@in.ibm.com>
To: Rik van Riel <riel@redhat.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>,
	Andrea Arcangeli <andrea@suse.de>,
	Niki Hammler <mailinglists@nobaq.net>,
	linux-kernel@vger.kernel.org,
	Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
Subject: Re: Why active list and inactive list?
Date: Tue, 23 Jan 2007 11:21:38 +0530	[thread overview]
Message-ID: <45B5A26A.3060209@in.ibm.com> (raw)
In-Reply-To: <45B59053.1060007@redhat.com>

Rik van Riel wrote:
> Nick Piggin wrote:
> 
>> The other nice thing about it was that it didn't have a hard
>> cutoff that the current reclaim_mapped toggle does -- you could
>> opt to scan the mapped list at a lower ratio than the unmapped
>> one. Of course, it also has some downsides too, and would
>> require retuning...
> 
> Here's a simple idea for tuning.
> 
> For each list we keep track of:
> 1) the size of the list
> 2) the rate at which we scan the list
> 3) the fraction of (non new) pages that get
>    referenced
> 
> That way we can determine which list has the largest
> fraction of "idle" pages sitting around and consequently
> which list should be scanned more aggressively.
> 
> For each list we can calculate how frequently the pages
> in the list are being used:
> 
> pressure = referenced percentage * scan rate / list size
> 
> The VM can equalize the pressure by scanning the list with
> lower usage less than the other list.  This way the VM can
> give the right amount of memory to each type.
> 

This sounds like a good thing to start with. I think we can
then use swappiness to decide what to evict.

> Of course, each list needs to be divided into inactive and
> active like the current VM, in order to make sure that the
> pages which are used once cannot push the real working set
> of that list out of memory.
> 

Yes, that makes sense.

> There is a more subtle problem when the list's working set
> is larger than the amount of memory the list has.  In that
> situation the VM will be faulting pages back in just after
> they got evicted.  Something like my /proc/refaults code
> can detect that and adjust the size of the undersized list
> accordingly.
> 
> Of course, once we properly distinguish between the more
> frequently and less frequently accessed pages within each
> of the page sets (mapped/anonymous vs. unmapped) and have
> the pressure between the lists equalized, why do we need
> to keep them separate again?
> 

:-)

-- 
	Balbir Singh
	Linux Technology Center
	IBM, ISTL

  reply	other threads:[~2007-01-23  5:52 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-23  0:10 Why active list and inactive list? Niki Hammler
2007-01-23  0:39 ` Andrea Arcangeli
2007-01-23  1:31   ` Balbir Singh
2007-01-23  1:40     ` Christoph Lameter
2007-01-23  1:49       ` Rik van Riel
2007-01-23  2:03         ` Christoph Lameter
2007-01-23  2:17           ` Rik van Riel
2007-01-23  2:44             ` Christoph Lameter
2007-01-23  2:50               ` Rik van Riel
2007-01-23  8:29           ` Peter Zijlstra
2007-01-23 15:02             ` Rik van Riel
2007-01-30 11:01               ` Howard Chu
2007-01-23  3:36         ` Balbir Singh
2007-01-23  3:43           ` Christoph Lameter
2007-01-23  3:51             ` Balbir Singh
2007-01-23  3:18       ` Balbir Singh
2007-01-23  3:28         ` Christoph Lameter
2007-01-23  3:45           ` Balbir Singh
2007-01-23  3:51             ` Christoph Lameter
2007-01-23  1:42     ` Rik van Riel
2007-01-23  2:13     ` Andrea Arcangeli
2007-01-23  4:17     ` Nick Piggin
2007-01-23  4:34       ` Rik van Riel
2007-01-23  5:51         ` Balbir Singh [this message]
2007-01-23  4:46       ` Balbir Singh
     [not found] <7Gpmk-5fN-21@gated-at.bofh.it>
2007-01-30 10:23 ` Howard Chu

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=45B5A26A.3060209@in.ibm.com \
    --to=balbir@in.ibm.com \
    --cc=andrea@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mailinglists@nobaq.net \
    --cc=nickpiggin@yahoo.com.au \
    --cc=riel@redhat.com \
    --cc=svaidy@linux.vnet.ibm.com \
    /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