Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp4441448ybp; Mon, 7 Oct 2019 08:29:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqxrXPSmIPXo7KqMeOxk34hhT3bj1G/UE0T93XVInUKDS0oIUdlkAcfeEsGt0D+SBait4Lz+ X-Received: by 2002:a05:6402:1251:: with SMTP id l17mr29616878edw.270.1570462199650; Mon, 07 Oct 2019 08:29:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570462199; cv=none; d=google.com; s=arc-20160816; b=oXaO+QyiynuR+RjeCXEi7oFp09ZfL4Mn3jgOwzeeKeFrsr9wZvaPkehIasi2L+fF2F C9CmAJeIlZPzns18JaJ48s+N2WAq8/aEzxWePKw3z9I9CpMSH8yqUS6n1kca2PhhTPU4 CdtgvWGTu6m6mlAcTrnvK7cj0wagz+3ivRw4dnlKhWY5f2UIrE0zNAFtrFn0PgtFTHsn nQNRqgbpsw6PuAHlY/lK0YcdHyC2V26Ubm9VtVMBOezw8/dMsWLZVDTK8bImYO8Ahbzn XAmgXYXjimiy54/wznX8vzoPskrnmDsj0YIZMk5225C4y1aeF3OTXG+mPKbWhiS9k4oI e1pw== 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=RuSSAKxVjo4ULUMqCK9nbWGblBOBwgw2OMwaKqEWY1I=; b=nWS/JtzrtMVtJJtvBG9sgu3JZvMjDDxNWOOx/ctuBfa8MLpG9i7IsO1ZP/br3DL3YT irlfYQYPNtTC8e62MXIuS/OVEjJ9DSWTrwiaJ+zbM930n8KtpM7+4HDMeVPbyl3bJ1SQ w7JYGlfAO7z4SN3sSaTVj0Bf96BOfT1qbgfgN2XGDeoJirWhM1uawNP3QylZnGfsEaNh 2o1aa6JUkYWEtAePYnm5gfjELDHx1DjLlH3aPtXEiC5/KrWTTOkb/Azkm1I1XLsqWDgw pUzaAWGy8u8QaLUtY98fnx3ZT+kQn5zmRWzlYibcdSmKpooK5t0A25+9iAtwdxp92D1w kTYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="ki0dU7/Q"; 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 x20si7164591ejb.393.2019.10.07.08.29.35; Mon, 07 Oct 2019 08:29:59 -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="ki0dU7/Q"; 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 S1728659AbfJGP1Y (ORCPT + 99 others); Mon, 7 Oct 2019 11:27:24 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:46659 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727835AbfJGP1Y (ORCPT ); Mon, 7 Oct 2019 11:27:24 -0400 Received: by mail-lj1-f194.google.com with SMTP id d1so14114751ljl.13 for ; Mon, 07 Oct 2019 08:27:22 -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=RuSSAKxVjo4ULUMqCK9nbWGblBOBwgw2OMwaKqEWY1I=; b=ki0dU7/QpkUKFEP+2XbFUIDoX367Pt75Dh80mCFt5AvFdgL/8/7vNypIrJBG84c7di SbsVdaGEtaJi0h94Xr02vTz4icSDTbgbbBRW69ohW4kV5MtXUVBh/jcf+x7ka1eQLwwa fGbdcZFrU4QmkWG+aXgViNVFsTDr8lWNkT61TNiQ1ssZR/XlF9oUXQP8lamVx2PLneQ/ UTkwnUnKkLSgXqfHyllNmngaQMSscB9ei/i8ti/yvOAz5Fo3sQF01Cbh6Dxc8sLBnG5x 1hEg0rq2hfbdrrX/VRaly7XDvOT2iCb7rCSZf/QtMm1sEHzz0/r5Vb/pXa4uhi0dRlZ2 X4Uw== 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=RuSSAKxVjo4ULUMqCK9nbWGblBOBwgw2OMwaKqEWY1I=; b=AQwHsjZ1YkcI1Jf1ObBHa3LkpQG/TIkuOfbfew6H0fI6csvXGFwJH/cQ6+qdeT9ujW Zo9+6N17l6AQjiZcw0jvik3/DABebJR83RdOr6SQgC95WOkc0aCizmBHiH7esZN2fY1F BMoYJoN9XWjXgiX0WYU3o1M+Yw2MKEt34xST5VFukrCLA24Hspfh1mRft6y3dSC+wDj7 voFxVYnHY4nzQGJvR5kIbPY83zaHuVO/wRZgGxucE5kH2klmaMyXQpx9KmqlMi3Za/5N fOi/16Wge7YhI5RK4G+iswIIzWKTHh5BBWIIz6AEc0kdrmuHbdV5KWthcjSUu6KhJdPQ lUjQ== X-Gm-Message-State: APjAAAUHqJyzs7vZ4+BnOWtKM9LZUCz0bZtL4CSlXPq7zD4ncygJKHt8 QXWSOBrrTN6hoXV/uyNz+vaJYYCw8/jUCOzvZ4fX8A== X-Received: by 2002:a2e:551:: with SMTP id 78mr19319941ljf.48.1570462041808; Mon, 07 Oct 2019 08:27:21 -0700 (PDT) MIME-Version: 1.0 References: <1568878421-12301-1-git-send-email-vincent.guittot@linaro.org> <1568878421-12301-10-git-send-email-vincent.guittot@linaro.org> In-Reply-To: From: Vincent Guittot Date: Mon, 7 Oct 2019 17:27:10 +0200 Message-ID: Subject: Re: [PATCH v3 09/10] sched/fair: use load instead of runnable load in wakeup path To: Rik van Riel Cc: linux-kernel , Ingo Molnar , Peter Zijlstra , Phil Auld , Valentin Schneider , Srikar Dronamraju , Quentin Perret , Dietmar Eggemann , Morten Rasmussen , Hillf Danton 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 Mon, 7 Oct 2019 at 17:14, Rik van Riel wrote: > > On Thu, 2019-09-19 at 09:33 +0200, Vincent Guittot wrote: > > runnable load has been introduced to take into account the case where > > blocked load biases the wake up path which may end to select an > > overloaded > > CPU with a large number of runnable tasks instead of an underutilized > > CPU with a huge blocked load. > > > > Tha wake up path now starts to looks for idle CPUs before comparing > > runnable load and it's worth aligning the wake up path with the > > load_balance. > > > > Signed-off-by: Vincent Guittot > > On a single socket system, patches 9 & 10 have the > result of driving a woken up task (when wake_wide is > true) to the CPU core with the lowest blocked load, > even when there is an idle core the task could run on > right now. > > With the whole series applied, I see a 1-2% regression > in CPU use due to that issue. > > With only patches 1-8 applied, I see a 1% improvement in > CPU use for that same workload. Thanks for testing. patch 8-9 have just replaced runnable load by blocked load and then removed the duplicated metrics in find_idlest_group. I'm preparing an additional patch that reworks find_idlest_group() to behave similarly to find_busiest_group(). It gathers statistics what it already does, then classifies the groups and finally selects the idlest one. This should fix the problem that you mentioned above when it selects a group with lowest blocked load whereas there are idle cpus in another group with high blocked load. > > Given that it looks like select_idle_sibling and > find_idlest_group_cpu do roughly the same thing, I > wonder if it is enough to simply add an additional > test to find_idlest_group to have it return the > LLC sg, if it is called on the LLC sd on a single > socket system. That make sense to me > > That way find_idlest_group_cpu can still find an > idle core like it does today. > > Does that seem like a reasonable thing? That's worth testing > > I can run tests with that :) > > -- > All Rights Reversed.