Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp479317pxb; Tue, 9 Feb 2021 05:25:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJwiNss3+4LYn8EioaeAdDev2yn5EKtRgYCj8V/opYst0ac7Js4YxxZUpMknAkvklyMj6A+1 X-Received: by 2002:a17:906:cc47:: with SMTP id mm7mr22243507ejb.241.1612877112595; Tue, 09 Feb 2021 05:25:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612877112; cv=none; d=google.com; s=arc-20160816; b=s1O86mJAJGiQRhS+vKyxqKhieZvzcW0egI9NNMivDmaWGDspurlou/c/BCrO5XR6ce QnElrv6B2quIiqQhuoInaSD4dF5lJokNxd2Y/iuaIulBFxZVknOKPjWf1I0pkAvPBQSk sSm9aRD4Bug3/ADx/OVNZRH0E6wVh7fLwTs59mRaIaGly7gTV/vE6Fg/qa1P8Ip8eJA2 UJfuHafaDzHq48TFbB8ReonvMMYgNMwgqYqGP6cL3xE32spCgdeQKAwgrxJkmRoUnHpk lYv607iKHxTD/pyQhqfTgAAwmwHreKadOAdHonPcsmgN5lf+6HhPnov0CvlTyJjGq4Gn 3UJA== 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=jIznuqPDc4WvcNIY4tnB8bV1t0R6wmMK7Ffi0fzjZEQ=; b=OlW1+FKtNkRqjHnZ4/fFSmP9QcOmMXlD+8lyGfb14bvXnAmIrDD3K/JPWrw2iXw0Hh wIraa8HRYtzGqEfzJ7UyB8iwsBY7CEaCLLY0f3u89yger+v4QAoU7s4yczExXg7siuIm 4lhnNnqq5t7vjf/DUt4lRY0C6z2LyP4ecmkafx+WbmOOKyn4obhFb1iNw6rPTZSQr472 WQQnXlNX3Jq0v5i0YVvpaPKeoZj02ZZy+JtHoZsDSFKjBjI+I5/bxBDGP08RqHOF1URw HOdzaqA84kmsX1kaEhGczqVC8phH9/vFa6umK443CUlQs5W2xRxQDlTCn+OCOiZD1+4F oOtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="C/E0faOC"; 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 c18si15430029ede.504.2021.02.09.05.24.47; Tue, 09 Feb 2021 05:25:12 -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="C/E0faOC"; 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 S231404AbhBINVt (ORCPT + 99 others); Tue, 9 Feb 2021 08:21:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231217AbhBINVb (ORCPT ); Tue, 9 Feb 2021 08:21:31 -0500 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B36B2C061786 for ; Tue, 9 Feb 2021 05:20:50 -0800 (PST) Received: by mail-lf1-x12c.google.com with SMTP id v5so26070983lft.13 for ; Tue, 09 Feb 2021 05:20:50 -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=jIznuqPDc4WvcNIY4tnB8bV1t0R6wmMK7Ffi0fzjZEQ=; b=C/E0faOCxk4xQrO0aiwFquOnSAhJYhpZuGttCkoUkFavB30QPrcW6ne5ED10uVTMXR 4ZaHUIuJvib/g79QGrqZVVhF8EUzAS7M1YArw7y6C0QWKVxmMrz+3wlkT9BzfK5h+ZOG /pPSV7FSxr4TWgFWDDZpZIgObO7Q0fBdO5tMPaQNz81nx87H3E5Z73EHuVlJuss63ziZ u0vhjTEe6rrakrCufegj9+5Ii6gJbm6KujFWD6ILQgBXYk2MabWZl60zmU6owA2jovQK q1jhiay7GNEh/szULghLlJtFq4FE+gaWi6flPXHUfpeTcM8jZzF735LZ3+zDjC0XoFhQ 3ksw== 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=jIznuqPDc4WvcNIY4tnB8bV1t0R6wmMK7Ffi0fzjZEQ=; b=LDrLwXrSZenn3zKdeoMeBxhWPyNhiJPpqJ7IvmG+2gs2+MdaOOfmmaHkFAicUwa0nu g4qYOwpL8L84TeIUKJXw0IIhtyTCX0SppMpqUglRwGCJc2p8Kpc3XAZRtCDKhiBF23DX XtuX1FH3dbcwy+W57W5E38PDlhtC82tCDPlemFfG6ZpiilSnszNoDLHCwfUFxizS/Ba5 NAZMzT4CI7xuOyy3EWRY6mwOH7RyiGDZfMT11yJKkZdXQ+NuIRxXLU0RXQaVDMKVsIul Ou/agdWRBodOG4+1nyKK/rxfScvw2YkH+GrYtF+i0hzwI7Xorsqp7L3DM0KUlDw4sIbZ tjbQ== X-Gm-Message-State: AOAM533ISDwkngBQ4vQfjRjSPKu0Qb2roA3ZFzfv5g2JXMj1Vqx6jBXY KXD1f3NX7PBr3wmd/TqvE3MT/vV1Hu0npnAxOwgozg== X-Received: by 2002:ac2:5e62:: with SMTP id a2mr5637826lfr.277.1612876848252; Tue, 09 Feb 2021 05:20:48 -0800 (PST) MIME-Version: 1.0 References: <20210205114830.781-1-vincent.guittot@linaro.org> <20210205114830.781-2-vincent.guittot@linaro.org> In-Reply-To: From: Vincent Guittot Date: Tue, 9 Feb 2021 14:20:37 +0100 Message-ID: Subject: Re: [PATCH 1/6] sched/fair: remove update of blocked load from newidle_balance To: Valentin Schneider Cc: Ingo Molnar , Peter Zijlstra , Juri Lelli , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Frederic Weisbecker , Thomas Gleixner , Daniel Bristot de Oliveira , linux-kernel , Joel Fernandes , Qais Yousef Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 9 Feb 2021 at 14:09, Valentin Schneider wrote: > > On 05/02/21 12:48, Vincent Guittot wrote: > > @@ -10517,16 +10499,11 @@ static void nohz_newidle_balance(struct rq *this_rq) > > time_before(jiffies, READ_ONCE(nohz.next_blocked))) > > return; > > > > I was wondering whether all the conditions above were still relevant. I > think they are, but this one: > > /* Will wake up very soon. No time for doing anything else*/ > if (this_rq->avg_idle < sysctl_sched_migration_cost) > return; > > should have its comment updated to something like: > > /* > * Will wake up very soon. Blocked load will be updated > * periodically, no need to wake an idle CPU. > */ > > given kick_ilb() isn't the costliest of things. > > > - raw_spin_unlock(&this_rq->lock); > > /* > > - * This CPU is going to be idle and blocked load of idle CPUs > > - * need to be updated. Run the ilb locally as it is a good > > - * candidate for ilb instead of waking up another idle CPU. > > - * Kick an normal ilb if we failed to do the update. > > + * Blocked load of idle CPUs need to be updated. > > + * Kick an ILB to update statistics. > > */ > > - if (!_nohz_idle_balance(this_rq, NOHZ_STATS_KICK, CPU_NEWLY_IDLE)) > > - kick_ilb(NOHZ_STATS_KICK); > > - raw_spin_lock(&this_rq->lock); > > With this change, the return value of _nohz_idle_balance() is no longer > used. This means we could get rid of the tracking of whether it iterated > over all nohz CPUs or not. Yeah, the return is useless now > > > + kick_ilb(NOHZ_STATS_KICK); > > } > > > > #else /* !CONFIG_NO_HZ_COMMON */