Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933749AbcK2O55 (ORCPT ); Tue, 29 Nov 2016 09:57:57 -0500 Received: from mail-wj0-f177.google.com ([209.85.210.177]:33393 "EHLO mail-wj0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933468AbcK2O5s (ORCPT ); Tue, 29 Nov 2016 09:57:48 -0500 MIME-Version: 1.0 In-Reply-To: <20161129145041.GC1716@e105550-lin.cambridge.arm.com> References: <1480088073-11642-1-git-send-email-vincent.guittot@linaro.org> <1480088073-11642-2-git-send-email-vincent.guittot@linaro.org> <20161129105758.GA1716@e105550-lin.cambridge.arm.com> <20161129145041.GC1716@e105550-lin.cambridge.arm.com> From: Vincent Guittot Date: Tue, 29 Nov 2016 15:57:26 +0100 Message-ID: Subject: Re: [PATCH 1/2 v2] sched: fix find_idlest_group for fork To: Morten Rasmussen Cc: Peter Zijlstra , Ingo Molnar , linux-kernel , Matt Fleming , Dietmar Eggemann , Wanpeng Li , Yuyang Du , Mike Galbraith Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1675 Lines: 46 On 29 November 2016 at 15:50, Morten Rasmussen wrote: > On Tue, Nov 29, 2016 at 02:04:27PM +0100, Vincent Guittot wrote: >> On 29 November 2016 at 11:57, Morten Rasmussen wrote: >> > On Fri, Nov 25, 2016 at 04:34:32PM +0100, Vincent Guittot wrote: >> >> @@ -5708,13 +5708,6 @@ static int select_idle_cpu(struct task_struct *p, struct sched_domain *sd, int t >> >> >> >> avg_cost = this_sd->avg_scan_cost; >> >> >> >> - /* >> >> - * Due to large variance we need a large fuzz factor; hackbench in >> >> - * particularly is sensitive here. >> >> - */ >> >> - if ((avg_idle / 512) < avg_cost) >> >> - return -1; >> >> - >> >> time = local_clock(); >> >> >> >> for_each_cpu_wrap(cpu, sched_domain_span(sd), target, wrap) { >> > >> > I don't quite get this fix, but it is very likely because I haven't paid >> > enough attention. >> > >> > Are you saying that removing the avg_cost check is improving hackbench >> > performance? I thought it was supposed to help hackbench? I'm confused >> > :-( >> >> Yes, avg_cost check prevents some tasks migration at the end of the >> tests when some threads have already finished their loop letting some >> CPUs idle whereas others threads are still competing on the same CPUS > > Okay, thanks. > >> > Should we do the same for SD_BALANCE_EXEC? >> >> I asked myself if i should add SD_BALANCE_EXEC but decided to only >> keep SD_BALANCE_FORK for now as no regression has been raised for now. > > Fair enough. > > FWIW, with the label renaming suggested by mfleming, you can add my > reviewed/acked-by if you like. Thanks > > Morten