Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751944AbZIXCao (ORCPT ); Wed, 23 Sep 2009 22:30:44 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751196AbZIXCan (ORCPT ); Wed, 23 Sep 2009 22:30:43 -0400 Received: from fgwmail6.fujitsu.co.jp ([192.51.44.36]:59843 "EHLO fgwmail6.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750986AbZIXCam (ORCPT ); Wed, 23 Sep 2009 22:30:42 -0400 X-SecurityPolicyCheck-FJ: OK by FujitsuOutboundMailChecker v1.3.1 Date: Thu, 24 Sep 2009 11:28:38 +0900 From: KAMEZAWA Hiroyuki To: Christoph Lameter Cc: Max Laier , linux-kernel@vger.kernel.org Subject: Re: page_migration question Message-Id: <20090924112838.33414fc6.kamezawa.hiroyu@jp.fujitsu.com> In-Reply-To: References: <200909200501.59164.max@love2party.net> Organization: FUJITSU Co. LTD. X-Mailer: Sylpheed 2.5.0 (GTK+ 2.10.14; i686-pc-mingw32) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1110 Lines: 27 On Sun, 20 Sep 2009 08:30:15 -0400 (EDT) Christoph Lameter 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/