From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 19914C07E9B for ; Mon, 19 Jul 2021 10:31:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EFCD160FF4 for ; Mon, 19 Jul 2021 10:31:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236280AbhGSJus (ORCPT ); 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