linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Weiner <jweiner@redhat.com>
To: "kautuk.c @samsung.com" <consul.kautuk@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Mel Gorman <mel@csn.ul.ie>, Minchan Kim <minchan.kim@gmail.com>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	Rik van Riel <riel@redhat.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Lee Schermerhorn <lee.schermerhorn@hp.com>,
	KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Subject: Re: [patch] mm: remove sysctl to manually rescue unevictable pages
Date: Mon, 26 Sep 2011 16:25:41 +0200	[thread overview]
Message-ID: <20110926142540.GE14333@redhat.com> (raw)
In-Reply-To: <CAFPAmTQbHhj8wodFEutpstXdQ6Kc2_qRV6Pe69ngHwz1erF29Q@mail.gmail.com>

On Mon, Sep 26, 2011 at 05:59:39PM +0530, kautuk.c @samsung.com wrote:
> On Mon, Sep 26, 2011 at 5:40 PM, kautuk.c @samsung.com
> <consul.kautuk@gmail.com> wrote:
> > On Mon, Sep 26, 2011 at 4:59 PM, Johannes Weiner <jweiner@redhat.com> wrote:
> >> On Sun, Sep 25, 2011 at 04:29:40PM +0530, Kautuk Consul wrote:
> >>> write_scan_unavictable_node checks the value req returned by
> >>> strict_strtoul and returns 1 if req is 0.
> >>>
> >>> However, when strict_strtoul returns 0, it means successful conversion
> >>> of buf to unsigned long.
> >>>
> >>> Due to this, the function was not proceeding to scan the zones for
> >>> unevictable pages even though we write a valid value to the
> >>> scan_unevictable_pages sys file.
> >>
> >> Given that there is not a real reason for this knob (anymore) and that
> >> it apparently never really worked since the day it was introduced, how
> >> about we just drop all that code instead?
> >>
> >>        Hannes
> >>
> >> ---
> >> From: Johannes Weiner <jweiner@redhat.com>
> >> Subject: mm: remove sysctl to manually rescue unevictable pages
> >>
> >> At one point, anonymous pages were supposed to go on the unevictable
> >> list when no swap space was configured, and the idea was to manually
> >> rescue those pages after adding swap and making them evictable again.
> >> But nowadays, swap-backed pages on the anon LRU list are not scanned
> >> without available swap space anyway, so there is no point in moving
> >> them to a separate list anymore.
> >
> > Is this code only for anonymous pages ?
> > It seems to look at all pages in the zone both file as well as anon.
> >
> >>
> >> The manual rescue could also be used in case pages were stranded on
> >> the unevictable list due to race conditions.  But the code has been
> >> around for a while now and newly discovered bugs should be properly
> >> reported and dealt with instead of relying on such a manual fixup.
> >
> > What you say seems to be all right for anon pages, but what about file
> > pages ?
> > I'm not sure about how this could happen, but what if some file-system caused
> > a file cache page to be set to evictable or reclaimable without
> > actually removing
> > that page from the unevictable list ?
> 
> What I would like to also add is that while the transition of an anon
> page from and
> to the unevictable lists is straight-forward, should we make the same assumption
> about file cache pages ?

We should make no assumptions if our code base is open source :-)

> I am not sure about this, but could a file-system cause this kind of a problem
> independent of the mlocking behaviour of a user-mode app ?

Currently, I only see shmem and ramfs meddling with unevictability
outside of mlock and they both look correct to me.

I'd say that if a filesystem required this knob and user-intervention
for the VM to behave correctly, it needs fixing.

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2011-09-26 14:26 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-25 10:59 [PATCH 1/1] vmscan.c: Invalid strict_strtoul check in write_scan_unevictable_node Kautuk Consul
2011-09-26  9:20 ` KAMEZAWA Hiroyuki
2011-09-26 11:29 ` [patch] mm: remove sysctl to manually rescue unevictable pages Johannes Weiner
2011-09-26 12:10   ` kautuk.c @samsung.com
2011-09-26 12:29     ` kautuk.c @samsung.com
2011-09-26 14:25       ` Johannes Weiner [this message]
2011-09-26 14:55         ` kautuk.c @samsung.com
2011-09-26 14:18     ` Johannes Weiner
2011-09-26 23:11   ` Andrew Morton
2011-09-27  7:27     ` [patch] mm: disable user interface " Johannes Weiner
2011-09-28  2:14       ` Minchan Kim
2011-10-04 10:10         ` Johannes Weiner
2011-09-28  4:51       ` KAMEZAWA Hiroyuki
2011-09-28  1:00   ` [patch] mm: remove sysctl " KOSAKI Motohiro

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=20110926142540.GE14333@redhat.com \
    --to=jweiner@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=consul.kautuk@gmail.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=lee.schermerhorn@hp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mel@csn.ul.ie \
    --cc=minchan.kim@gmail.com \
    --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