All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrea Arcangeli <aarcange@redhat.com>
To: Mel Gorman <mel@csn.ul.ie>
Cc: Christoph Lameter <cl@linux.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linux-MM <linux-mm@kvack.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Minchan Kim <minchan.kim@gmail.com>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	Rik van Riel <riel@redhat.com>
Subject: Re: [PATCH 2/2] mm,migration: Avoid race between shift_arg_pages() and rmap_walk() during migration by not migrating temporary stacks
Date: Tue, 11 May 2010 18:29:09 +0200	[thread overview]
Message-ID: <20100511162909.GI10631@random.random> (raw)
In-Reply-To: <20100511161516.GU26611@csn.ul.ie>

On Tue, May 11, 2010 at 05:15:16PM +0100, Mel Gorman wrote:
> On Tue, May 11, 2010 at 10:56:00AM -0500, Christoph Lameter wrote:
> > On Tue, 11 May 2010, Mel Gorman wrote:
> > 
> > > Or just identify the temporary stack from the migration side instead of
> > > adding to the cost of exec?
> > 
> > Adding one off checks to a generic mechanism isnt really clean
> > programming. Using the provided means of disabling a generic mechanism is.
> > 
> 
> Andrea's solution is likely lighter than yours as it is one kmalloc and
> an insertion into the VM as opposed to a page table walk with reference
> counting. Better yet, it exists as a patch that has been tested and it
> fits in with the generic mechanism by guaranteeing that rmap_walk finds
> all the migration PTEs during the second walk.
> 
> The problem remains the same - that class of solution increases the cost of
> a common operation (exec) to keep a much less operation (migration) happy.

page table walk adding reference counting is still a one off check,
the generic rmap_walk mechanism won't care about the reference
counting, still only migrate checks the page count... so it doesn't
move the needle in clean programming terms.

WARNING: multiple messages have this Message-ID (diff)
From: Andrea Arcangeli <aarcange@redhat.com>
To: Mel Gorman <mel@csn.ul.ie>
Cc: Christoph Lameter <cl@linux.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linux-MM <linux-mm@kvack.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Minchan Kim <minchan.kim@gmail.com>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	Rik van Riel <riel@redhat.com>
Subject: Re: [PATCH 2/2] mm,migration: Avoid race between shift_arg_pages() and rmap_walk() during migration by not migrating temporary stacks
Date: Tue, 11 May 2010 18:29:09 +0200	[thread overview]
Message-ID: <20100511162909.GI10631@random.random> (raw)
In-Reply-To: <20100511161516.GU26611@csn.ul.ie>

On Tue, May 11, 2010 at 05:15:16PM +0100, Mel Gorman wrote:
> On Tue, May 11, 2010 at 10:56:00AM -0500, Christoph Lameter wrote:
> > On Tue, 11 May 2010, Mel Gorman wrote:
> > 
> > > Or just identify the temporary stack from the migration side instead of
> > > adding to the cost of exec?
> > 
> > Adding one off checks to a generic mechanism isnt really clean
> > programming. Using the provided means of disabling a generic mechanism is.
> > 
> 
> Andrea's solution is likely lighter than yours as it is one kmalloc and
> an insertion into the VM as opposed to a page table walk with reference
> counting. Better yet, it exists as a patch that has been tested and it
> fits in with the generic mechanism by guaranteeing that rmap_walk finds
> all the migration PTEs during the second walk.
> 
> The problem remains the same - that class of solution increases the cost of
> a common operation (exec) to keep a much less operation (migration) happy.

page table walk adding reference counting is still a one off check,
the generic rmap_walk mechanism won't care about the reference
counting, still only migrate checks the page count... so it doesn't
move the needle in clean programming terms.

--
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:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2010-05-11 16:30 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-29  8:32 [PATCH 0/2] Fix migration races in rmap_walk() V3 Mel Gorman
2010-04-29  8:32 ` Mel Gorman
2010-04-29  8:32 ` [PATCH 1/2] mm: Take all anon_vma locks in anon_vma_lock Mel Gorman
2010-04-29  8:32   ` Mel Gorman
2010-05-02 17:28   ` Minchan Kim
2010-05-02 17:28     ` Minchan Kim
2010-04-29  8:32 ` [PATCH 2/2] mm,migration: Avoid race between shift_arg_pages() and rmap_walk() during migration by not migrating temporary stacks Mel Gorman
2010-04-29  8:32   ` Mel Gorman
2010-04-29 16:21   ` Andrea Arcangeli
2010-04-29 16:21     ` Andrea Arcangeli
2010-04-30 19:22     ` Andrea Arcangeli
2010-04-30 19:22       ` Andrea Arcangeli
2010-04-30 20:21       ` Rik van Riel
2010-04-30 20:21         ` Rik van Riel
2010-05-01  9:39       ` Andrea Arcangeli
2010-05-01  9:39         ` Andrea Arcangeli
2010-05-01 13:02         ` Rik van Riel
2010-05-01 13:02           ` Rik van Riel
2010-05-02 17:40     ` Minchan Kim
2010-05-02 17:40       ` Minchan Kim
2010-05-02 18:20       ` Andrea Arcangeli
2010-05-02 18:20         ` Andrea Arcangeli
2010-05-04 10:32     ` Mel Gorman
2010-05-04 10:32       ` Mel Gorman
2010-05-04 12:56       ` Andrea Arcangeli
2010-05-04 12:56         ` Andrea Arcangeli
2010-05-04 14:33         ` Mel Gorman
2010-05-04 14:33           ` Mel Gorman
2010-05-04 14:44           ` Andrea Arcangeli
2010-05-04 14:44             ` Andrea Arcangeli
2010-05-02  1:56   ` Christoph Lameter
2010-05-02  1:56     ` Christoph Lameter
2010-05-04  9:45     ` Mel Gorman
2010-05-04  9:45       ` Mel Gorman
2010-05-10 17:41       ` Christoph Lameter
2010-05-10 17:41         ` Christoph Lameter
2010-05-10 17:56         ` Mel Gorman
2010-05-10 17:56           ` Mel Gorman
2010-05-11 13:59           ` Christoph Lameter
2010-05-11 13:59             ` Christoph Lameter
2010-05-11 15:11             ` Mel Gorman
2010-05-11 15:11               ` Mel Gorman
2010-05-11 15:56               ` Christoph Lameter
2010-05-11 15:56                 ` Christoph Lameter
2010-05-11 16:15                 ` Mel Gorman
2010-05-11 16:15                   ` Mel Gorman
2010-05-11 16:29                   ` Andrea Arcangeli [this message]
2010-05-11 16:29                     ` Andrea Arcangeli
2010-05-10 19:05         ` Andrea Arcangeli
2010-05-10 19:05           ` Andrea Arcangeli
2010-05-11  0:10           ` KAMEZAWA Hiroyuki
2010-05-11  0:10             ` KAMEZAWA Hiroyuki
2010-04-30 18:28 ` [PATCH 0/2] Fix migration races in rmap_walk() V3 Andrea Arcangeli
2010-04-30 18:28   ` Andrea Arcangeli
2010-05-01 13:51   ` Johannes Weiner
2010-05-01 13:51     ` Johannes Weiner
2010-05-03 15:33     ` Andrea Arcangeli
2010-05-03 15:33       ` Andrea Arcangeli
2010-05-03 23:41       ` Johannes Weiner
2010-05-03 23:41         ` Johannes Weiner
2010-05-04 17:35         ` Andrea Arcangeli
2010-05-04 17:35           ` Andrea Arcangeli

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=20100511162909.GI10631@random.random \
    --to=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.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.