From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756194Ab3JKGJu (ORCPT ); Fri, 11 Oct 2013 02:09:50 -0400 Received: from mail-ee0-f41.google.com ([74.125.83.41]:57510 "EHLO mail-ee0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752151Ab3JKGJs (ORCPT ); Fri, 11 Oct 2013 02:09:48 -0400 Date: Fri, 11 Oct 2013 08:09:44 +0200 From: Ingo Molnar To: Linus Torvalds Cc: Steven Rostedt , Peter Zijlstra , Andrew Morton , Oleg Nesterov , "Srivatsa S. Bhat" , Paul McKenney , Mel Gorman , Rik van Riel , Srikar Dronamraju , Andrea Arcangeli , Johannes Weiner , Thomas Gleixner , Linux Kernel Mailing List Subject: Re: [PATCH 0/6] Optimize the cpu hotplug locking -v2 Message-ID: <20131011060944.GB4975@gmail.com> References: <20131010090044.7f12ddaf.akpm@linux-foundation.org> <20131010123631.1be60315@gandalf.local.home> <20131010094355.6f75e5a2.akpm@linux-foundation.org> <20131010165337.GT3081@twins.programming.kicks-ass.net> <20131010131305.58558079@gandalf.local.home> <20131010104856.8f042977112d5ac2693973ae@linux-foundation.org> <20131010183409.GP13848@laptop.programming.kicks-ass.net> <20131010150444.51f9c929@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 * Linus Torvalds wrote: > On Thu, Oct 10, 2013 at 12:04 PM, Steven Rostedt wrote: > > > > I'm wondering if we can have a for_each_cpu() that only disables > > preemption in the loop. > > I think we'd generally want to have it be something the loop asks for. > > If the loop is just some kind of "gather statistics" thing, I don't > think it's required. The cost per loop is so low (usually adding up a > couple of words) that the downside drowns the upside. > > And we could easily look at MAXSMP (or NR_CPUS) at compile-time, and not > do it for common small values (although it looks like Fedora defaults to > 128 CPU's for their distro kernels, which seems a bit excessive - too > many by far for normal people, too few for the crazy big ones). Ubuntu has it at 256, so I guess Fedora is even a bit conservative ;-) Thanks, Ingo