Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp4442878pxv; Tue, 20 Jul 2021 04:02:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz+sNfXumthOc3oNGXKeiB4sKD/c3L/hwOAwypiS2ld0uHXflKiscIrgWKkPiueCJMGve2/ X-Received: by 2002:a92:c10d:: with SMTP id p13mr19797388ile.83.1626778926492; Tue, 20 Jul 2021 04:02:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626778926; cv=none; d=google.com; s=arc-20160816; b=FM3RJvyZmEwCpLXlS5C649rLObWtxLFcYO67KdFRS/wFlNfIBPNtJX//nFhphGr930 OM1hOtF+/eIupTIRjLtXVAS+5pW7G47ORjMfdPQFvc8oPSZqCkaNaQaYAXdsVjj4gi0S mBxbV/fLJ8pGIv3i3eXPmMx/7BMs9o8HCPcdntNES6qy3SwXqFuIOA722cOZNwIf3MWk UBP06DFjM6YmHqqY9IPUEyXaujkmsvR/Jhu6T5zqz9yCsFfoWlvmfD27P+JFcmeV/x5e Ci9tw5k+Rf3qZw1lqd/faZjx34RG3QcEMS/uS7PnRHgq/mT57TCvpgbC1jkZKFUMKM4E WBDg== 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=dHMQD7dJL9/KZmFexdQIhEM+N6gUioP0veXjNheyWvM=; b=Wfj+3iTXQi7vzN8LccdN5H0MR269H0M7RCs4ny7Y2pyBn0BDvFqMUzJir4OiFec7lL 8l6eF7xNzmi7bKQh+m+1Jxb9M8oMWUIokEwOkbFAoC2O4KKeEfc3bzPQZIn87lG5dv/O DG6yDw7cSeCTzAHGXkKeqKpEQcA4etEjZiBPnUl1E6ZhiYkFhkZACmqQuhisJ4O049BK Z3qpK57633xuzjmbPn0kKWWqD3QsA7Q0HQmKI+w5lqf35j8LUtAyu/iiou5w9bQsalFH g2o9wCLhVx3SjaMuKEOr90KzxL1NDL6QwLqkffW8cfUbAlkoFGbJUKtq2ei9OkVzBY4y Q+Zw== 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 j25si12151681jaj.93.2021.07.20.04.01.55; Tue, 20 Jul 2021 04:02:06 -0700 (PDT) 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 S235975AbhGTKU0 (ORCPT + 99 others); Tue, 20 Jul 2021 06:20:26 -0400 Received: from foss.arm.com ([217.140.110.172]:55878 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237769AbhGTKGy (ORCPT ); Tue, 20 Jul 2021 06:06:54 -0400 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 3896C6D; Tue, 20 Jul 2021 03:47:27 -0700 (PDT) Received: from [192.168.178.6] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 557303F73D; Tue, 20 Jul 2021 03:47:26 -0700 (PDT) Subject: Re: [PATCH v2 2/2] sched/fair: Trigger nohz.next_balance updates when a CPU goes NOHZ-idle To: Valentin Schneider , linux-kernel@vger.kernel.org Cc: Peter Zijlstra , Ingo Molnar , Vincent Guittot References: <20210719103117.3624936-1-valentin.schneider@arm.com> <20210719103117.3624936-3-valentin.schneider@arm.com> <878s22mfnn.mognet@arm.com> From: Dietmar Eggemann Message-ID: Date: Tue, 20 Jul 2021 12:47:21 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <878s22mfnn.mognet@arm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19/07/2021 18:28, Valentin Schneider wrote: > On 19/07/21 17:24, Dietmar Eggemann wrote: >> On 19/07/2021 12:31, Valentin Schneider wrote: [...] >>> * Ensures that if we miss the CPU, we must see the has_blocked >>> @@ -10531,6 +10540,8 @@ static void _nohz_idle_balance(struct rq *this_rq, unsigned int flags, >>> if (need_resched()) { >>> if (flags & NOHZ_STATS_KICK) >>> has_blocked_load = true; >> >> This looks weird now? 'has_blocked_load = true' vs >> 'WRITE_ONCE(nohz.needs_update, 1)'. >> > > Well, has_blocked_load lets us factorize the nohz.has_blocked write > (one is needed either when aborting or at the tail of the cpumask > iteration), whereas there is just a single write for nohz.needs_update > (when aborting). You're right. Looks good then. [...]