From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932312AbcEXIMU (ORCPT ); Tue, 24 May 2016 04:12:20 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:35243 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932265AbcEXIME (ORCPT ); Tue, 24 May 2016 04:12:04 -0400 Message-ID: <1464077520.3743.48.camel@gmail.com> Subject: Re: [PATCH 04/16] sched/fair: Optimize find_idlest_cpu() when there is no choice From: Mike Galbraith To: Morten Rasmussen Cc: peterz@infradead.org, mingo@redhat.com, dietmar.eggemann@arm.com, yuyang.du@intel.com, vincent.guittot@linaro.org, linux-kernel@vger.kernel.org Date: Tue, 24 May 2016 10:12:00 +0200 In-Reply-To: <20160524080557.GD27946@e105550-lin.cambridge.arm.com> References: <1464001138-25063-1-git-send-email-morten.rasmussen@arm.com> <1464001138-25063-5-git-send-email-morten.rasmussen@arm.com> <1464071345.3743.22.camel@gmail.com> <20160524080557.GD27946@e105550-lin.cambridge.arm.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.16.5 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2016-05-24 at 09:05 +0100, Morten Rasmussen wrote: > On Tue, May 24, 2016 at 08:29:05AM +0200, Mike Galbraith wrote: > > > > > +> > > > > > > > /* Check if we have any choice */ > > > +> > > > > > > > if (group->group_weight == 1) { > > > +> > > > > > > > > > > > > > > return cpumask_first(sched_group_cpus(group)); > > > +> > > > > > > > } > > > + > > > > Hm, if task isn't allowed there, too bad? > > Is that possible for single-cpu groups? I thought we skipped groups with > no cpus allowed in find_idlest_group(): > > /* Skip over this group if it has no CPUs allowed */ > if (!cpumask_intersects(sched_group_cpus(group), > tsk_cpus_allowed(p))) > continue; > > Since the group has at least one cpu allowed and only contains one cpu, > that cpu must be allowed. No? Yup, you're right, handled before we got there. -Mike