Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp2322872pxb; Mon, 11 Jan 2021 06:55:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJx0MLVicdix19wlBen0UmYPwyJhLvlI7VHNLziIdMAGzyfLQiwFh6SqV6tyr1rd+8yaEXaA X-Received: by 2002:a50:8b02:: with SMTP id l2mr14091426edl.322.1610376922782; Mon, 11 Jan 2021 06:55:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610376922; cv=none; d=google.com; s=arc-20160816; b=SixMeEt2kHpaH//+NDYqGY0ujYQKuGs/aaQgcWd54T3BXe8Q/eRLbLNHiBl9SnqIbx h5zBDv2MniV9R/4iQ7L6+fApG0dVEe7r1U5BK8v0UYwPt+PFn3eIEaQiQhNzZeEWcj+1 GAjE8wpAstuG0O2Gip4m0lefB9AloGuXWqAKoS1Fi1tp6LoPPDpgSD3lpZTjsx17nnjV fP9DUwl4NZGClYt8yMC6RqNXr6nhJFASSmakX35sTuXqTYAQi8ttjhi/cTE3Yw1GiqLc QyB0IDISAcg1OE1WZ3sJcFBPD9pCil6e6EVgMlgelFWnFaJBuktUN/pcN+thX+PlxSev g07w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=cd6LNDxb/T9C1tLnPAcNFBbsDxBB86SlYkicnzgmtiM=; b=tYRg7v/NtC2XaRrJuNGeGfZ/rQhgDRmGfztEyS1cJdYUljfiqpHDA0sA6MPF8UuDyG +cRk6jKxn0B3dfw5XPKE7wvVW8dwrDpZdRfPQjj0AiN0Uw0xbRIGgovhv5ptiOqq06ZV EdYLAjGB64A15rfVZDIQhudf8tSJ9HGcAGSDNBRyR83sfZU/AHPbDUGL8TxffvQaJrG4 cHXVqdHFVArbyUn69Hp0HU1QXGPJDGi7SorMKZ4dw+RyrMd+JdnbX708WRiKmWfd5zMW FL7Mgp3KDd0ByuHoBSnMsB91rQaoTw1DLaCDpP46u/oWnvpGsaHyJbhsXEKrALKVH/0a RHFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eekP684i; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id p17si6510324ejw.23.2021.01.11.06.54.57; Mon, 11 Jan 2021 06:55:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eekP684i; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S2388076AbhAKOxM (ORCPT + 99 others); Mon, 11 Jan 2021 09:53:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42616 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733047AbhAKOxL (ORCPT ); Mon, 11 Jan 2021 09:53:11 -0500 Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D76CDC061786 for ; Mon, 11 Jan 2021 06:52:30 -0800 (PST) Received: by mail-lf1-x132.google.com with SMTP id b26so38091825lff.9 for ; Mon, 11 Jan 2021 06:52:30 -0800 (PST) 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=cd6LNDxb/T9C1tLnPAcNFBbsDxBB86SlYkicnzgmtiM=; b=eekP684iX5CvLUERIXRscg4JnyfKVUUG1V3uTqG+OfSlkzQYDtBjzZxmY70hSmaRnF lcsJqS7i1/40jlCQRI3B6ILKMPhiMpygP6xVWlYgqDuNEG1wAE3gqv/w6ROL+9BmggS1 KeJE4C5+trZTZ2sefsmhJrz0IGqR4cM1RO4dG+ybXV+Qt67n2dX1qo2uVTFk8Q6bB1Wx UOsUqFf1c9fFuDdHp3wZutQBgLzFOvnuqNkK1rDk7OkdVngm9WZ9OuhMt2GpuhSZBcQB rUNZq7rPGbUF278mTpqTd4iltctLnifik+B6WlkpQoRhPTefeCKUXJ2kC26aGxoVto4F Y50w== 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=cd6LNDxb/T9C1tLnPAcNFBbsDxBB86SlYkicnzgmtiM=; b=rwkkk4SVvp9FzQaBfKqkvAju4RJII//MY8d0ZKUquuIgprhf0tJ6r5fjB0ccDXIJRd hSEBeW96Ovgq3AISBGPsxs5ryWgT7kMGOp8bjuUOuFLid5IAh5n8/ppPvwISOSS7CSkx 7Ux3rS+JGYyOoOYnxOe6WiXnflSlP7WDhyAY9SqSSa4toFSR8rJzj7nKczq5+0D5+EJC NGfrVTrhECSEe77IH5Z3Yn2V2zbHlsbOaQpTE0oSzW+qcYJDgJnntB5Clog52NgsIlqU sbzqr7k+Bk/TTlfv7G1P5szEZOGKsX5L/uMH4JHf8TLfyiTfNagn9aKvPEJyXMpWo8RO /nuQ== X-Gm-Message-State: AOAM530VOMGyfIhERf+KfiGho9d8RIBGOXex80i4FQLWDDZTk1znj3FP z7dX2cy31U8dLFYn8kkfMQtShgaErTYpvo+uysmObg== X-Received: by 2002:a19:7718:: with SMTP id s24mr7765819lfc.277.1610376749388; Mon, 11 Jan 2021 06:52:29 -0800 (PST) MIME-Version: 1.0 References: <20201214164822.402812729@infradead.org> <20201214170017.877557652@infradead.org> <20201215075911.GA3040@hirez.programming.kicks-ass.net> <20210108102738.GB3592@techsingularity.net> <20210108144058.GD3592@techsingularity.net> In-Reply-To: From: Vincent Guittot Date: Mon, 11 Jan 2021 15:52:18 +0100 Message-ID: Subject: Re: [RFC][PATCH 1/5] sched/fair: Fix select_idle_cpu()s cost accounting To: Peter Zijlstra Cc: Mel Gorman , "Li, Aubrey" , linux-kernel , Ingo Molnar , Juri Lelli , Valentin Schneider , Qais Yousef , Dietmar Eggemann , Steven Rostedt , Ben Segall , Tim Chen , Jiang Biao Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 8 Jan 2021 at 20:49, Peter Zijlstra wrote: > > On Fri, Jan 08, 2021 at 04:10:51PM +0100, Vincent Guittot wrote: > > Another thing that worries me, is that we use the avg_idle of the > > local cpu, which is obviously not idle otherwise it would have been > > selected, to decide how much time we should spend on looking for > > another idle CPU. I'm not sure that's the right metrics to use > > especially with a possibly stalled value. > > The thinking was that if this CPU has little idle time, this CPU should > not spend a lot of time searching... > > That is; if we spend more time looking for places to run, than we have > idle time, we're loosing cycles we could've ran (supposedly useful) work. I understand the rationale of looking at previous avg idle time to decide how much time we can "waste" at looking at a cpu for the waking task. The problem is that this value is "stalled" and it gives us an idea of the duration of the next idle time but not really when the next idle time will happen, which can be in several seconds from now. And we can have already use this next avg_idle time for other wakeups search > > The only counter argument is tail latency.