Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753168AbbFAUms (ORCPT ); Mon, 1 Jun 2015 16:42:48 -0400 Received: from casper.infradead.org ([85.118.1.10]:52942 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751493AbbFAUmj convert rfc822-to-8bit (ORCPT ); Mon, 1 Jun 2015 16:42:39 -0400 Message-ID: <1433191354.11346.22.camel@twins> Subject: Re: [PATCH RESEND] sched: prefer an idle cpu vs an idle sibling for BALANCE_WAKE From: Peter Zijlstra To: Josef Bacik Cc: riel@redhat.com, mingo@redhat.com, linux-kernel@vger.kernel.org, umgwanakikbuti@gmail.com, morten.rasmussen@arm.com, kernel-team Date: Mon, 01 Jun 2015 22:42:34 +0200 In-Reply-To: <556CB4A8.1050509@fb.com> References: <1432761736-22093-1-git-send-email-jbacik@fb.com> <20150528102127.GD3644@twins.programming.kicks-ass.net> <20150528110514.GR18673@twins.programming.kicks-ass.net> <5568D43D.20703@fb.com> <556CB4A8.1050509@fb.com> Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT X-Mailer: Evolution 3.10.4-0ubuntu2 Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1166 Lines: 35 On Mon, 2015-06-01 at 15:38 -0400, Josef Bacik wrote: > Ok I got this patch to give me the same performance as all our other > crap, just need to apply this incremental > > > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > index b71eb2b..e11cfec 100644 > --- a/kernel/sched/fair.c > +++ b/kernel/sched/fair.c > @@ -4761,13 +4761,10 @@ select_task_rq_fair(struct task_struct *p, int > prev_cpu, int sd_flag, int wake_f > > if (tmp->flags & sd_flag) > sd = tmp; > - else if (!want_affine || (want_affine && affine_sd)) > - break; > } That bit worries me a bit, because that causes us to have a weird definition for what sd is. Without WAKE_AFFINE, sd is the biggest domain with BALANCE_WAKE (or any other sd_flag) set. But with WAKE_AFFINE, its the first domain that satisfies the wake affine constraint of covering both the previous and waking cpu. It basically reduces sd to affine_sd. -- 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/