Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp2714292pxb; Thu, 3 Feb 2022 12:33:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJw/M4eUtM2LCXEgtseGCe2YrPqly26XmdMPyVkIkwcSTTgjihJ4kdn5qg2SFo48txiWeb+2 X-Received: by 2002:a17:90a:8592:: with SMTP id m18mr15839471pjn.142.1643920429253; Thu, 03 Feb 2022 12:33:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643920429; cv=none; d=google.com; s=arc-20160816; b=p5m/Bp2kpw9G71i+4YZFep1QHP7j1X1jMKiR1BbBjXwQgmHCSXBbEcyL+HXWhHgExe y3O2OC0VEcBJ1rLe2K2WLm6kwIaF52urZjFj+XebRSzv081UDCkHpdgnhClYJzkw9KH8 S+2R48Z2yGEclnqelsk3IPvUqoUxGgHGp09jC+Ya2pc/2vNE8ZX6GleUCZ8ae84OOAqE EJKeuocKj3OF77rQ6AGq18rMd3uDovHxPEG3eJswHMuMtmIsyPsrWE4hNGw4KqU9yCGF R6Y7/oLOQl2PBICx7RzMXOQXzuImAyHbburvQxMFfkYXImaesIsZ6YwsNU2VXQC4W5Ge fgxg== 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=1fTF7PFuMdZQqZj3jfP1nVf9Fe0eEwOd8Tslv135UuY=; b=pFG3jaVi9Z7MWoCtBvQL5HdG+DZjOSWJx31pkBNLjx5pCYuGV4kLbs4aYUfwTSl3Le x0chq6JW9OYNTNv3btjG0rgMgvuS24ni1xU/+AwTY/wOvEy38KCZFQi2YkFE+EOziois CiwYvehdJfmw1o6/1VDQ8aBH7ArRHo6ZrFJRYq3+WE9MQC1cKAYyVm/kBSmt3IsTux7r 4B2M4M1jzKpfQXhPc/vCjJjzpRUPi7OSy2Avf0/TuZnGUJCXhIU0f0LV0be47rUwV9Di B+YHVZSWYhYjcNVtFJuNfVkegmwyRIYzuT0ftaryR20/pYqpdRp+n7R04/tq4xW6Y4Qe DbOQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t184si23513044pgb.432.2022.02.03.12.33.37; Thu, 03 Feb 2022 12:33:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351483AbiBCOrO (ORCPT + 99 others); Thu, 3 Feb 2022 09:47:14 -0500 Received: from outbound-smtp58.blacknight.com ([46.22.136.242]:45599 "EHLO outbound-smtp58.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351433AbiBCOrF (ORCPT ); Thu, 3 Feb 2022 09:47:05 -0500 Received: from mail.blacknight.com (pemlinmail01.blacknight.ie [81.17.254.10]) by outbound-smtp58.blacknight.com (Postfix) with ESMTPS id 0943AFA96F for ; Thu, 3 Feb 2022 14:47:04 +0000 (GMT) Received: (qmail 1203 invoked from network); 3 Feb 2022 14:47:03 -0000 Received: from unknown (HELO stampy.112glenside.lan) (mgorman@techsingularity.net@[84.203.17.223]) by 81.17.254.9 with ESMTPA; 3 Feb 2022 14:47:03 -0000 From: Mel Gorman To: Peter Zijlstra Cc: Ingo Molnar , Vincent Guittot , Valentin Schneider , Aubrey Li , Barry Song , Mike Galbraith , Srikar Dronamraju , Gautham Shenoy , LKML , Mel Gorman Subject: [PATCH v5 0/2] Adjust NUMA imbalance for multiple LLCs Date: Thu, 3 Feb 2022 14:46:50 +0000 Message-Id: <20220203144652.12540-1-mgorman@techsingularity.net> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Changelog since V4 o Scale imbalance based on the top domain that prefers siblings o Keep allowed imbalance as 2 up to the point where LLCs can be overloaded Changelog since V3 o Calculate imb_numa_nr for multiple SD_NUMA domains o Restore behaviour where communicating pairs remain on the same node Commit 7d2b5dd0bcc4 ("sched/numa: Allow a floating imbalance between NUMA nodes") allowed an imbalance between NUMA nodes such that communicating tasks would not be pulled apart by the load balancer. This works fine when there is a 1:1 relationship between LLC and node but can be suboptimal for multiple LLCs if independent tasks prematurely use CPUs sharing cache. The series addresses two problems -- inconsistent logic when allowing a NUMA imbalance and sub-optimal performance when there are many LLCs per NUMA node. include/linux/sched/topology.h | 1 + kernel/sched/fair.c | 30 ++++++++++--------- kernel/sched/topology.c | 53 ++++++++++++++++++++++++++++++++++ 3 files changed, 71 insertions(+), 13 deletions(-) -- 2.31.1 Mel Gorman (2): sched/fair: Improve consistency of allowed NUMA balance calculations sched/fair: Adjust the allowed NUMA imbalance when SD_NUMA spans multiple LLCs include/linux/sched/topology.h | 1 + kernel/sched/fair.c | 30 ++++++++++--------- kernel/sched/topology.c | 53 ++++++++++++++++++++++++++++++++++ 3 files changed, 71 insertions(+), 13 deletions(-) -- 2.31.1