* page_migration question
@ 2009-09-20 3:01 Max Laier
2009-09-20 12:30 ` Christoph Lameter
0 siblings, 1 reply; 3+ messages in thread
From: Max Laier @ 2009-09-20 3:01 UTC (permalink / raw)
To: Christoph Lameter, linux-kernel
Hello,
I read Documentation/vm/page_migration but couldn't find the information I'm
looking for. Specifically, what locks am I supposed to hold/not hold while
calling migrate_prep() and migrate_pages()? Currently migrate_prep() seems to
deadlock for reasons beyond me. Any help appreciated.
--
/"\ Best regards, | mlaier@freebsd.org
\ / Max Laier | ICQ #67774661
X http://pf4freebsd.love2party.net/ | mlaier@EFnet
/ \ ASCII Ribbon Campaign | Against HTML Mail and News
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: page_migration question
2009-09-20 3:01 page_migration question Max Laier
@ 2009-09-20 12:30 ` Christoph Lameter
2009-09-24 2:28 ` KAMEZAWA Hiroyuki
0 siblings, 1 reply; 3+ messages in thread
From: Christoph Lameter @ 2009-09-20 12:30 UTC (permalink / raw)
To: Max Laier; +Cc: linux-kernel
On Sun, 20 Sep 2009, Max Laier wrote:
> I read Documentation/vm/page_migration but couldn't find the information I'm
> looking for. Specifically, what locks am I supposed to hold/not hold while
> calling migrate_prep() and migrate_pages()? Currently migrate_prep() seems to
> deadlock for reasons beyond me. Any help appreciated.
No locks need to be held while calling migrate prep. The pages to be
migrated must have been isolated from the LRU and a refcount be taken for
migrate_pages to work. Look at the implementation of sys_migratepages and
sys_mbind and sys_movepages.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: page_migration question
2009-09-20 12:30 ` Christoph Lameter
@ 2009-09-24 2:28 ` KAMEZAWA Hiroyuki
0 siblings, 0 replies; 3+ messages in thread
From: KAMEZAWA Hiroyuki @ 2009-09-24 2:28 UTC (permalink / raw)
To: Christoph Lameter; +Cc: Max Laier, linux-kernel
On Sun, 20 Sep 2009 08:30:15 -0400 (EDT)
Christoph Lameter <cl@linux-foundation.org> wrote:
> On Sun, 20 Sep 2009, Max Laier wrote:
>
> > I read Documentation/vm/page_migration but couldn't find the information I'm
> > looking for. Specifically, what locks am I supposed to hold/not hold while
> > calling migrate_prep() and migrate_pages()? Currently migrate_prep() seems to
> > deadlock for reasons beyond me. Any help appreciated.
>
> No locks need to be held while calling migrate prep. The pages to be
> migrated must have been isolated from the LRU and a refcount be taken for
> migrate_pages to work. Look at the implementation of sys_migratepages and
> sys_mbind and sys_movepages.
>
If you find migrate_prep() hangs, please check your other cpus are available to
run workqueue. It calls lru_add_drain_all()=>schedule_on_each_cpu().
Thanks,
-Kame
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-09-24 2:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-20 3:01 page_migration question Max Laier
2009-09-20 12:30 ` Christoph Lameter
2009-09-24 2:28 ` KAMEZAWA Hiroyuki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox