Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp1616040ybh; Fri, 13 Mar 2020 04:29:46 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvPRRmLBD1lmuJfFpXIoVzUwffY895OQRXtTNIXM/XFJhK1dqVlmk4LhaE6c9u3lVVbKKqR X-Received: by 2002:aca:1015:: with SMTP id 21mr6187950oiq.101.1584098986399; Fri, 13 Mar 2020 04:29:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584098986; cv=none; d=google.com; s=arc-20160816; b=xQTOyeBAK9DyWvkxGPXO3VVKSV8UIdbMwRehGn1fsg6TffVMw5uuFFFl2AV+ydHcLq HGMPWVzQisAzyb45NH2xqx0Z5a14+CAEXiY7GA220ltJOJfk/+8sXY4Ostq7DztpU1Vt ZEDW67iSGD8KJEwlgv8DgDCoOqeNe56yeUOUKXDVil7nE8QUSMOP/cBVYTdIhCPeECD+ CLJCt6ULRgSb1Tj1pfrPUOYQwFKzCQeQ4+g1M7Qqku6ARsp8IDn83uSYGYhA+GgQO5yp hVjq0ghHQcIkrZNkUZnqJ9a44tIOVxSGAda2xbhl8Fwzrr9NAV84sJPtQ1PLqzo02I1k frfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:in-reply-to :subject:cc:to:from:user-agent:references; bh=r3qC89rlBCP0RHzGL1jkbJFGsxALiQJDLSBjfe6hV2Y=; b=dSHmUQekZsybWMvW+lTPEQuuteZ7M/7+o1Qvqe9aHooiJRcqatdA1zRXKIixo0XwgW TtFre5P9mQhnRG5CTQM3FiTz4dm37Ty/uuTmjpQW6tbhg3jwKJxdVVU6BEc+KKXOGsU1 bkvXQQPnnzgq1QxedUecPgEW68uudzeZwHYo1EoZrQ/2QeiuXp9/W+lkCDnDIX4G1X40 ffpyvlDR0sdkm+NKt3j4CYXaEVfxACHl7FS3skTw+ToxWWl2IX1pcnsLQ9rF6hCXlBU3 vhuIvqVJEV/tSgPG4GHIn3blZpvFuiHPCwE+bnKQPnrPQvWpMzDRryYEIVGoyKL8+NKo U4zA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b204si3803615oif.69.2020.03.13.04.29.33; Fri, 13 Mar 2020 04:29:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726595AbgCML3A (ORCPT + 99 others); Fri, 13 Mar 2020 07:29:00 -0400 Received: from foss.arm.com ([217.140.110.172]:52878 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726423AbgCML27 (ORCPT ); Fri, 13 Mar 2020 07:28:59 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5520E30E; Fri, 13 Mar 2020 04:28:59 -0700 (PDT) Received: from e113632-lin (e113632-lin.cambridge.arm.com [10.1.194.46]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 048223F534; Fri, 13 Mar 2020 04:28:57 -0700 (PDT) References: <20200312165429.990-1-vincent.guittot@linaro.org> User-agent: mu4e 0.9.17; emacs 26.3 From: Valentin Schneider To: Vincent Guittot Cc: Valentin Schneider , Ingo Molnar , Peter Zijlstra , Juri Lelli , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , linux-kernel Subject: Re: [PATCH] sched/fair: improve spreading of utilization In-reply-to: Date: Fri, 13 Mar 2020 11:28:55 +0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 13 2020, Vincent Guittot wrote: >> > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c >> > index 3c8a379c357e..97a0307312d9 100644 >> > --- a/kernel/sched/fair.c >> > +++ b/kernel/sched/fair.c >> > @@ -9025,6 +9025,14 @@ static struct rq *find_busiest_queue(struct lb_env *env, >> > case migrate_util: >> > util = cpu_util(cpu_of(rq)); >> > >> > + /* >> > + * Don't try to pull utilization from a CPU with one >> > + * running task. Whatever its utilization, we will fail >> > + * detach the task. >> > + */ >> > + if (nr_running <= 1) >> > + continue; >> > + >> >> Doesn't this break misfit? If the busiest group is group_misfit_task, it >> is totally valid for the runqueues to have a single running task - >> that's the CPU-bound task we want to upmigrate. > > group_misfit_task has its dedicated migrate_misfit case > Doh, yes, sorry. I think my rambling on ASYM_PACKING / reduced capacity migration is still relevant, though. >> >> If the busiest rq has only a single running task, we'll skip the >> detach_tasks() block and go straight to the active balance bits. >> Misfit balancing totally relies on this, and IMO ASYM_PACKING does >> too. Looking at voluntary_active_balance(), it seems your change also >> goes against the one added by >> 1aaf90a4b88a ("sched: Move CFS tasks to CPUs with higher capacity") >> >> The bandaid here would be gate this 'continue' with checks against the >> busiest_group_type, but that's only a loose link wrt >> voluntary_active_balance(). >> >> > if (busiest_util < util) { >> > busiest_util = util; >> > busiest = rq;