All of lore.kernel.org
 help / color / mirror / Atom feed
From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
To: Christoph Lameter <clameter@engr.sgi.com>
Cc: akpm@osdl.org, Mike Kravetz <kravetz@us.ibm.com>,
	linux-kernel@vger.kernel.org,
	Marcelo Tosatti <marcelo.tosatti@cyclades.com>,
	Nick Piggin <nickpiggin@yahoo.com.au>,
	linux-mm@kvack.org, torvalds@osdl.org,
	Hirokazu Takahashi <taka@valinux.co.jp>, Andi Kleen <ak@suse.de>,
	Magnus Damm <magnus.damm@gmail.com>, Paul Jackson <pj@sgi.com>,
	Dave Hansen <haveblue@us.ibm.com>
Subject: Re: [PATCH 5/8] Direct Migration V2: upgrade MPOL_MF_MOVE and sys_migrate_pages()
Date: Wed, 09 Nov 2005 12:59:34 +0900	[thread overview]
Message-ID: <43717426.3050002@jp.fujitsu.com> (raw)
In-Reply-To: <Pine.LNX.4.62.0511081922260.582@schroedinger.engr.sgi.com>

Christoph Lameter wrote:
> On Wed, 9 Nov 2005, KAMEZAWA Hiroyuki wrote:
> 
> 
>>Christoph Lameter wrote:
>>
>>>+	err = migrate_pages(pagelist, &newlist, &moved, &failed);
>>>+
>>>+	putback_lru_pages(&moved);	/* Call release pages instead ?? */
>>>+
>>>+	if (err >= 0 && list_empty(&newlist) && !list_empty(pagelist))
>>>+		goto redo;
>>
>>
>>Here, list_empty(&newlist) is needed ?
>>For checking permanent failure case, list_empty(&failed) looks better.
> 
> 
> We only allocate 256 pages which are on the newlist. If the newlist is 
> empty but there are still pages that could be migrated 
> (!list_empty(pagelist)) then we need to allocate more pages and call 
> migrate_pages() again.
> 
> 
Ah, Okay.

confirmation:
1. Because mm->sem is held, there is no page-is-truncated/freed case.
2. Because pages in pagelist are removed from zone's lru, kswapd and others will not
    find and unmap them. There is no page-is-swapedout-by-others case.

So if all target pages are successfuly remvoed from pagelist, newlist must be empty.
Right ?


-- Kame



WARNING: multiple messages have this Message-ID (diff)
From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
To: Christoph Lameter <clameter@engr.sgi.com>
Cc: akpm@osdl.org, Mike Kravetz <kravetz@us.ibm.com>,
	linux-kernel@vger.kernel.org,
	Marcelo Tosatti <marcelo.tosatti@cyclades.com>,
	Nick Piggin <nickpiggin@yahoo.com.au>,
	linux-mm@kvack.org, torvalds@osdl.org,
	Hirokazu Takahashi <taka@valinux.co.jp>, Andi Kleen <ak@suse.de>,
	Magnus Damm <magnus.damm@gmail.com>, Paul Jackson <pj@sgi.com>,
	Dave Hansen <haveblue@us.ibm.com>
Subject: Re: [PATCH 5/8] Direct Migration V2: upgrade MPOL_MF_MOVE and sys_migrate_pages()
Date: Wed, 09 Nov 2005 12:59:34 +0900	[thread overview]
Message-ID: <43717426.3050002@jp.fujitsu.com> (raw)
In-Reply-To: <Pine.LNX.4.62.0511081922260.582@schroedinger.engr.sgi.com>

