Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756177AbYGGRp2 (ORCPT ); Mon, 7 Jul 2008 13:45:28 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753948AbYGGRpT (ORCPT ); Mon, 7 Jul 2008 13:45:19 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:35720 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753939AbYGGRpS (ORCPT ); Mon, 7 Jul 2008 13:45:18 -0400 Message-ID: <48725480.1060808@linux-foundation.org> Date: Mon, 07 Jul 2008 12:38:08 -0500 From: Christoph Lameter User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: Gerald Schaefer CC: Andrew Morton , linux-kernel@vger.kernel.org, linux-mm@kvack.org, schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com, KAMEZAWA Hiroyuki , Yasunori Goto , Dave Hansen , Andy Whitcroft Subject: Re: [PATCH] Make CONFIG_MIGRATION available for s390 References: <1215354957.9842.19.camel@localhost.localdomain> <4872319B.9040809@linux-foundation.org> <1215451689.8431.80.camel@localhost.localdomain> In-Reply-To: <1215451689.8431.80.camel@localhost.localdomain> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2416 Lines: 52 Gerald Schaefer wrote: > On Mon, 2008-07-07 at 10:09 -0500, Christoph Lameter wrote: >> This will extend the number of pages that are migratable and lead to strange >> semantics in the NUMA case. There suddenly vma_is migratable will forbid hotplug >> to migrate certain pages. >> >> I think we need two functions: >> >> vma_migratable() General migratability >> >> vma_policy_migratable() Migratable under NUMA policies. > > Nothing will change here for the NUMA case, this is all about making it > compile w/o NUMA and with MIGRATION. What new strange semantics do you mean? > BTW, the latest patch in this thread will not touch vma_migratable() anymore, > I haven't read your mail before, sorry. Ahh. Okay. However, we may still want a function that tells us if the pages in a vma are migratable in general (independent of policies). The current vma_migratable function tell you if the pages in a vma were placed according to a NUMA memory policy and should be migrated for NUMA locality optimizations. >> That wont work since the migrate function takes a nodemask! The point of >> the function is to move memory from node to node which is something that you >> *cannot* do in a non NUMA configuration. So leave this chunk out. > > Right, but I noticed that this function definition was needed to make it > compile with MIGRATION and w/o NUMA, although it would never be called in > non-NUMA config. How does the compile break? It may be better to fix this where the function is used. > A better solution would probably be to put migrate_vmas(), the only caller > of vm_ops->migrate(), inside '#ifdef CONFIG_NUMA', because it will only be > called from NUMA-only mm/mempolicy.c. Does that sound reasonable? That sounds right. >> Hmmm... Okay. I tried to make MIGRATION as independent of CONFIG_NUMA as possible so hopefully this will work. > > Umm, it doesn't compile with MIGRATION and w/o NUMA, which was the reason > for this patch, because of the policy_zone reference in vma_migratable() > and the missing vm_ops->migrate() function. Right. I did not have a use case for !NUMA when I wrote the code. So you now need to fix the minor bits that break. -- 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/