Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757762Ab1EKQs5 (ORCPT ); Wed, 11 May 2011 12:48:57 -0400 Received: from fgwmail7.fujitsu.co.jp ([192.51.44.37]:45636 "EHLO fgwmail7.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757559Ab1EKQsz (ORCPT ); Wed, 11 May 2011 12:48:55 -0400 X-SecurityPolicyCheck-FJ: OK by FujitsuOutboundMailChecker v1.3.1 Message-ID: <4DCA4FD8.2050500@jp.fujitsu.com> Date: Wed, 11 May 2011 17:59:04 +0900 From: Hidetoshi Seto User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; ja; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 MIME-Version: 1.0 To: Mike Galbraith CC: Paul Turner , linux-kernel@vger.kernel.org, Peter Zijlstra , Bharata B Rao , Dhaval Giani , Balbir Singh , Vaidyanathan Srinivasan , Srivatsa Vaddagiri , Kamalesh Babulal , Ingo Molnar , Pavel Emelyanov Subject: Re: [patch 01/15] sched: (fixlet) dont update shares twice on on_rq parent References: <20110503092846.022272244@google.com> <20110503092904.541414484@google.com> <4DC8E5C2.9090701@jp.fujitsu.com> <1305016326.14565.2.camel@marge.simson.net> <4DCA40E8.3090805@jp.fujitsu.com> <1305103549.14389.6.camel@marge.simson.net> In-Reply-To: <1305103549.14389.6.camel@marge.simson.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3049 Lines: 79 (2011/05/11 17:45), Mike Galbraith wrote: > On Wed, 2011-05-11 at 01:13 -0700, Paul Turner wrote: >> On Wed, May 11, 2011 at 12:55 AM, Hidetoshi Seto >> wrote: >>> (2011/05/10 17:32), Mike Galbraith wrote: >>>> On Tue, 2011-05-10 at 16:14 +0900, Hidetoshi Seto wrote: >>>>> This small fixlet can stand alone. >>>>> Peter, how about getting this into git tree first? >>>> >>>> tip 2f36825b176f67e5c5228aa33d828bc39718811f contains the below. >>>> >>>> /* Don't dequeue parent if it has other entities besides us */ >>>> - if (cfs_rq->load.weight) >>>> + if (cfs_rq->load.weight) { >>>> + /* >>>> + * Bias pick_next to pick a task from this cfs_rq, as >>>> + * p is sleeping when it is within its sched_slice. >>>> + */ >>>> + if (task_sleep && parent_entity(se)) >>>> + set_next_buddy(parent_entity(se)); >>>> break; >>>> + } >>>> flags |= DEQUEUE_SLEEP; >>>> } >>> >>> Oh, thanks Mike! >>> It seems that this change in tip is better one. >>> >>> Paul, don't you mind rebasing your patches onto tip/sched/core next time? >>> (...or is there better branch for rebase?) >>> >> >> I thought I had but apparently I missed this. >> >> We still need to set se = parent_entity(se) to avoid the pointless >> double update below. >> >> Will definitely rebase. > > Wish I could, wouldn't have 114 other patches just to get evaluation > tree up to speed :) > > Index: linux-2.6.32/kernel/sched_fair.c > =================================================================== > --- linux-2.6.32.orig/kernel/sched_fair.c > +++ linux-2.6.32/kernel/sched_fair.c > @@ -1308,12 +1308,15 @@ static void dequeue_task_fair(struct rq > > /* Don't dequeue parent if it has other entities besides us */ > if (cfs_rq->load.weight) { > + /* Avoid double update below. */ > + se = parent_entity(se); > + > /* > * Bias pick_next to pick a task from this cfs_rq, as > * p is sleeping when it is within its sched_slice. > */ > - if (task_sleep && parent_entity(se)) > - set_next_buddy(parent_entity(se)); > + if (task_sleep && se) > + set_next_buddy(se); > break; > } > flags |= DEQUEUE_SLEEP; Nice! It will be better to put this fixlet out from the cfs-bandwidth series and post as a single patch. Thanks, H.Seto -- 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/