From: Christoph Lameter <cl@linux-foundation.org>
To: Brice Goglin <Brice.Goglin@inria.fr>
Cc: linux-mm@kvack.org, LKML <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Nathalie Furmento <nathalie.furmento@labri.fr>
Subject: Re: [PATCH] mm: make do_move_pages() complexity linear
Date: Fri, 12 Sep 2008 08:45:35 -0500 [thread overview]
Message-ID: <48CA727F.1050405@linux-foundation.org> (raw)
In-Reply-To: <48CA611A.8060706@inria.fr>
Brice Goglin wrote:
> Page migration is currently very slow because its overhead is quadratic
> with the number of pages. This is caused by each single page migration
> doing a linear lookup in the page array in new_page_node().
Page migration in general is not affected by this issue. This is specific to
the sys_move_pages() system call. The API was so far only used to migrate a
limited number of pages. For more one would use either the cpuset or the
sys_migrate_pages() APIs since these do not require an array that describes
how every single page needs to be moved.
> Since pages are stored in the array order in the pagelist and do_move_pages
> process this list in order, new_page_node() can increase the "pm" pointer
> to the page array so that the next iteration will find the next page in
> 0 or few lookup steps.
I agree. It would be good increase the speed of sys_move_pages().
However, note that your patch assumes that new_page_node() is called in
sequence for each of the pages in the page descriptor array. new_page_node()
is skipped in the loop if
1. The page is not present
2. The page is reserved
3. The page is already on the intended node
4. The page is shared between processes.
If any of those cases happen then your patch will result in the association of
page descriptors with the wrong pages for the remaining pages in the array.
--
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>
next prev parent reply other threads:[~2008-09-12 13:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-12 12:31 Brice Goglin
2008-09-12 13:45 ` Christoph Lameter [this message]
2008-09-12 13:54 ` Brice Goglin
2008-09-12 14:21 ` Christoph Lameter
2008-09-25 12:58 ` Brice Goglin
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=48CA727F.1050405@linux-foundation.org \
--to=cl@linux-foundation.org \
--cc=Brice.Goglin@inria.fr \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=nathalie.furmento@labri.fr \
/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