Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756098Ab2EJGml (ORCPT ); Thu, 10 May 2012 02:42:41 -0400 Received: from mail-qa0-f49.google.com ([209.85.216.49]:39905 "EHLO mail-qa0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755925Ab2EJGmk (ORCPT ); Thu, 10 May 2012 02:42:40 -0400 Message-ID: <4FAB6363.4080808@gmail.com> Date: Thu, 10 May 2012 02:42:43 -0400 From: KOSAKI Motohiro User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: Rusty Russell CC: KOSAKI Motohiro , Ingo Molnar , x86@kernel.org, LKML , anton@samba.org, Arnd Bergmann , KOSAKI Motohiro , Mike Travis , Thomas Gleixner , Linus Torvalds , Al Viro Subject: Re: [PULL] cpumask: finally make them variable size w/ CPUMASK_OFFSTACK. References: <87ipg5c2bk.fsf@rustcorp.com.au> <4FAB1AC9.1050306@gmail.com> <871umsdbm0.fsf@rustcorp.com.au> <4FAB2B5B.4020902@gmail.com> <87vck4bppw.fsf@rustcorp.com.au> In-Reply-To: <87vck4bppw.fsf@rustcorp.com.au> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1128 Lines: 29 (5/10/12 12:54 AM), Rusty Russell wrote: > On Wed, 09 May 2012 22:43:39 -0400, KOSAKI Motohiro wrote: >>> Or is there a reason we shouldn't even try to allocate here? >> >> 1) your code always use GFP_KERNEL. it is trouble maker when alloc_pages w/ GFP_ATOMIC. > > Oh :( > > How about the below instead? This code still slow than original. when calling reclaim path, new allocation is almost always fail. then, your code almost always invoke all cpu batch invalidation. i.e. many ipi. >> 2) When CONFIG_CPUMASK_OFFSTACK=n and NR_CPUS is relatively large, cpumask on stack may >> cause stack overflow. because of, alloc_pages() can be called from >> very deep call stack. > > You can't have large NR_CPUS without CONFIG_CPUMASK_OFFSTACK=y, > otherwise you'll get many other stack overflows, too. Original code put cpumask bss instead stack then. :-) -- 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/