Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp2367249rdb; Tue, 10 Oct 2023 01:32:22 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFQm5TEYGpzR3D9QVPO8bMJybFEbMDvM7f4YhisZNeLxyI1QKHpK7tY8TpO+VuvA8HGjQ2i X-Received: by 2002:a05:6a00:b92:b0:68e:2ef2:3379 with SMTP id g18-20020a056a000b9200b0068e2ef23379mr17812904pfj.15.1696926742205; Tue, 10 Oct 2023 01:32:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696926742; cv=none; d=google.com; s=arc-20160816; b=gi6XZmdRQxYFA//kOny+F5C4Xo7Ykz74++t+lIiu6yz7oPCxMCbj7ZHOOtDgQ/2g8I laYswfEsi8y9ympYwMSigEVcyqDUEucdGBZf50JS+OKr8ia6iu1nwHFzATGqBso17ouS FudXc1U0TqxYhyJGmslNGavQ4IaagZaqqiS/DW5X+BqXGmA1OquXgn5aTt2LwPfQqdvZ UA4tWRlGU/q1KwKYNeJLxV2/H5QO2p8ZZOl1qLYWqFKq7LuLIJzj7xcZnpkC030dGcLQ 95ujGy22hYDCG/uAdBOrrcL9IoxJu5d+2riwymKZh2mdPU3sxKDxHqCs68RfcGMebRDy +6kg== 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=i5pPcZWRZrkhkLlpL/Eo8+8AMVAViP+sJY8nQxpaP8A=; fh=WshF3VFuVECdjenMt2c/ihelCL0sRuHaGFWYsZpetzM=; b=p/VkLXwu4DIpyzIRkP0AUtBR4RhGSFmXt/lOKXVv72pTCXoOUXhN5c5oWO5jQC+g9t EIXGl0vHGTNDPteVlNIK5rSH/RtYw/ZtqXJyYCfzIzl6Ui9HyX9wfExnWNvn9ophFtSb H6eKxALGbT7RqosaEuvQx8Fb2FOxBcFFQWs9h59eGe/2uF9ZQYvBUsfApaodiR77fIjN EiKP20AE5twWBjob7ltt+oBvXjIq+947BTWVGBbCAExVwzqJYVilWMmItGYFW+qL5pkp HwhVePtvTz/vhhER0INS3OTbjyn1VQeqy+Q2/nLOUI0VDIGlAfz5e2+aAZSALBUntMI7 UPrQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id 24-20020a630c58000000b005859c3a51c0si11170096pgm.421.2023.10.10.01.32.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 01:32:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id DCEFF8028103; Tue, 10 Oct 2023 01:32:17 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1442836AbjJJIcF (ORCPT + 99 others); Tue, 10 Oct 2023 04:32:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48252 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1442752AbjJJIcD (ORCPT ); Tue, 10 Oct 2023 04:32:03 -0400 Received: from outbound-smtp58.blacknight.com (outbound-smtp58.blacknight.com [46.22.136.242]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5985497 for ; Tue, 10 Oct 2023 01:31:57 -0700 (PDT) Received: from mail.blacknight.com (pemlinmail04.blacknight.ie [81.17.254.17]) by outbound-smtp58.blacknight.com (Postfix) with ESMTPS id 4071CFABD8 for ; Tue, 10 Oct 2023 09:31:55 +0100 (IST) Received: (qmail 6476 invoked from network); 10 Oct 2023 08:31:55 -0000 Received: from unknown (HELO morpheus.112glenside.lan) (mgorman@techsingularity.net@[84.203.197.19]) by 81.17.254.9 with ESMTPA; 10 Oct 2023 08:31:55 -0000 From: Mel Gorman To: Peter Zijlstra Cc: Raghavendra K T , K Prateek Nayak , Bharata B Rao , Ingo Molnar , LKML , Linux-MM , Mel Gorman Subject: [PATCH 0/6] sched/numa: Complete scanning of partial and inactive VMAs Date: Tue, 10 Oct 2023 09:31:37 +0100 Message-Id: <20231010083143.19593-1-mgorman@techsingularity.net> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Tue, 10 Oct 2023 01:32:18 -0700 (PDT) X-Spam-Level: ** NUMA Balancing currently uses PID fault activity within a VMA to determine if it is worth updating PTEs to trap NUMA hinting faults. While this is reduces overhead, it misses two important corner case. The first is that if Task A partially scans a VMA that is active and Task B resumes the scan but is inactive, then the remainder of the VMA may be missed. Similarly, if a VMA is inactive for a period of time then it may never be scanned again. Patches 1-3 improve the documentation of the current per-VMA tracking and adds a trace point for scan activity. Patch 4 addresses a corner case where the PID activity information may not be reset after the expected timeout. Patches 5-6 complete the scanning of partial and inactive VMAs within the scan sequence. This could be improved further but it would deserve a separate series on top with supporting data justifying the change. Otherwise and gain/loss due to the additional changes could be masked by this series on its own. include/linux/mm.h | 4 +- include/linux/mm_types.h | 36 +++++++++- include/linux/sched/numa_balancing.h | 10 +++ include/trace/events/sched.h | 52 ++++++++++++++ kernel/sched/fair.c | 103 ++++++++++++++++++++++----- 5 files changed, 182 insertions(+), 23 deletions(-) -- 2.35.3