Christoph Lameter wrote:
> On Wed, 9 Nov 2005, KAMEZAWA Hiroyuki wrote:
> 
> 
>>Christoph Lameter wrote:
>>
>>>+	err = migrate_pages(pagelist, &newlist, &moved, &failed);
>>>+
>>>+	putback_lru_pages(&moved);	/* Call release pages instead ?? */
>>>+
>>>+	if (err >= 0 && list_empty(&newlist) && !list_empty(pagelist))
>>>+		goto redo;
>>
>>
>>Here, list_empty(&newlist) is needed ?
>>For checking permanent failure case, list_empty(&failed) looks better.
> 
> 
> We only allocate 256 pages which are on the newlist. If the newlist is 
> empty but there are still pages that could be migrated 
> (!list_empty(pagelist)) then we need to allocate more pages and call 
> migrate_pages() again.
> 
> 
Ah, Okay.

confirmation:
1. Because mm->sem is held, there is no page-is-truncated/freed case.
2. Because pages in pagelist are removed from zone's lru, kswapd and others will not
    find and unmap them. There is no page-is-swapedout-by-others case.

So if all target pages are successfuly remvoed from pagelist, newlist must be empty.
Right ?


-- Kame


--
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:[~2005-11-09  4:00 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-08 21:02 [PATCH 0/8] Direct Migration V2: Overview Christoph Lameter
2005-11-08 21:02 ` Christoph Lameter
2005-11-08 21:03 ` [PATCH 1/8] Direct Migration V2: Swap migration patchset fixes Christoph Lameter
2005-11-08 21:03   ` Christoph Lameter
2005-11-08 21:03 ` [PATCH 2/8] Direct Migration V2: PageSwapCache checks Christoph Lameter
2005-11-08 21:03   ` Christoph Lameter
2005-11-08 21:03 ` [PATCH 3/8] Direct Migration V2: migrate_pages() extension Christoph Lameter
2005-11-08 21:03   ` Christoph Lameter
2005-11-08 21:03 ` [PATCH 4/8] Direct Migration V2: remove_from_swap() to remove swap ptes Christoph Lameter
2005-11-08 21:03   ` Christoph Lameter
2005-11-08 21:04 ` [PATCH 5/8] Direct Migration V2: upgrade MPOL_MF_MOVE and sys_migrate_pages() Christoph Lameter
2005-11-08 21:04   ` Christoph Lameter
2005-11-09  1:35   ` KAMEZAWA Hiroyuki
2005-11-09  1:35     ` KAMEZAWA Hiroyuki
2005-11-09  3:23     ` Christoph Lameter
2005-11-09  3:23       ` Christoph Lameter
2005-11-09  3:59       ` KAMEZAWA Hiroyuki [this message]
2005-11-09  3:59         ` KAMEZAWA Hiroyuki
2005-11-09 16:50         ` Christoph Lameter
2005-11-09 16:50           ` Christoph Lameter
2005-11-08 21:04 ` [PATCH 6/8] Direct Migration V2: Avoid writeback / page_migrate() method Christoph Lameter
2005-11-08 21:04   ` Christoph Lameter
2005-11-09 11:01   ` Nikita Danilov
2005-11-09 11:01     ` Nikita Danilov
2005-11-09 17:07     ` Christoph Lameter
2005-11-09 17:07       ` Christoph Lameter
2005-11-09 17:20       ` Nikita Danilov
2005-11-09 17:20         ` Nikita Danilov
2005-11-09 19:14         ` Christoph Lameter
2005-11-09 19:14           ` Christoph Lameter
2005-11-08 21:04 ` [PATCH 7/8] Direct Migration V2: add_to_swap() with additional gfp_t parameter Christoph Lameter
2005-11-08 21:04   ` Christoph Lameter
2005-11-08 21:04 ` [PATCH 8/8] Direct Migration V2: SWAP_REFERENCE for try_to_unmap() Christoph Lameter
2005-11-08 21:04   ` Christoph Lameter

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=43717426.3050002@jp.fujitsu.com \
    --to=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=clameter@engr.sgi.com \
    --cc=haveblue@us.ibm.com \
    --cc=kravetz@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=magnus.damm@gmail.com \
    --cc=marcelo.tosatti@cyclades.com \
    --cc=nickpiggin@yahoo.com.au \
    --cc=pj@sgi.com \
    --cc=taka@valinux.co.jp \
    --cc=torvalds@osdl.org \
    /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.