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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4AB00C54FB3 for ; Tue, 27 May 2025 01:27:23 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A39AF6B007B; Mon, 26 May 2025 21:27:22 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9EAAA6B0083; Mon, 26 May 2025 21:27:22 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8B3596B0085; Mon, 26 May 2025 21:27:22 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 660676B007B for ; Mon, 26 May 2025 21:27:22 -0400 (EDT) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id C2A4516155F for ; Tue, 27 May 2025 01:27:21 +0000 (UTC) X-FDA: 83486949882.05.B248E01 Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam02on2075.outbound.protection.outlook.com [40.107.95.75]) by imf20.hostedemail.com (Postfix) with ESMTP id EBD381C0002 for ; Tue, 27 May 2025 01:27:18 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=Nvidia.com header.s=selector2 header.b=qDl1Wzgm; dmarc=pass (policy=reject) header.from=nvidia.com; spf=pass (imf20.hostedemail.com: domain of ziy@nvidia.com designates 40.107.95.75 as permitted sender) smtp.mailfrom=ziy@nvidia.com; arc=pass ("microsoft.com:s=arcselector10001:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1748309239; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=LLA71ldIQOXsCKrLzzfm+LPt8myDPkE9MkNW+HffgQQ=; b=4S+uRi9xnSgSNie5/IMg0l+EUGXu5JRzy/jNfFU6eTsyIln6B/RAOJQNEItBTwwLEoIhgg iqYNTIzQP1pRfIdUATR1dH4x3dzmD3omJ8/X0E1VhrxYgEmUsGq8n6q58IWounKF+S/+fe r+OIhn42EkK+BkuXtjihwsLgiDw7QUM= ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1748309239; a=rsa-sha256; cv=pass; b=OwHh/B7/7gKPbRvm5X3aFn/xEpAzXE8GRNoIDcyB9NJQBtSKsw2gsgleymzK2iuSsRF3kK DXsRSTSFSsaY0eVIAhN7mMHt6hq3bWnpSojbaWN/Q4J3MyXMl+69Tw+US7l17ogPA5Fpol ndMx34sEZzNcfgJ0JDsSenDXDXNldH0= ARC-Authentication-Results: i=2; imf20.hostedemail.com; dkim=pass header.d=Nvidia.com header.s=selector2 header.b=qDl1Wzgm; dmarc=pass (policy=reject) header.from=nvidia.com; spf=pass (imf20.hostedemail.com: domain of ziy@nvidia.com designates 40.107.95.75 as permitted sender) smtp.mailfrom=ziy@nvidia.com; arc=pass ("microsoft.com:s=arcselector10001:i=1") ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=DqMMiXfw8DVWKlVeDErcJYY4YUtZrLaqTCzhD+q2er/iSEevxYeVXn8pESt7zuxSQy0B1cbX6SoHsaMMiGuxxhlPnOoq+GjynQdy3abojL5Z0Z7vxiSIAaVMSkds8xwEfrgy/9WGjGb1ESHa9G4iYlZ5ZRlobmOCk9Zu9qxyI/k4v/virsuYEqcKC98qGLGwLgkLJnOwXoBkPeBn1JuaZODDBByeaxw8Dy7QdzeQUi3mS4thoj6Y53TnBxTF/NBuWXOJT2sggNTR2bfRHYSU9NYKwRCcMOfnkAeaQ2YpsyF/xayTaji3aeCfPD60+++1nXwChLylddARaFDDnZlVGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=LLA71ldIQOXsCKrLzzfm+LPt8myDPkE9MkNW+HffgQQ=; b=wAFoUDtIzY90fraB/QUqT0gVCdWxX1lw0sRALzFeVOBgB9FarJHAxY2hmvGvrFfVB/pCGYho0U3qbS5ESUjtR9pBiA2dFAEbp7Ql4JSPJiRBDrGtms6SJA+2xryEFPNMyurd7X/9izJEIJhMcuoKvNolNPRMSO16i7iu0fLe1JAYf3UrO6q8hLe70hrthX0NhtZV4446aYxbEqfP1OXHcG7guzeqxPsg8Id5lyoXNhfSZ1lTRteizQUnsTkBWKTHJjKEupeff1MVj8jCChm6l+BoDAUnigRiBi9D20budp8I9G8YocjLBgQmTI4BPCIjv22x27wvM9WqB4mWHfHg6w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=LLA71ldIQOXsCKrLzzfm+LPt8myDPkE9MkNW+HffgQQ=; b=qDl1WzgmW0ICDz1KJBH0aspFXt7e3H17X4mxJxbDfNDvvG2ma2nwi5ri2gJnLpeUjO99RQBLxyNHKcXMk13jhJvvIwE7ORpxl/BUqvPkKUB4fGHYGPAgSl6FWWOxNfRSMLmRzIbl7q97Hz44Uc3gxT8INHXZ6t9SnV7TTJg0YrLGaKshHJ6wxNz20ZeIH30hf+5MWO+gNbqiAJqTlmk0v350onBANiurUk2wo40HkUbM147mv5vtKF+aq0HP9Ojh/yPN8YaArp7QrWCvOHgYw5qrIfJyr7hj5fxCQxSz2vRRQuUCpPbrqKbohavxsqQ0bqyBDeVBUGJBggHH1e8zAQ== Received: from DS7PR12MB9473.namprd12.prod.outlook.com (2603:10b6:8:252::5) by MN6PR12MB8470.namprd12.prod.outlook.com (2603:10b6:208:46d::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8769.21; Tue, 27 May 2025 01:27:14 +0000 Received: from DS7PR12MB9473.namprd12.prod.outlook.com ([fe80::5189:ecec:d84a:133a]) by DS7PR12MB9473.namprd12.prod.outlook.com ([fe80::5189:ecec:d84a:133a%4]) with mapi id 15.20.8769.022; Tue, 27 May 2025 01:27:13 +0000 From: Zi Yan To: "Huang, Ying" Cc: David Hildenbrand , Bharata B Rao , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Jonathan.Cameron@huawei.com, dave.hansen@intel.com, gourry@gourry.net, hannes@cmpxchg.org, mgorman@techsingularity.net, mingo@redhat.com, peterz@infradead.org, raghavendra.kt@amd.com, riel@surriel.com, rientjes@google.com, sj@kernel.org, weixugc@google.com, willy@infradead.org, dave@stgolabs.net, nifan.cxl@gmail.com, joshua.hahnjy@gmail.com, xuezhengchu@huawei.com, yiannis@zptcorp.com, akpm@linux-foundation.org Subject: Re: [RFC PATCH v0 2/2] mm: sched: Batch-migrate misplaced pages Date: Mon, 26 May 2025 21:27:10 -0400 X-Mailer: MailMate (2.0r6255) Message-ID: <4B786FED-0247-4105-B9F0-F2E3D865D0FC@nvidia.com> In-Reply-To: <87a56yc0mj.fsf@DESKTOP-5N7EMDA> References: <20250521080238.209678-1-bharata@amd.com> <20250521080238.209678-3-bharata@amd.com> <62cef618-123c-4ffa-b45a-c38b65d2a5a3@redhat.com> <5d6b92d8-251f-463b-adde-724ea25b2d89@redhat.com> <996B013E-4143-4182-959F-356241BE609A@nvidia.com> <382839fc-ea63-421a-8397-72cb35dd8052@redhat.com> <94BF4806-ABCD-4D01-8577-9E138A634815@nvidia.com> <87a56yc0mj.fsf@DESKTOP-5N7EMDA> Content-Type: text/plain Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: MN0P220CA0002.NAMP220.PROD.OUTLOOK.COM (2603:10b6:208:52e::31) To DS7PR12MB9473.namprd12.prod.outlook.com (2603:10b6:8:252::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS7PR12MB9473:EE_|MN6PR12MB8470:EE_ X-MS-Office365-Filtering-Correlation-Id: cce80a0e-403c-45c8-e6f5-08dd9cbd9bc2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|7416014|376014|1800799024; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?KTruqQ33D2+fuIpcNLJdwnhL6HpA2dpqzwH9Mnc6nGbA9vwBHZ5r/0yFXnZc?= =?us-ascii?Q?jXZSga+A3aZU2rIne0Ko1CEGPsRzf/hnx0fPDn+rH6JYsqmogsot5/4vbrv8?= =?us-ascii?Q?0tbrQ3Ub3Is/2hH8fV9xWkutNJwkMRMW1q6QOz/CGMQCtm6FNrA/sw20rwcN?= =?us-ascii?Q?4pvBOAktciHsYYlkVep9DRN3UsHv2C98cOPVbj3cFrWMrDuI9jrxDDed8xGI?= =?us-ascii?Q?NDKeLBCQoqXfVQ5rQtGeGv6HHXCJRvlzyGvvGX90GMG8LtHHolG0bf6ivtIx?= =?us-ascii?Q?6l0mQnbf8B66EmmWth4qTIctdIwYjoos6L2G7KWHMhFPDxoE6fqF/7jpqsX/?= =?us-ascii?Q?jMcva9mywqiRG6NulVp4wwQhMmDnxVhdwWwfjrpqBCrB6oPRW2NQDqGISRLa?= =?us-ascii?Q?+7QTBr6jTXkrYq7xSMdpipg+OXCvg07jP1+upgMB/+OtexB3Us+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6qOK9qyu6gnSX66AAriUIvyJFTTyZ5gUOv0/gb0C8NONY5?= =?us-ascii?Q?GUy7rhHEMARfka9Q2W3A/HQpkJ6tOoU1fmq8ojT3E6YCW0uhJzRhAqjpDBhY?= =?us-ascii?Q?gKfq+CyMRng=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS7PR12MB9473.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(7416014)(376014)(1800799024);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?8IeT8ylpsiDv65rCEfkXxc2AMFNyQ4BpLlwMXZoozVbrcrx6Uhobx/zEUejj?= =?us-ascii?Q?spRQfzf3686YRybz4l95xszfO8Ld3NK25YqvkQVaN93+lk1qEjoW7owVKGVY?= =?us-ascii?Q?debmkM2vkjYgwjskWGKLXO+zI9iRXb7jL/sdO4b8XyC7QbcSjBDKzgcbCRj2?= =?us-ascii?Q?egeQ0L1igWUpoj1n5SLp8fNQOYCwl6GDLTFzqrsVL3RDm+2GY0NaD6LnmS3J?= =?us-ascii?Q?CEFJWCEW9677hRL/+EWYCrKXNqZrV9Rdy/zf36/q0feG6j32KAPGajC/ncPN?= =?us-ascii?Q?1n48rAD/MpzZoGKPETrL2SF15f1ACUAB+1fWKLJz1zpqv5bL9nszeafNi75H?= =?us-ascii?Q?2+LzBybi9K4bGQPg0scFgp88WT8lKG/RAvKC04AAWTCMCi5eE6JMmfZg6/Yu?= =?us-ascii?Q?ApBjkhy753DREiUo0MUwEvKxxT4RxsUUnI0V3UraruaS7R7pZJ1ua1Jal4ns?= =?us-ascii?Q?TG2Vy7lr1NU9eN0dQsUDRCtab6q/2grtUfpERSkLPGujm0Ma51VhxbrtKSnB?= =?us-ascii?Q?NTHljEtvhN/BWoRXeMLIoWQRRfNCaeUdcISV+Rf9O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rLLjcX/BxbBJhND8w6/TUotYnraI9YKUASlK2uSAt?= =?us-ascii?Q?Lzd5USViLeWJBtowXINBiwEybg6rjrchCtXZ5w+XoVCAlnN0Z/hYA5ZdMEpv?= =?us-ascii?Q?+nE891QY0Ho9vz/sprFMDlSq5rao75Cnaj9Hi7l9?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: cce80a0e-403c-45c8-e6f5-08dd9cbd9bc2 X-MS-Exchange-CrossTenant-AuthSource: DS7PR12MB9473.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 May 2025 01:27:13.4125 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: XJRu+Jgf89AqcyOulWmNE462BjAiUXDT/0usP3nJGA+VMsU76KLK6+c0IhNKN0/E X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN6PR12MB8470 X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: EBD381C0002 X-Stat-Signature: qi5968dmkz4zqsno8q8xgh67qw5knzu3 X-Rspam-User: X-HE-Tag: 1748309238-367662 X-HE-Meta: U2FsdGVkX1+4nsxyeL5N0g0XbX9JFynbxf31mdyJLyc1k46RUYgSFpdMLs2esSUc6sCLO6/f2m+IXjadPPKPT+QKYlWxBimxcD1lQJtRnH4ho3CXmatZE8Oy9K0kW/O3a64mUWj5tQW9/e5L3d2Ege2HZIWCvbsOB+b1mcwqUeQuiq+OvnEiMwinEdn/Zcg38fH0YYP/PX2HBlz+UY0ZKzAfXw8HIe+Ccm5RtW8Sj2rtUKrdz5W3x2qIOorqM5Ax9qvJ17W5xIXP7Pjvq3vaXSpNkXYSUGRC2Wb7n3ku9zeMpzB4hxMA/am/Zbjylti7Gq9ryL8u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UOn6KrvbX8nHIPb7/hz8cOxfRq8JabuKDOyYREWlqFhW01Gniya4SZyBYlIQf1L/KEWE7GEsew/Zk4GuwswT+lDn4cQwIuht00pLvdLLAyf1IiZSFcF8GOItnTPrQaldhV3K6gShbwXKVMXrt6hx/z11P0SKIzOeMdVj/pN0OFFBdEt9FZ7vaqdGbdQ= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On 26 May 2025, at 21:18, Huang, Ying wrote: > Zi Yan writes: > >> On 26 May 2025, at 5:29, David Hildenbrand wrote: >> >>> On 22.05.25 19:30, Zi Yan wrote: >>>> On 22 May 2025, at 13:21, David Hildenbrand wrote: >>>> >>>>> On 22.05.25 18:38, Zi Yan wrote: >>>>>> On 22 May 2025, at 12:26, David Hildenbrand wrote: >>>>>> >>>>>>> On 22.05.25 18:24, Zi Yan wrote: >>>>>>>> On 22 May 2025, at 12:11, David Hildenbrand wrote: >>>>>>>> >>>>>>>>> On 21.05.25 10:02, Bharata B Rao wrote: >>>>>>>>>> Currently the folios identified as misplaced by the NUMA >>>>>>>>>> balancing sub-system are migrated one by one from the NUMA >>>>>>>>>> hint fault handler as and when they are identified as >>>>>>>>>> misplaced. >>>>>>>>>> >>>>>>>>>> Instead of such singe folio migrations, batch them and >>>>>>>>>> migrate them at once. >>>>>>>>>> >>>>>>>>>> Identified misplaced folios are isolated and stored in >>>>>>>>>> a per-task list. A new task_work is queued from task tick >>>>>>>>>> handler to migrate them in batches. Migration is done >>>>>>>>>> periodically or if pending number of isolated foios exceeds >>>>>>>>>> a threshold. >>>>>>>>> >>>>>>>>> That means that these pages are effectively unmovable for >>>>>>>>> other purposes (CMA, compaction, long-term pinning, whatever) >>>>>>>>> until that list was drained. >>>>>>>>> >>>>>>>>> Bad. >>>>>>>> >>>>>>>> Probably we can mark these pages and when others want to migrate= the page, >>>>>>>> get_new_page() just looks at the page's target node and get a ne= w page from >>>>>>>> the target node. >>>>>>> >>>>>>> How do you envision that working when CMA needs to migrate this e= xact page to a different location? >>>>>>> >>>>>>> It cannot isolate it for migration because ... it's already isola= ted ... so it will give up. >>>>>>> >>>>>>> Marking might not be easy I assume ... >>>>>> >>>>>> I guess you mean we do not have any extra bit to indicate this pag= e is isolated, >>>>>> but it can be migrated. My point is that if this page is going to = be migrated >>>>>> due to other reasons, like CMA, compaction, why not migrate it to = the target >>>>>> node instead of moving it around within the same node. >>>>> >>>>> I think we'd have to identify that >>>>> >>>>> a) This page is isolate for migration (could be isolated for other >>>>> reasons) >>>>> >>>>> b) The one responsible for the isolation is numa code (could be som= eone >>>>> else) >>>>> >>>>> c) We're allowed to grab that page from that list (IOW sync against= >>>>> others, and especially also against), to essentially "steal" th= e >>>>> isolated page. >>>> >>>> Right. c) sounds like adding more contention to the candidate list. >>>> I wonder if we can just mark the page as migration candidate (using >>>> a page flag or something else), then migrate it whenever CMA, >>>> compaction, long-term pinning and more look at the page. >>> >>> I mean, all these will migrate the page either way, no need to add an= other flag for that. >>> >>> I guess what you mean, indicating that the migration destination >>> should be on a different node than the current one. >> >> Yes. >> >>> >>> Well, and for the NUMA scanner (below) to find which pages to migrate= =2E >>> >>> ... to be this raises some questions: like, if we don't migrate >>> immediately, could that information ("migrate this page") actually >>> now be wrong? I guess a way to >> >> Could be. So it is better to evaluate the page before the actual migra= tion, in >> case the page is no longer needed in a remote node. >> >>> obtain the destination node would suffice: if the destination node >>> matches, no need to migrate from that NUMA scanner. >> >> Right. The destination node could be calculated by certain metric like= most recent >> accesses or last remote node access time. > > Do we have the necessary information available? last_cpupid have eithe= r > last accessing CPU or last scanning timestamp, not both. Any other > information source? Not at the moment. A unified page access information framework is probably needed. The recent LSFMM has a related discussion[1]. We also have a biweekly discussion on it[2]. [1] https://lwn.net/Articles/1016722/ [2] https://lore.kernel.org/linux-mm/ae6e7b19-f221-9a5d-a3eb-799ed271de11= @google.com/ Best Regards, Yan, Zi