Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp3566748pxv; Mon, 19 Jul 2021 03:32:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxqRJvaKMWUOVz6SNKgSvTMljyd3Twuea2Ag0US3vG01ILFFuc93GJuyC2XcunMJ/UwLvwN X-Received: by 2002:a02:c013:: with SMTP id y19mr21168775jai.36.1626690729546; Mon, 19 Jul 2021 03:32:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626690729; cv=none; d=google.com; s=arc-20160816; b=cVa8Wh7xO7iyPSvkvbqLDwqlV5ojph/C6hSAI7CdrWG3rCgxIjZqdEkwoAc+kKT2yj 9oCO8a8tEYYCipj19iU0VTyZcaC1tr+MnCVdLoj6msCOZ/IZwPE6371jJVCGcP1BvFHT 8HUuDIXxTZfM2+qaH3RNfbfV9hg2/+Sbsx4PJ1f8LLNqU1BiclvQySYiVjVg8semjGQ4 tJ/34jSlPbCtmpHsk955TMgCtoLHvNzcTjMHX4a/ovqoOB0FzBcG7eO3NTnY0XuWQ9Re UxPFsNPfsb/gtcaPau9In+Ne7ibSuoUG6/2LvRLUhusLPr3JhdzoIxMDxVm/ej1Pe3J8 yDVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=rWYtUIE95fpOqAShjFgYKPIPNcbJhsHVk7FnqMgU3eU=; b=LfSNLIQx+/E1YbA9gU/JyEDVzp9bKnfA2Ezs7Fkua1GXbE2xZ2xgzqhCL+AheYSML0 YDfi5VDoZVd2fbpbYZTNk8l/3Oxutc4PlFf7KdYscTxWQPkFBfUsoveUaCVKlEeC0eXS LwvlEol3y+C+bSrdAsH/YdfKfNH58n+thZt9ZBw9L+UiC22b3YAPL6g+hQmkJAA0IB/v tgCH/mFaUCp1NFP/vzctSdl6gtjL4ZexeWRHmpIj/aw1U6b5kakNCmnMubeeBVxilRWy p5rjGn2kaEgHGtVVKN9ecFLpQCJxMcYvUXgdwiM+Q6xo8AHKhYx295vqgtXqYNqHxcn+ 15pQ== 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 o18si22708706jah.71.2021.07.19.03.31.57; Mon, 19 Jul 2021 03:32:09 -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 S236244AbhGSJus (ORCPT + 99 others); Mon, 19 Jul 2021 05:50:48 -0400 Received: from foss.arm.com ([217.140.110.172]:55006 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235172AbhGSJun (ORCPT ); Mon, 19 Jul 2021 05:50:43 -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 921F46D; Mon, 19 Jul 2021 03:31:23 -0700 (PDT) Received: from e113632-lin.cambridge.arm.com (e113632-lin.cambridge.arm.com [10.1.194.46]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id A19A13F73D; Mon, 19 Jul 2021 03:31:22 -0700 (PDT) From: Valentin Schneider To: linux-kernel@vger.kernel.org Cc: Peter Zijlstra , Ingo Molnar , Vincent Guittot , Dietmar Eggemann Subject: [PATCH v2 0/2] sched/fair: nohz.next_balance vs newly-idle CPUs Date: Mon, 19 Jul 2021 11:31:15 +0100 Message-Id: <20210719103117.3624936-1-valentin.schneider@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi folks, The single patch has grown a sibling, and a cover letter along with it. This was caught up by our testing on an arm64 RB5 board - that's an 8 CPUs DynamIQ SoC with 4 littles, 3 mediums and 1 big. It seems to rely more on NOHZ balancing than our other boards being tested, which highlighted that not including a newly-idle CPU into nohz.next_balance can cause issues (especially when the other CPUs have had their balance_interval inflated by pinned tasks). As suggested by Vincent, the approach here is to mimic what was done for nohz.has_blocked, which gives us sane(ish) ordering guarantees. Revisions ========= v1 -> v2 ++++++++ o Ditched the extra cpumasks and went with a sibling of nohz.has_blocked (Vincent) Cheers, Valentin Valentin Schneider (2): sched/fair: Add NOHZ balancer flag for nohz.next_balance updates sched/fair: Trigger nohz.next_balance updates when a CPU goes NOHZ-idle kernel/sched/fair.c | 24 +++++++++++++++++++----- kernel/sched/sched.h | 8 +++++++- 2 files changed, 26 insertions(+), 6 deletions(-) -- 2.25.1