Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp23503pxb; Wed, 24 Feb 2021 17:03:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJySS6Qwus8YXJAiuqg09iZuxDBBRn1bbBpr7uHIK6WNwomv9GS+vHeYjSd9N44ilEKZGOdr X-Received: by 2002:a17:906:b082:: with SMTP id x2mr333413ejy.100.1614215003661; Wed, 24 Feb 2021 17:03:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614215003; cv=none; d=google.com; s=arc-20160816; b=JpreapZmH5C82peTIygpD5NmCZPIvx7m5uyXPxXArSsBTmhrvevv8fsqwoSCXiYVNX RTvx/jC/LTeySextVMWZL16MxZeSHegBnNGYH/elBF851uXf3F+JTVvs4u9n5uKvhQHM mAq2C5n+lVyc7CSXWUUToz5E5YP6DPJh2PVEwLHlXzO6hTnSde4gsy1myT5wTEB1GwL0 SYYliGo4Tucq7ZuR/VVYK7/XHXzutsD2K2RQT9AZalEOdg+lME/ddiR7rKN4MTh8z6Xc EkGAnbZUJY5tBOQpDmiBaWe7XOaeBkEprchaoVJpmhoo12kh/s0ShXgjp5c0cZ2E/a/7 45Ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=1GQftM3uWmRhOrMJBKJCWIWOXHtZNY7YdAOBVUtpyO4=; b=yhywmJSeNTxnRFPSswbRY0tMCeRtxMOhNak9Bf6v0a40asZ6E6HHQDsp4dyqahZ3Ox unx8ijWcTQfVwsO+Xdkgby7YhBwOXbd3NwCS5f8nyy/JHqQ3/tCVphvPfqttQadZ0QGd x6qbVmot3TihFHj0sKfzwr73B6MDUaP3XMrMEC4Hef6LOasgTaQ2or66PsSc/EbzrGh6 mpbSc8L9N9mzXDClAbyQFCAJH6/hVXd5NW00DkcjltgYkaUZ9qc0EKEfy6w1umvPzFPH 2gW9wu7IvPPohawIHxkDmOa0XuI/pqZmWl2hDYLO/yBNpZXhyqoOXi8PqFtXbATzkieV gwPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=merlin.20170209 header.b=vNzvwGST; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b2si2462553ejk.68.2021.02.24.17.02.58; Wed, 24 Feb 2021 17:03:23 -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=@infradead.org header.s=merlin.20170209 header.b=vNzvwGST; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234385AbhBXQGE (ORCPT + 99 others); Wed, 24 Feb 2021 11:06:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236935AbhBXPy4 (ORCPT ); Wed, 24 Feb 2021 10:54:56 -0500 Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6EE53C061786 for ; Wed, 24 Feb 2021 07:54:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=1GQftM3uWmRhOrMJBKJCWIWOXHtZNY7YdAOBVUtpyO4=; b=vNzvwGSTnIQWojyLlnIhoVVEJC xSpv45Z+hXUdbYesOGmtSnIyuLYs8xZLQGSq7EkblncBvNXl8uxcWiKl3x2cZrvtEc+TLIHTM+Fz7 owl6ghZSztNZYzsbeLFnY3+4xoqMqvTqxR9+OEa5mvGTakNI06+97lHoQCUtD7n/4WPGwRLeUWS9n kuVth3XqHgB0J3K9iS0w62E3q+wWTuH2bX9ieu+pK8NlgKzAiOOOYYti4eRo7BxoFUNsxz5Lx6uh6 CKE9Db7X4Eppt4tXr6tWqGkwp1Dd/EdMFB/fgVjlxV5Br8AGB2y7n9akbb+gbHauDt8kq8/JZ50KK mkUcL87Q==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1lEwUA-00016l-JL; Wed, 24 Feb 2021 15:53:58 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 2172C301A32; Wed, 24 Feb 2021 16:53:54 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 1009F206D9577; Wed, 24 Feb 2021 16:53:54 +0100 (CET) Date: Wed, 24 Feb 2021 16:53:54 +0100 From: Peter Zijlstra To: Vincent Guittot Cc: mingo@redhat.com, juri.lelli@redhat.com, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, linux-kernel@vger.kernel.org, joel@joelfernandes.org, valentin.schneider@arm.com, fweisbec@gmail.com, tglx@linutronix.de, qais.yousef@arm.com Subject: Re: [PATCH 0/7 v4] move update blocked load outside newidle_balance Message-ID: References: <20210224133007.28644-1-vincent.guittot@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210224133007.28644-1-vincent.guittot@linaro.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 ?