All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Weiner <jweiner@redhat.com>
To: Minchan Kim <minchan.kim@gmail.com>
Cc: Andrew Morton <akpm@google.com>,
	Kautuk Consul <consul.kautuk@gmail.com>,
	Mel Gorman <mel@csn.ul.ie>,
	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>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [patch] mm: disable user interface to manually rescue unevictable pages
Date: Tue, 4 Oct 2011 12:10:36 +0200	[thread overview]
Message-ID: <20111004101036.GB1687@redhat.com> (raw)
In-Reply-To: <20110928021424.GA2715@barrios-desktop>

On Wed, Sep 28, 2011 at 11:14:24AM +0900, Minchan Kim wrote:
> On Tue, Sep 27, 2011 at 09:27:14AM +0200, Johannes Weiner wrote:
> > 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.
> > 
> > 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.
> > 
> > In addition to the lack of a usecase, the sysfs interface to rescue
> > pages from a specific NUMA node has been broken since its
> > introduction, so it's unlikely that anybody ever relied on that.
> > 
> > This patch removes the functionality behind the sysctl and the
> > node-interface and emits a one-time warning when somebody tries to
> > access either of them.
> > 
> > Signed-off-by: Johannes Weiner <jweiner@redhat.com>
> > Reported-by: Kautuk Consul <consul.kautuk@gmail.com>
> Reviewed-by: Minchan Kim <minchan.kim@gmail.com>

Thanks, Minchan.

> > @@ -3469,11 +3415,8 @@ int scan_unevictable_handler(struct ctl_table *table, int write,
> >  			   void __user *buffer,
> >  			   size_t *length, loff_t *ppos)
> >  {
> > +	warn_scan_unevictable_pages();
> >  	proc_doulongvec_minmax(table, write, buffer, length, ppos);
> > -
> > -	if (write && *(unsigned long *)table->data)
> > -		scan_all_zones_unevictable_pages();
> > -
> >  	scan_unevictable_pages = 0;
> 
> Nitpick:
> Could we remove this resetting with zero?

table->data = &scan_unevictable_pages, so I let it in such that the
generic sysctl stuff to process the input and clean up afterward is
complete.

WARNING: multiple messages have this Message-ID (diff)
From: Johannes Weiner <jweiner@redhat.com>
To: Minchan Kim <minchan.kim@gmail.com>
Cc: Andrew Morton <akpm@google.com>,
	Kautuk Consul <consul.kautuk@gmail.com>,
	Mel Gorman <mel@csn.ul.ie>,
	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>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [patch] mm: disable user interface to manually rescue unevictable pages
Date: Tue, 4 Oct 2011 12:10:36 +0200	[thread overview]
Message-ID: <20111004101036.GB1687@redhat.com> (raw)
In-Reply-To: <20110928021424.GA2715@barrios-desktop>

On Wed, Sep 28, 2011 at 11:14:24AM +0900, Minchan Kim wrote:
> On Tue, Sep 27, 2011 at 09:27:14AM +0200, Johannes Weiner wrote:
> > 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.
> > 
> > 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.
> > 
> > In addition to the lack of a usecase, the sysfs interface to rescue
> > pages from a specific NUMA node has been broken since its
> > introduction, so it's unlikely that anybody ever relied on that.
> > 
> > This patch removes the functionality behind the sysctl and the
> > node-interface and emits a one-time warning when somebody tries to
> > access either of them.
> > 
> > Signed-off-by: Johannes Weiner <jweiner@redhat.com>
> > Reported-by: Kautuk Consul <consul.kautuk@gmail.com>
> Reviewed-by: Minchan Kim <minchan.kim@gmail.com>

Thanks, Minchan.

> > @@ -3469,11 +3415,8 @@ int scan_unevictable_handler(struct ctl_table *table, int write,
> >  			   void __user *buffer,
> >  			   size_t *length, loff_t *ppos)
> >  {
> > +	warn_scan_unevictable_pages();
> >  	proc_doulongvec_minmax(table, write, buffer, length, ppos);
> > -
> > -	if (write && *(unsigned long *)table->data)
> > -		scan_all_zones_unevictable_pages();
> > -
> >  	scan_unevictable_pages = 0;
> 
> Nitpick:
> Could we remove this resetting with zero?

table->data = &scan_unevictable_pages, so I let it in such that the
generic sysctl stuff to process the input and clean up afterward is
complete.

--
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-10-04 10:11 UTC|newest]

Thread overview: 28+ 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-25 10:59 ` Kautuk Consul
2011-09-26  9:20 ` KAMEZAWA Hiroyuki
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 11:29   ` Johannes Weiner
2011-09-26 12:10   ` kautuk.c @samsung.com
2011-09-26 12:10     ` kautuk.c @samsung.com
2011-09-26 12:29     ` kautuk.c @samsung.com
2011-09-26 12:29       ` kautuk.c @samsung.com
2011-09-26 14:25       ` Johannes Weiner
2011-09-26 14:25         ` Johannes Weiner
2011-09-26 14:55         ` kautuk.c @samsung.com
2011-09-26 14:55           ` kautuk.c @samsung.com
2011-09-26 14:18     ` Johannes Weiner
2011-09-26 14:18       ` Johannes Weiner
2011-09-26 23:11   ` Andrew Morton
2011-09-26 23:11     ` Andrew Morton
2011-09-27  7:27     ` [patch] mm: disable user interface " Johannes Weiner
2011-09-27  7:27       ` Johannes Weiner
2011-09-28  2:14       ` Minchan Kim
2011-09-28  2:14         ` Minchan Kim
2011-10-04 10:10         ` Johannes Weiner [this message]
2011-10-04 10:10           ` Johannes Weiner
2011-09-28  4:51       ` KAMEZAWA Hiroyuki
2011-09-28  4:51         ` KAMEZAWA Hiroyuki
2011-09-28  1:00   ` [patch] mm: remove sysctl " KOSAKI Motohiro
2011-09-28  1:00     ` 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=20111004101036.GB1687@redhat.com \
    --to=jweiner@redhat.com \
    --cc=akpm@google.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.