From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753746Ab2APJBV (ORCPT ); Mon, 16 Jan 2012 04:01:21 -0500 Received: from gir.skynet.ie ([193.1.99.77]:52847 "EHLO gir.skynet.ie" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753628Ab2APJBT (ORCPT ); Mon, 16 Jan 2012 04:01:19 -0500 Date: Mon, 16 Jan 2012 09:01:10 +0000 From: Mel Gorman To: Michal Nazarewicz Cc: Marek Szyprowski , 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, Kyungmin Park , Russell King , Andrew Morton , KAMEZAWA Hiroyuki , Daniel Walker , Arnd Bergmann , Jesse Barker , Jonathan Corbet , Shariq Hasnain , Chunsang Jeong , Dave Hansen , Benjamin Gaignard Subject: Re: [PATCH 04/11] mm: page_alloc: introduce alloc_contig_range() Message-ID: <20120116090110.GA2929@csn.ul.ie> References: <1325162352-24709-1-git-send-email-m.szyprowski@samsung.com> <1325162352-24709-5-git-send-email-m.szyprowski@samsung.com> <20120110141613.GB3910@csn.ul.ie> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 13, 2012 at 09:04:31PM +0100, Michal Nazarewicz wrote: > >On Thu, Dec 29, 2011 at 01:39:05PM +0100, Marek Szyprowski wrote: > >>From: Michal Nazarewicz > >>+ /* Make sure all pages are isolated. */ > >>+ if (!ret) { > >>+ lru_add_drain_all(); > >>+ drain_all_pages(); > >>+ if (WARN_ON(test_pages_isolated(start, end))) > >>+ ret = -EBUSY; > >>+ } > > On Tue, 10 Jan 2012 15:16:13 +0100, Mel Gorman wrote: > >Another global IPI seems overkill. Drain pages only from the local CPU > >(drain_pages(get_cpu()); put_cpu()) and test if the pages are isolated. > > Is get_cpu() + put_cpu() required? Won't drain_local_pages() work? > drain_local_pages() calls smp_processor_id() without preemption disabled. -- Mel Gorman SUSE Labs From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx172.postini.com [74.125.245.172]) by kanga.kvack.org (Postfix) with SMTP id B4F176B004F for ; Mon, 16 Jan 2012 04:01:19 -0500 (EST) Date: Mon, 16 Jan 2012 09:01:10 +0000 From: Mel Gorman Subject: Re: [PATCH 04/11] mm: page_alloc: introduce alloc_contig_range() Message-ID: <20120116090110.GA2929@csn.ul.ie> References: <1325162352-24709-1-git-send-email-m.szyprowski@samsung.com> <1325162352-24709-5-git-send-email-m.szyprowski@samsung.com> <20120110141613.GB3910@csn.ul.ie> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: Sender: owner-linux-mm@kvack.org List-ID: To: Michal Nazarewicz Cc: Marek Szyprowski , 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, Kyungmin Park , Russell King , Andrew Morton , KAMEZAWA Hiroyuki , Daniel Walker , Arnd Bergmann , Jesse Barker , Jonathan Corbet , Shariq Hasnain , Chunsang Jeong , Dave Hansen , Benjamin Gaignard On Fri, Jan 13, 2012 at 09:04:31PM +0100, Michal Nazarewicz wrote: > >On Thu, Dec 29, 2011 at 01:39:05PM +0100, Marek Szyprowski wrote: > >>From: Michal Nazarewicz > >>+ /* Make sure all pages are isolated. */ > >>+ if (!ret) { > >>+ lru_add_drain_all(); > >>+ drain_all_pages(); > >>+ if (WARN_ON(test_pages_isolated(start, end))) > >>+ ret = -EBUSY; > >>+ } > > On Tue, 10 Jan 2012 15:16:13 +0100, Mel Gorman wrote: > >Another global IPI seems overkill. Drain pages only from the local CPU > >(drain_pages(get_cpu()); put_cpu()) and test if the pages are isolated. > > Is get_cpu() + put_cpu() required? Won't drain_local_pages() work? > drain_local_pages() calls smp_processor_id() without preemption disabled. -- Mel Gorman SUSE Labs -- 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: mel@csn.ul.ie (Mel Gorman) Date: Mon, 16 Jan 2012 09:01:10 +0000 Subject: [PATCH 04/11] mm: page_alloc: introduce alloc_contig_range() In-Reply-To: References: <1325162352-24709-1-git-send-email-m.szyprowski@samsung.com> <1325162352-24709-5-git-send-email-m.szyprowski@samsung.com> <20120110141613.GB3910@csn.ul.ie> Message-ID: <20120116090110.GA2929@csn.ul.ie> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Fri, Jan 13, 2012 at 09:04:31PM +0100, Michal Nazarewicz wrote: > >On Thu, Dec 29, 2011 at 01:39:05PM +0100, Marek Szyprowski wrote: > >>From: Michal Nazarewicz > >>+ /* Make sure all pages are isolated. */ > >>+ if (!ret) { > >>+ lru_add_drain_all(); > >>+ drain_all_pages(); > >>+ if (WARN_ON(test_pages_isolated(start, end))) > >>+ ret = -EBUSY; > >>+ } > > On Tue, 10 Jan 2012 15:16:13 +0100, Mel Gorman wrote: > >Another global IPI seems overkill. Drain pages only from the local CPU > >(drain_pages(get_cpu()); put_cpu()) and test if the pages are isolated. > > Is get_cpu() + put_cpu() required? Won't drain_local_pages() work? > drain_local_pages() calls smp_processor_id() without preemption disabled. -- Mel Gorman SUSE Labs