Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1763729AbXHCUQf (ORCPT ); Fri, 3 Aug 2007 16:16:35 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1761345AbXHCUQZ (ORCPT ); Fri, 3 Aug 2007 16:16:25 -0400 Received: from mga09.intel.com ([134.134.136.24]:30850 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760986AbXHCUQX (ORCPT ); Fri, 3 Aug 2007 16:16:23 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.19,218,1183359600"; d="scan'208";a="113364858" Date: Fri, 3 Aug 2007 13:10:13 -0700 From: "Siddha, Suresh B" To: Nick Piggin Cc: Martin Bligh , Lee Schermerhorn , Andi Kleen , Ingo Molnar , Linux Kernel Mailing List , Linux Memory Management List , Eric Whitney Subject: Re: [rfc] balance-on-fork NUMA placement Message-ID: <20070803201013.GA12874@linux-os.sc.intel.com> References: <20070731054142.GB11306@wotan.suse.de> <200707311114.09284.ak@suse.de> <20070801002313.GC31006@wotan.suse.de> <46B0C8A3.8090506@mbligh.org> <1185993169.5059.79.camel@localhost> <46B10E9B.2030907@mbligh.org> <20070802013631.GA15595@wotan.suse.de> <46B22383.5020109@mbligh.org> <20070803002010.GB14775@wotan.suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070803002010.GB14775@wotan.suse.de> User-Agent: Mutt/1.4.1i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2557 Lines: 55 On Fri, Aug 03, 2007 at 02:20:10AM +0200, Nick Piggin wrote: > On Thu, Aug 02, 2007 at 11:33:39AM -0700, Martin Bligh wrote: > > Nick Piggin wrote: > > >On Wed, Aug 01, 2007 at 03:52:11PM -0700, Martin Bligh wrote: > > >>>And so forth. Initial forks will balance. If the children refuse to > > >>>die, forks will continue to balance. If the parent starts seeing short > > >>>lived children, fork()s will eventually start to stay local. > > >>Fork without exec is much more rare than without. Optimising for > > >>the uncommon case is the Wrong Thing to Do (tm). What we decided > > > > > >It's only the wrong thing to do if it hurts the common case too > > >much. Considering we _already_ balance on exec, then adding another > > >balance on fork is not going to introduce some order of magnitude > > >problem -- at worst it would be 2x but it really isn't too slow > > >anyway (at least nobody complained when we added it). > > > > > >One place where we found it helps is clone for threads. > > > > > >If we didn't do such a bad job at keeping tasks together with their > > >local memory, then we might indeed reduce some of the balance-on-crap > > >and increase the aggressiveness of periodic balancing. > > > > > >Considering we _already_ balance on fork/clone, I don't know what > > >your argument is against this patch is? Doing the balance earlier > > >and allocating more stuff on the local node is surely not a bad > > >idea. > > > > I don't know who turned that on ;-( I suspect nobody bothered > > actually measuring it at the time though, or used some crap > > benchmark like stream to do so. It should get reverted. > > So you have numbers to show it hurts? I tested some things where it > is not supposed to help, and it didn't make any difference. Nobody > else noticed either. > > If the cost of doing the double balance is _really_ that painful, > then we ccould skip balance-on-exec for domains with balance-on-fork > set. Nick, Even if it is not painful, can we skip balance-on-exec if balance-on-fork is set. There is no need for double balance, right? Especially with the optimization you are trying to do with this patch, balance-on-exec may lead to wrong decision making this optimization not work as expected. or perhaps do balance-on-fork based on clone_flags.. thanks, suresh - 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/