Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754678Ab1EGGdq (ORCPT ); Sat, 7 May 2011 02:33:46 -0400 Received: from smtp-out.google.com ([74.125.121.67]:50630 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753835Ab1EGGcw (ORCPT ); Sat, 7 May 2011 02:32:52 -0400 DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=message-id:user-agent:date:from:to:cc:subject:references:content-disposition; b=iEUtp/t87+QCGzT0UH8/yPpIcCIKcJP5cmPL2RBn0FU9AuCyy+EvlMo/wCCwa8wBZ Z73aaQom8rJa1cvCSFmWQ== Message-Id: <20110503092904.541414484@google.com> User-Agent: quilt/0.48-1 Date: Tue, 03 May 2011 02:28:47 -0700 From: Paul Turner To: linux-kernel@vger.kernel.org Cc: Peter Zijlstra , Bharata B Rao , Dhaval Giani , Balbir Singh , Vaidyanathan Srinivasan , Srivatsa Vaddagiri , Kamalesh Babulal , Ingo Molnar , Pavel Emelyanov Subject: [patch 01/15] sched: (fixlet) dont update shares twice on on_rq parent References: <20110503092846.022272244@google.com> Content-Disposition: inline; filename=sched-bwc-fix_dequeue_task_buglet.patch Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1192 Lines: 35 In dequeue_task_fair() we bail on dequeue when we encounter a parenting entity with additional weight. However, we perform a double shares update on this entity since we continue the shares update traversal from that point, despite dequeue_entity() having already updated its queuing cfs_rq. Avoid this by starting from the parent when we resume. Signed-off-by: Paul Turner --- kernel/sched_fair.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) Index: tip/kernel/sched_fair.c =================================================================== --- tip.orig/kernel/sched_fair.c +++ tip/kernel/sched_fair.c @@ -1355,8 +1355,10 @@ static void dequeue_task_fair(struct rq dequeue_entity(cfs_rq, se, flags); /* Don't dequeue parent if it has other entities besides us */ - if (cfs_rq->load.weight) + if (cfs_rq->load.weight) { + se = parent_entity(se); break; + } flags |= DEQUEUE_SLEEP; } -- 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/