Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754322AbYKRR12 (ORCPT ); Tue, 18 Nov 2008 12:27:28 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752763AbYKRR1U (ORCPT ); Tue, 18 Nov 2008 12:27:20 -0500 Received: from smtp-out.google.com ([216.239.45.13]:55476 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752701AbYKRR1T (ORCPT ); Tue, 18 Nov 2008 12:27:19 -0500 DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=mime-version:in-reply-to:references:date:message-id:subject:from:to: cc:content-type:content-transfer-encoding; b=Eoz7mxBZn9GNJk3mwdDeiPcCU/CJhd22bkfcuWN2fT+8Gt2br+GvLQPLALPBnSFt2 pAy+BhffyPOnGL167jbIw== MIME-Version: 1.0 In-Reply-To: <1227011444.29743.15.camel@lappy.programming.kicks-ass.net> References: <20081115011452.GA28135@google.com> <49218FB4.6090805@nortel.com> <4921DFD8.9060509@nortel.com> <1226985548.29743.6.camel@lappy.programming.kicks-ass.net> <1227011444.29743.15.camel@lappy.programming.kicks-ass.net> Date: Tue, 18 Nov 2008 09:27:14 -0800 Message-ID: Subject: Re: busted CFS group load balancer? From: Ken Chen To: Peter Zijlstra Cc: Chris Friesen , Ingo Molnar , Linux Kernel Mailing List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1259 Lines: 33 On Tue, Nov 18, 2008 at 4:30 AM, Peter Zijlstra wrote: >> I'm also very troubled with this calculation in __update_group_shares_cpu(): >> >> shares = (sd_shares * rq_weight) / (sd_rq_weight + 1); >> >> Won't you have rounding problem here? value 'shares' will gradually >> decrease for each iteration of __update_group_shares_cpu()? > > Yes it will, however at the top of the sched-domain tree its reset. > > if (!sd->parent || !(sd->parent->flags & SD_LOAD_BALANCE)) > shares = tg->shares; Hmm? it is only true mostly on flat smp machine, or on numa system where task is woken up across a sched-domain. There is this code in try_to_wake_up(): for_each_domain(this_cpu, sd) { if (cpu_isset(cpu, sd->span)) { update_shares(sd); break; } } It doesn't iterate to the top half of the time on numa machine. - Ken -- 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/