mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nikita Danilov <nikita@clusterfs.com>
To: Rik van Riel <riel@redhat.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [RFC] cleanup of use-once
Date: Tue, 3 May 2005 15:57:41 +0400	[thread overview]
Message-ID: <17015.26421.403622.767581@gargle.gargle.HOWL> (raw)
In-Reply-To: <Pine.LNX.4.61.0505030037100.27756@chimarrao.boston.redhat.com>

Rik van Riel writes:
 > The special cases in the use-once code have annoyed me for a while,
 > and I'd like to see if replacing them with something simpler could
 > be worthwhile.
 > 
 > I haven't actually benchmarked (or even tested) this code yet, but
 > the basic idea is that we want to ignore multiple references to the
 > same page if they happen really close to each other, and only keep
 > a page on the active list if it got accessed again on a time scale
 > that matters to the pageout code.  In other words, filtering out
 > correlated references in a simpler way.
 > 
 > Opinions ?

[...]

 > - * active,unreferenced		->	active,referenced
 >   */
 >  void fastcall mark_page_accessed(struct page *page)
 >  {
 > -	if (!PageActive(page) && PageReferenced(page) && PageLRU(page)) {
 > -		activate_page(page);
 > -		ClearPageReferenced(page);
 > -	} else if (!PageReferenced(page)) {
 > +	if (!PageReferenced(page))
 >  		SetPageReferenced(page);
 > -	}
 >  }

So file system pages never get to the active list? Hmm... this doesn't
sound right.

 >  
 >  EXPORT_SYMBOL(mark_page_accessed);
 > @@ -157,6 +149,7 @@ void fastcall lru_cache_add_active(struc
 >  	if (!pagevec_add(pvec, page))

[...]

 >  			goto keep_locked;
 >  
 >  		referenced = page_referenced(page, 1, sc->priority <= 0);
 > -		/* In active use or really unfreeable?  Activate it. */
 > -		if (referenced && page_mapping_inuse(page))
 > +
 > +		if (referenced) {
 > +			/* New page. Let's see if it'll get used again... */
 > +			if (TestClearPageNew(page))
 > +				goto keep_locked;
 >  			goto activate_locked;
 > +		}

This will screw scanning most likely: no referenced page is ever
reclaimed unless lowest scanning priority is reached---this looks like
sure way to oom and has capacity to increase CPU consumption
significantly.

 >  
 >  #ifdef CONFIG_SWAP

Nikita.

  parent reply	other threads:[~2005-05-03 11:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-03  4:43 Rik van Riel
2005-05-03  6:24 ` [RFC] how do we move the VM forward? (was Re: [RFC] cleanup of use-once) Nick Piggin
2005-05-03 13:16   ` Rik van Riel
2005-05-04  0:43     ` Nick Piggin
2005-05-04  0:51       ` [RFC] how do we move the VM forward? (was Re: [RFC] cleanup ofuse-once) David Lang
2005-05-20 18:16         ` Herbert Poetzl
2005-05-20 18:30           ` Lee Revell
2005-05-20 21:24           ` Martin J. Bligh
2005-05-03 11:57 ` Nikita Danilov [this message]
2005-05-04 17:54   ` [RFC] cleanup of use-once Rik van Riel

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=17015.26421.403622.767581@gargle.gargle.HOWL \
    --to=nikita@clusterfs.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=riel@redhat.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

all inboxes | Powered by JetHome®