From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933054AbcLINSI (ORCPT ); Fri, 9 Dec 2016 08:18:08 -0500 Received: from mail-wm0-f49.google.com ([74.125.82.49]:34920 "EHLO mail-wm0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932595AbcLINSG (ORCPT ); Fri, 9 Dec 2016 08:18:06 -0500 Date: Fri, 9 Dec 2016 13:18:03 +0000 From: Matt Fleming To: Vincent Guittot Cc: peterz@infradead.org, mingo@kernel.org, linux-kernel@vger.kernel.org, Morten.Rasmussen@arm.com, dietmar.eggemann@arm.com, kernellwp@gmail.com, yuyang.du@intel.comc, umgwanakikbuti@gmail.com Subject: Re: [PATCH 1/2 v3] sched: fix find_idlest_group for fork Message-ID: <20161209131803.GA25617@codeblueprint.co.uk> References: <1481216215-24651-1-git-send-email-vincent.guittot@linaro.org> <1481216215-24651-2-git-send-email-vincent.guittot@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1481216215-24651-2-git-send-email-vincent.guittot@linaro.org> User-Agent: Mutt/1.5.24+41 (02bc14ed1569) (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 08 Dec, at 05:56:53PM, Vincent Guittot wrote: > During fork, the utilization of a task is init once the rq has been > selected because the current utilization level of the rq is used to set > the utilization of the fork task. As the task's utilization is still > null at this step of the fork sequence, it doesn't make sense to look for > some spare capacity that can fit the task's utilization. > Furthermore, I can see perf regressions for the test "hackbench -P -g 1" > because the least loaded policy is always bypassed and tasks are not > spread during fork. > > With this patch and the fix below, we are back to same performances as > for v4.8. The fix below is only a temporary one used for the test until a > smarter solution is found because we can't simply remove the test which is > useful for others benchmarks > > @@ -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) { > > Signed-off-by: Vincent Guittot > Acked-by: Morten Rasmussen > --- > kernel/sched/fair.c | 6 ++++++ > 1 file changed, 6 insertions(+) Tested-by: Matt Fleming Reviewed-by: Matt Fleming