Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp1789602ybh; Fri, 13 Mar 2020 07:27:37 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsbqHop7rWulBuP5DeCF2u7XZyvtLUqZx2Tq88WuT57S216/47eJPgDgoZERTp3eWE4uZWU X-Received: by 2002:aca:5dc3:: with SMTP id r186mr7171473oib.137.1584109657762; Fri, 13 Mar 2020 07:27:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584109657; cv=none; d=google.com; s=arc-20160816; b=0M6ky532GBVVP6LJSdchGuuKoTvZldQ8b+yH9W9S91ymvL2El57R8Q6x/7ScVEyNX4 BrsWYgP1R7VuKAcNSK8cuk3xrYnJdwiw1pJSMxRcsEyGRJaU96wGnlEt1ubb7aTo9ChH roeW2klMJZW3HJO9wOJaUWxgHPLFH3Br3vX+uyEa7NDeoFQKQhhciddMsoEJlZfbNRd3 krTXvOsckPGvoBj4DaIgOcgoUlEldU6oBbuyBDuZSMH4eLvCH7NW1HmPQPuM0A5TTW8C MLEq4pl/m6R4ty9i1VC1o1ng8J8midSXRJba23oQNE4uv+mR1gJrfAbXVKTmi9IUYRMm Ak+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=irAtZlhE5ipoJ5Rehur7bBbjUX7Tu4nfN7dSklsY0vM=; b=sqHXQHSWU/kzTqxDodMFk4dMvJIhns3fzCWPM7Vso1jPSdDgqfWU6XCMCdSYHdnu5p jiFv6RaSq6LHZPHluj5a3VHPfx78uUsi8U/B+mK1VNo5CuOx/2gPRxSHg9wnRIF3bQYt jCkmpNtky/35nXUTcrCTQXP4+LYcD/Y2c78VzkHG88o6ZarHMI5b7sZ0Q3OGPUj5Hhj1 AlCSroK8U7wc1DD/RYz4qLUHxj1Zb0wKDth096IKLzpH+RibHXxnPVi0sm6T6jARTg1F 9Ri+XU9g5hlQqUpi7pbGWlLQpKFmS2zsoP8uHI9fGGFGnzodDl/Pfp7uQmusSISYzncI JV4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JOJEh8ex; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y15si4451979otk.125.2020.03.13.07.27.24; Fri, 13 Mar 2020 07:27:37 -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; dkim=pass header.i=@linaro.org header.s=google header.b=JOJEh8ex; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726882AbgCMO0e (ORCPT + 99 others); Fri, 13 Mar 2020 10:26:34 -0400 Received: from mail-lf1-f66.google.com ([209.85.167.66]:46344 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726845AbgCMO0e (ORCPT ); Fri, 13 Mar 2020 10:26:34 -0400 Received: by mail-lf1-f66.google.com with SMTP id r9so2535288lff.13 for ; Fri, 13 Mar 2020 07:26:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=irAtZlhE5ipoJ5Rehur7bBbjUX7Tu4nfN7dSklsY0vM=; b=JOJEh8exqosUoHPcE3n8pKuCgoQXEn4uSLEBKIUdIHmmBBIsP1LisJYUJeRkhIPlBu Cz+2skfbMRBy/mMsI8N4Q3PveOU9yMt46Vg8s/vmU1Lm0Z1k6mKG7XI2Dk61LWO5fleK 9VaW02uaQZbV/5EpDOzz2i4mst3q9Eo/ynSrH5L3talwAMNQiyQiJMkXF30fnjEztaHo 4LqJEi8qn73GCe1kdj8CtGkezTGLwByCRJ9hlC4on/bG9dER0jKvoWG80Ln5grW+Y7Co EXXZmAPkW+w4f6NpPhG6wZNkwOqB2xJJ2UpGJJXlc+HsaqjQlObOM1JPv6/1bMkI7+8P e9Jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=irAtZlhE5ipoJ5Rehur7bBbjUX7Tu4nfN7dSklsY0vM=; b=KgotiaJzyzip7CCJTPbemvvVZt9KoOBODUoLLlAILJ1WbHYasNZlvii5SGVRp8URLQ EhXRlYua5GKUatV/EkqwV5KQkbQoUcXI5fNKPNU07DAt3E2p5Xg2w1G8l57hNUcjWDFp 8X9ghaV+oYDwa995PqcuSXk+mKGfqj2pOAbt3asXF6xf272LY+JeGaZwbSSXnSum7mSQ gKtNd29+/JsrYDThy1Hw7OjbIO4Y6I2WDrUpCQqZSGzNhwIOXbfq1wbtr9UQsXewUdoh DB0k2GCdOqCbgwgoAqZ1LGpL2/TlyDh27hFCynIUuProLAzmXwewokezKuxGTGoGUGLb wc0A== X-Gm-Message-State: ANhLgQ3CNYEjaeB6ZZrz2eC9Zd0Ln6l0dtqTr1P6kuJ7ZvdLQ1agStMF 8S4TH2yUxonTBJykwsHbRVmvSO0vjNvXgwIZPS6VnA== X-Received: by 2002:ac2:522e:: with SMTP id i14mr5481302lfl.133.1584109592111; Fri, 13 Mar 2020 07:26:32 -0700 (PDT) MIME-Version: 1.0 References: <20200312165429.990-1-vincent.guittot@linaro.org> In-Reply-To: From: Vincent Guittot Date: Fri, 13 Mar 2020 15:26:20 +0100 Message-ID: Subject: Re: [PATCH] sched/fair: improve spreading of utilization To: Valentin Schneider Cc: Ingo Molnar , Peter Zijlstra , Juri Lelli , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , linux-kernel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 13 Mar 2020 at 13:55, Vincent Guittot wrote: > > On Fri, 13 Mar 2020 at 13:42, Valentin Schneider > wrote: > > > > > > On Fri, Mar 13 2020, Valentin Schneider wrote: > > > 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. > > > > > > > And with more coffee that's another Doh, ASYM_PACKING would end up as > > migrate_task. So this only affects the reduced capacity migration, which > > yes ASYM_PACKING uses migrate_task and the case of reduced capacity > would use it too and would not be impacted by this patch. I say > "would" because the original rework of load balance got rid of this > case. I'm going to prepare a separate fix for this After more thought, I think that we are safe for reduced capacity too because this is handled in the migrate_load case. In my previous reply, I was thinking of the case where rq is not overloaded but cpu has reduced capacity which is not handled. But in such case, we don't have to force the migration of the task because there is still enough capacity otherwise rq would be overloaded and we are back to the case already handled > > > might be hard to notice in benchmarks.