From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail6.bemta7.messagelabs.com (mail6.bemta7.messagelabs.com [216.82.255.55]) by kanga.kvack.org (Postfix) with ESMTP id C5F776B0174 for ; Fri, 14 Oct 2011 19:23:24 -0400 (EDT) Received: by yxs7 with SMTP id 7so1854160yxs.14 for ; Fri, 14 Oct 2011 16:23:22 -0700 (PDT) Date: Fri, 14 Oct 2011 16:23:19 -0700 From: Andrew Morton Subject: Re: [PATCH 1/9] mm: move some functions from memory_hotplug.c to page_isolation.c Message-Id: <20111014162319.825896dc.akpm@linux-foundation.org> In-Reply-To: <1317909290-29832-2-git-send-email-m.szyprowski@samsung.com> References: <1317909290-29832-1-git-send-email-m.szyprowski@samsung.com> <1317909290-29832-2-git-send-email-m.szyprowski@samsung.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Marek Szyprowski Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org, linux-mm@kvack.org, linaro-mm-sig@lists.linaro.org, Michal Nazarewicz , Kyungmin Park , Russell King , KAMEZAWA Hiroyuki , Ankita Garg , Daniel Walker , Mel Gorman , Arnd Bergmann , Jesse Barker , Jonathan Corbet , Shariq Hasnain , Chunsang Jeong , Dave Hansen On Thu, 06 Oct 2011 15:54:41 +0200 Marek Szyprowski wrote: > From: KAMEZAWA Hiroyuki > > Memory hotplug is a logic for making pages unused in the specified > range of pfn. So, some of core logics can be used for other purpose > as allocating a very large contigous memory block. > > This patch moves some functions from mm/memory_hotplug.c to > mm/page_isolation.c. This helps adding a function for large-alloc in > page_isolation.c with memory-unplug technique. > > Signed-off-by: KAMEZAWA Hiroyuki > [m.nazarewicz: reworded commit message] > Signed-off-by: Michal Nazarewicz > Signed-off-by: Kyungmin Park > [m.szyprowski: rebased and updated to Linux v3.0-rc1] > Signed-off-by: Marek Szyprowski > CC: Michal Nazarewicz > Acked-by: Arnd Bergmann > > ... > > +/* > + * For migration. > + */ > + > +int test_pages_in_a_zone(unsigned long start_pfn, unsigned long end_pfn); This is a rather poor function name. Given that we're now making it a global identifier, perhaps we should give it a better name. pages_in_single_zone()? > +unsigned long scan_lru_pages(unsigned long start, unsigned long end); > +int do_migrate_range(unsigned long start_pfn, unsigned long end_pfn); > > > ... > > --- a/mm/page_isolation.c > +++ b/mm/page_isolation.c > @@ -5,6 +5,9 @@ > #include > #include > #include > +#include > +#include > +#include > #include "internal.h" > > static inline struct page * > @@ -139,3 +142,114 @@ int test_pages_isolated(unsigned long start_pfn, unsigned long end_pfn) > spin_unlock_irqrestore(&zone->lock, flags); > return ret ? 0 : -EBUSY; > } > + > + > +/* > + * Confirm all pages in a range [start, end) is belongs to the same zone. It would be good to fix up that sentence while we're touching it. "Confirm that all pages ... belong to the same zone". > > ... > -- 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/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org