linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Hirokazu Takahashi <taka@valinux.co.jp>
To: akpm@osdl.org
Cc: nikita@clusterfs.com, linux-mm@kvack.org
Subject: Re: [PATCH]: VM 3/8 PG_skipped
Date: Mon, 02 May 2005 18:03:55 +0900 (JST)	[thread overview]
Message-ID: <20050502.180355.38710526.taka@valinux.co.jp> (raw)
In-Reply-To: <20050425204327.4436cd77.akpm@osdl.org>

Hi,

> >  Don't call ->writepage from VM scanner when page is met for the first time
> >  during scan.
> > 
> >  New page flag PG_skipped is used for this. This flag is TestSet-ed just
> >  before calling ->writepage and is cleaned when page enters inactive
> >  list.
> > 
> >  One can see this as "second chance" algorithm for the dirty pages on the
> >  inactive list.
> > 
> >  BSD does the same: src/sys/vm/vm_pageout.c:vm_pageout_scan(),
> >  PG_WINATCFLS flag.
> > 
> >  Reason behind this is that ->writepages() will perform more efficient writeout
> >  than ->writepage(). Skipping of page can be conditioned on zone->pressure.
> > 
> >  On the other hand, avoiding ->writepage() increases amount of scanning
> >  performed by kswapd.
> 
> I worry that this will cause boxes to go oom all over the place, due to the
> longer scans which are encountered prior to pages being reclaimed.
> 
> We could of course increase the "oh crap, we've scanned too much"
> threshold.  We probably need to do that anyway - I shrunk it by heaps early
> in 2.5 just as a "let's see who complains" experiment.
> 
> Writeout off the LRU should be a rare case.  We should have instrumentation
> for that, but we don't.

IMHO, I don't think it's always true.
Would you please consider mmap'ed pages, which may not be written out
by pdflush. It might leave many unexpected dirty pages to the swapcode.

I feel it would be better to let pdflush do this things, though.

> My gut feel with this patch is to run away in terror, frankly.


Thanks,
Hirokazu Takahashi.
--
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-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>

      reply	other threads:[~2005-05-02  9:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-17 17:36 Nikita Danilov
2005-04-18 15:12 ` Rik van Riel
2005-04-18 17:51   ` Dave Hansen
2005-04-18 20:29     ` Nikita Danilov
2005-04-26  3:43 ` Andrew Morton
2005-05-02  9:03   ` Hirokazu Takahashi [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=20050502.180355.38710526.taka@valinux.co.jp \
    --to=taka@valinux.co.jp \
    --cc=akpm@osdl.org \
    --cc=linux-mm@kvack.org \
    --cc=nikita@clusterfs.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