Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1525078pxb; Thu, 4 Feb 2021 15:42:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJyN13YZkqX13RnyquWpLJY77WLHz7mrJnfYGFYnbFiKTE/VqLoOswC2C2D4iRdApHQrqZZ0 X-Received: by 2002:a17:906:38c3:: with SMTP id r3mr1436380ejd.193.1612482127181; Thu, 04 Feb 2021 15:42:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612482127; cv=none; d=google.com; s=arc-20160816; b=Qvv104f506hyPitovnawQNktxs1cYN01hCwkvAoqlXhHj+8zPsAFpCVeQZ1ECItkdX Q573AGciii3VDv4IgPJdagy9BiKtavT+aKRwRnmc/fraYDYcBGRit8Uo7j6HvTLzfyx9 txcqFiYHEu9E4Y7IZ3d3AgmHMXaBRndW8t1k/SRvV44uD8jQ1do02APEEt5EbqZU1aYY zG7wws/cTbZOZuTXH8WA5jNlGAtxUa3DEk75taPsn2LY90fWc6ztFX5Xk21nUktRTQEK uJPsjo6NLgop55HHJdw50GO1w+LW8QCdbllFIrgWP/0eZ+XxhXB+RedwOSRlsTh++QVn kfzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=VJTeAIa9+T+3e2O3SCCYQe9LOGPCcru6CtSXr2nxv+Q=; b=bsftwtzMGZe0x2AiyadNeqKgjwnkS7WY99ieqC2LACi49SiQnfaURdVNbNs56JxzVe qIp7EJA1PbZVfADQlimEkxuU0z432EImvO5+ygUk194UEPYqtrdO5FfxbzFLV5ipltqB AplxqE3+llkynU0PSEak0ZxwiH64kELUtVu3nv9cXcYr9xpR3vblp78p58Ah9uxbpH4Z KZBCUP9BqTN3QQO5cXxi7R7il56xZv7Dp96sUklQ9QfEZE+OyauhXdWv8rMzWNDiC3Pe P0KnlcREHanHqwifoE5Fzye845QRGtH2ygFRqwGO4uR0U+HEiwfoUPLROeUBLViqi7nO yaLw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s26si1097829edi.495.2021.02.04.15.41.42; Thu, 04 Feb 2021 15:42:07 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235073AbhBDJsN (ORCPT + 99 others); Thu, 4 Feb 2021 04:48:13 -0500 Received: from foss.arm.com ([217.140.110.172]:54946 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233597AbhBDJsM (ORCPT ); Thu, 4 Feb 2021 04:48:12 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E758211D4; Thu, 4 Feb 2021 01:47:25 -0800 (PST) Received: from [192.168.178.6] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id BA86A3F719; Thu, 4 Feb 2021 01:47:22 -0800 (PST) Subject: Re: [PATCH] sched/fair: Rate limit calls to update_blocked_averages() for NOHZ To: Vincent Guittot Cc: Joel Fernandes , linux-kernel , Paul McKenney , Frederic Weisbecker , Qais Yousef , Ben Segall , Daniel Bristot de Oliveira , Ingo Molnar , Juri Lelli , Mel Gorman , Peter Zijlstra , Steven Rostedt , "Uladzislau Rezki (Sony)" , Neeraj upadhyay References: <20210122154600.1722680-1-joel@joelfernandes.org> <20210129172727.GA30719@vingu-book> <09367fac-5184-56d1-3c86-998b5f2af838@arm.com> From: Dietmar Eggemann Message-ID: Date: Thu, 4 Feb 2021 10:47:07 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/02/2021 14:12, Vincent Guittot wrote: > On Wed, 3 Feb 2021 at 12:54, Dietmar Eggemann wrote: >> >> On 29/01/2021 18:27, Vincent Guittot wrote: >>> Le vendredi 29 janv. 2021 � 11:33:00 (+0100), Vincent Guittot a �crit : >>>> On Thu, 28 Jan 2021 at 16:09, Joel Fernandes wrote: >>>>> >>>>> Hi Vincent, >>>>> >>>>> On Thu, Jan 28, 2021 at 8:57 AM Vincent Guittot >>>>> wrote: >>>>>>> On Mon, Jan 25, 2021 at 03:42:41PM +0100, Vincent Guittot wrote: >>>>>>>> On Fri, 22 Jan 2021 at 20:10, Joel Fernandes wrote: >>>>>>>>> On Fri, Jan 22, 2021 at 05:56:22PM +0100, Vincent Guittot wrote: >>>>>>>>>> On Fri, 22 Jan 2021 at 16:46, Joel Fernandes (Google) >>>>>>>>>> wrote: >> >> [...] >> >>>> The only point that I agree with, is that running >>>> update_blocked_averages with preempt and irq off is not a good thing >>>> because we don't manage the number of csf_rq to update and I'm going >>>> to provide a patchset for this >>> >>> The patch below moves the update of the blocked load of CPUs outside newidle_balance(). >>> >>> Instead, the update is done with the usual idle load balance update. I'm working on an >>> additonnal patch that will select this cpu that is about to become idle, instead of a >>> random idle cpu but this 1st step fixe the problem of lot of update in newly idle. >> >> I'm trying to understand the need for this extra patch. >> >> The patch below moves away from doing update_blocked_averages() (1) for >> all CPUs in sched groups of the sched domain: >> >> newidle_balance()->load_balance()-> >> find_busiest_group()->update_sd_lb_stats()->update_sg_lb_stats() >> >> to: >> >> calling (1) for CPUs in nohz.idle_cpus_mask in _nohz_idle_balance() via >> update_nohz_stats() and for the ilb CPU. >> >> newidle_balance() calls (1) for newidle CPU already. >> >> What would be the benefit to choose newidle CPU as ilb CPU? > > To prevent waking up another idle cpu to run the update whereas > newidle cpu is already woken up and about to be idle so the best > candidate. > All the aim of the removed code was to prevent waking up an idle cpu > for doing something that could be done by the newidle cpu before it > enters idle state Ah OK, makes sense. So the only diff would be that newidle CPU will call (1) on nohz.idle_cpus_mask rather on on sd->span. [...]