Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp22483pxb; Wed, 24 Feb 2021 17:02:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJyd7Ya3g4vBuHyB68IwrcQMAvbSM7NtK+2jRIZJIDupm91eKmotuF9fUFAff21Yxs9Xts5e X-Received: by 2002:a17:906:3881:: with SMTP id q1mr310912ejd.490.1614214919966; Wed, 24 Feb 2021 17:01:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614214919; cv=none; d=google.com; s=arc-20160816; b=uV9Mb0kNHfzyWpbZnM/BlmJPKGQ7F5RF5u80wIJp467oCQpFjY60k5BlGojL70l/54 w2QFx8W6Km+MKRL080CA4IUgYiIakQL3E70zW8rE6ly2CbUgPNLLah4f6ye1AdnZjk1N SLkIOjKIEsC99pBxXb9p0CZ7+ZXGeMquV3FeqPR0oeqGr6OFTTaRuDGskzgj3VFOY91A FFBzRl2Sc++kWujdrbVKiylE8wu0yY73T3RCFDXyP34N2U0EnOJvKWw0RA/JukcGDu18 HwkCSrtKtINmK7HoQjARDeSFJ0tjlOILAySQC9YYRawkFNAv18lPY4rweh418lUJw3Gv EFUg== 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=NLGrz3/Uw6AbL83VPY2iwaTGYzq9zF3B367Os3PAy3w=; b=qSAVj3vCy1XtGol3nMLGlr+39KYpM1ceahC0M9Xhen/vg3p7Y46WzQ2+MEcV0NIZgM lnOETtlkXDGu/dhi/GcSz96Oi/InDIr0zu6bnrl/iKuNbWPj/CZuapZVOcGoquYKv/z6 jxEHkMX9DJVqXHj0b8p2CEzsWiyWIV6Uar4/SEBhju20/vJ/2WFNDa1rQENT5TtZeHPI KD5ZnCgjMq5/UJ1mDx9bG2Ip1f3n3SehC1iS715PXfgfbUVqqm6y9KK1YJ/BASPN5JY0 yEspgpYdVP03LdzdTKvNyXGyCD5jTWpeoRP7iT2JdT9gZYzlGQrQE6O8ADCkEAnZxOzY F2Xw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=y3gZXjFV; 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 a6si2274229edu.356.2021.02.24.17.01.33; Wed, 24 Feb 2021 17:01:59 -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=y3gZXjFV; 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 S235463AbhBXQIR (ORCPT + 99 others); Wed, 24 Feb 2021 11:08:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46418 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236608AbhBXP6L (ORCPT ); Wed, 24 Feb 2021 10:58:11 -0500 Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C7A9C06178B for ; Wed, 24 Feb 2021 07:57:28 -0800 (PST) Received: by mail-lj1-x236.google.com with SMTP id m11so2098415lji.10 for ; Wed, 24 Feb 2021 07:57:28 -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=NLGrz3/Uw6AbL83VPY2iwaTGYzq9zF3B367Os3PAy3w=; b=y3gZXjFVqO69YD3O3IzLnWLvTxVrBEG8ErNbGpMknMp91Jy2GB2yFylvTnkrkxtAUi Qr+Rs81ZG2fZp+g6PdkDcWUIdFgu5QrLTUHg0XJhzDUY7uZG3Mk0A7tL5Ubmr+GmsyW6 ybaZK4zPOgbjNZyDQ31M1ctWJUuiD42yJnVZRy7S4wXaplJ/IzLOS3Ti7o77caiaJjNP xtHY/+IQ2McBugh9Rh0iArWSYoLuwCq1h0Gfp9f4NuZmLoANJ2grnDfy+UrmgSh6AaKT dLygEyRCmVr6SgkxhtKyP3PJwnNozsD6qqbHGGrnGb6ouBxdWHPlaWzejhCuJi/HcePz spAw== 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=NLGrz3/Uw6AbL83VPY2iwaTGYzq9zF3B367Os3PAy3w=; b=MoVqgBV8yeuqvev9EoF9SLZIEQS6P5w7aD8dA2bOPSgJcZs9vFFZzM4QmYADYz3VKd bohvrSiEkpbAkJZYNjVaD3zijU4kmMZVX8K4+R1mSr+csEr0UUDSEFhxdoi2bzhvYsLy cUIWpcvJxoJuH//IuhH9hBrvyJJsytokyZM85JEtT4l8vT68s1NX/u6zMosVO2qdiAw7 SNiICd39MWqslcOCeN9N5SGKy6qO+ammgPccECaAtpnMud4yhS5BQVPn6I7wlnK5DFfl ONIAqGHGSycGstLLI75j5sSkk5CAbxnX2wx0F8lHZsttRPlXO56Hgd+UiNcdG199P4rp melQ== X-Gm-Message-State: AOAM530AuDLGtxUvx7CsGA6Bh+pP6WyxPWFVXQOd8WXm8aheO/YVOkSM ghR3EUDQvHyH71hCMSIsAfdyQ5E1L4wQuOkPYQUopw== X-Received: by 2002:a05:651c:124b:: with SMTP id h11mr1370153ljh.401.1614182247029; Wed, 24 Feb 2021 07:57:27 -0800 (PST) MIME-Version: 1.0 References: <20210224133007.28644-1-vincent.guittot@linaro.org> In-Reply-To: From: Vincent Guittot Date: Wed, 24 Feb 2021 16:57:15 +0100 Message-ID: Subject: Re: [PATCH 0/7 v4] move update blocked load outside newidle_balance To: Peter Zijlstra Cc: Ingo Molnar , Juri Lelli , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , linux-kernel , Joel Fernandes , Valentin Schneider , Frederic Weisbecker , Thomas Gleixner , Qais Yousef Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 24 Feb 2021 at 16:54, Peter Zijlstra wrote: > > On Wed, Feb 24, 2021 at 02:30:00PM +0100, Vincent Guittot wrote: > > Joel reported long preempt and irq off sequence in newidle_balance because > > of a large number of CPU cgroups in use and having to be updated. This > > patchset moves the update outside newidle_imblance. This enables to early > > abort during the updates in case of pending irq as an example. > > > > Instead of kicking a normal ILB that will wakes up CPU which is already > > idle, patch 6 triggers the update of statistics in the idle thread of > > the CPU before selecting and entering an idle state. > > I'm confused... update_blocked_averages(), which calls > __update_blocked_fair(), which is the one doing the cgroup iteration > thing, runs with rq->lock held, and thus will have IRQs disabled any > which way around we turn this thing. > > Or is the problem that we called nohz_idle_balance(), which does > update_nohz_stats() -> update_blocked_averages() for evey NOHZ cpu from > newidle balance, such that we get NR_NOHZ_CPUS * NR_CGROUPS IRQ latency? > Which is now reduced to just NR_CGROUPS ? Yes we can now abort between each cpu update