Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1389972pxb; Tue, 8 Feb 2022 16:34:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJwuk44oQEk+m4fzt9l9stVmjbH5ya7uZ1LihQAhGxdHFWRO+eOh/RDbE7BicfORxCrOiqcQ X-Received: by 2002:aa7:91cc:: with SMTP id z12mr6830852pfa.37.1644366878768; Tue, 08 Feb 2022 16:34:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644366878; cv=none; d=google.com; s=arc-20160816; b=P/6gO8g8N/ifUsxYiybR37gHUwxM4m6SVUr/8PktPzNHx701z5Bebb4LrzC+xIruNz d6Wh6iRjSDKlSuylQzS5NtoWzuMbYWspbsiX67WP/fdCjTZ1dZXrAFdum1N8LZdt8493 JidHNuc2a0yDqA/44ZO9+VmlAxthAxhg05Hw+tT5eZQNZgszMNFO53/b/P+WffpHlpLR eePDvJ47CS7lwi+tQ8uBWEtaCvXrUGVnX2LMwrdSGz8MwRnKnU13cFqoJlrvS593A2fm ZkuP5JN27QgWivdpBq0HRBzRuyJ2LidFj0AK/5i7VGmKvwgRSzgp36z9xjfppaknjFSk mePg== 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=a23WUHmH03BfRx2WBfA2IXLLAhwPWB5xghhQw98ZRIo=; b=ydr0dJb8qB/uunedmZKxMkc7pkT8tBUpsxN7/1CuQRK6MxWx1UoHd3+ERsZvp+vq6G 0mJUTDYdtYfUXpb7lHD3NMDQC/svPrlicxCqWcaojO0aK1EXcKeRMT1ooECFbEvn5Rkq w2Qrmsy92+7Q8xMF+SngfuZ6/JZIlFp/Y+V9sCI8vGFEY5cqw6tld1gVw3s8rHLEIRsO FhEU7RmKncnx7wfevKeB/Ow0t5wyYLXY4LCTMwZJ/AistjNou8fdpFijRQQSlyn3aIhp lfutUvqKlSvYt3B6T2KUO1Nhu5Ar2R8SO5J7NRCcfwvTXk7N7+Z7Ig9f0ePsD83T6e09 sRbg== 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 j63si96003pgd.350.2022.02.08.16.34.25; Tue, 08 Feb 2022 16:34:38 -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 S231177AbiBHLXk (ORCPT + 99 others); Tue, 8 Feb 2022 06:23:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47352 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355737AbiBHJxB (ORCPT ); Tue, 8 Feb 2022 04:53:01 -0500 X-Greylist: delayed 552 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Tue, 08 Feb 2022 01:52:59 PST Received: from outbound-smtp30.blacknight.com (outbound-smtp30.blacknight.com [81.17.249.61]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA07BC03FEC0 for ; Tue, 8 Feb 2022 01:52:59 -0800 (PST) Received: from mail.blacknight.com (pemlinmail06.blacknight.ie [81.17.255.152]) by outbound-smtp30.blacknight.com (Postfix) with ESMTPS id 9BB69BAFE4 for ; Tue, 8 Feb 2022 09:43:45 +0000 (GMT) Received: (qmail 1402 invoked from network); 8 Feb 2022 09:43:45 -0000 Received: from unknown (HELO stampy.112glenside.lan) (mgorman@techsingularity.net@[84.203.17.223]) by 81.17.254.9 with ESMTPA; 8 Feb 2022 09:43:45 -0000 From: Mel Gorman To: Peter Zijlstra Cc: Ingo Molnar , Vincent Guittot , Valentin Schneider , Aubrey Li , Barry Song , Mike Galbraith , Srikar Dronamraju , Gautham Shenoy , K Prateek Nayak , LKML , Mel Gorman Subject: [PATCH v6 0/2] Adjust NUMA imbalance for multiple LLCs Date: Tue, 8 Feb 2022 09:43:32 +0000 Message-Id: <20220208094334.16379-1-mgorman@techsingularity.net> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Changelog sinve v5 o Fix off-by-one error 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