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 2789FC54E90 for ; Thu, 22 May 2025 16:30:30 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A7C5A6B008A; Thu, 22 May 2025 12:30:29 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A557B6B0092; Thu, 22 May 2025 12:30:29 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 96A496B0093; Thu, 22 May 2025 12:30:29 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 7E00B6B008A for ; Thu, 22 May 2025 12:30:29 -0400 (EDT) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 16F2B121BC3 for ; Thu, 22 May 2025 16:30:29 +0000 (UTC) X-FDA: 83471081778.08.667A43B Received: from nyc.source.kernel.org (nyc.source.kernel.org [147.75.193.91]) by imf03.hostedemail.com (Postfix) with ESMTP id 58E972000C for ; Thu, 22 May 2025 16:30:27 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=AHgxTcTm; spf=pass (imf03.hostedemail.com: domain of sj@kernel.org designates 147.75.193.91 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1747931427; 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-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=aZ6Xb19lPDZa421WsqShiO8VP2jFr93thNw0+4rUBBc=; b=xNEBAiaIZ6vGDjpusR1m63vQ0iJUCm1Q1KMM/j46RBi/PHDR059SLP32EQ7npsAmxkV1St 2Eu2ZulBS4P+MlH6pFI8m4g8dSr8S4eB/0RQ4/fvSMsycZFDjOwtDlAfof6SdlBUUmgD8v 9zETpWgc7ylalS8HnNkkJY73cHcrvlI= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=AHgxTcTm; spf=pass (imf03.hostedemail.com: domain of sj@kernel.org designates 147.75.193.91 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1747931427; a=rsa-sha256; cv=none; b=4zCImYmqOC5LDgBZuPdlRFtPEum6I+4RyRskRnrBDBRTcvis76Z1uFdRnSrB3TBqzUhW0z PjAU2gdOPWvE69vw7+aSKAYk/y0F0rJt5/vQPkj6l13gTH9ayhwoIQtXski3NoWcp7XD+5 upq6WsA7DNWNPnVz/CvAwf+wY93zBWw= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id BAAA6A4EFCD; Thu, 22 May 2025 16:30:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 399C6C4CEEA; Thu, 22 May 2025 16:30:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1747931426; bh=ErKNg1bZtjFKHE5owvEz7JuTEBOTcD3HzXcy1Gqq+jk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AHgxTcTm17+aF8cZSJd1mab22/p1bbJ7/QX26FxtO7feOQKV0LktNGbBsRNfh93e9 IKWj3mmuMyNBv6QIW5xh7W86nQQMRcVtvCvH7IYFmZO5VWFVCU4tNxUD9ZpCAV75zy c8XxudWYgz405jXNh3QagVTWoXRaSmeDxeVDp/Pe3xknWhgS76g082Hrye5z+QrjE4 7zO86KrDh/XJYJ+SYBXd6rXLavIHBsCl+3dWcatkXL4/t4i9AlupMOjV/qyNVIeEBk qO1VolkmOSeCx6h5/lWe507ZZgNqcwaYvHtbhiDVbl+TkJvq9XZP7shvKTLmd+GWg3 P9Uwo2+JzmNsQ== From: SeongJae Park To: Gregory Price Cc: SeongJae Park , Bharata B Rao , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Jonathan.Cameron@huawei.com, dave.hansen@intel.com, hannes@cmpxchg.org, mgorman@techsingularity.net, mingo@redhat.com, peterz@infradead.org, raghavendra.kt@amd.com, riel@surriel.com, rientjes@google.com, weixugc@google.com, willy@infradead.org, ying.huang@linux.alibaba.com, ziy@nvidia.com, dave@stgolabs.net, nifan.cxl@gmail.com, joshua.hahnjy@gmail.com, xuezhengchu@huawei.com, yiannis@zptcorp.com, akpm@linux-foundation.org, david@redhat.com Subject: Re: [RFC PATCH v0 0/2] Batch migration for NUMA balancing Date: Thu, 22 May 2025 09:30:23 -0700 Message-Id: <20250522163024.56592-1-sj@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Stat-Signature: mcxko6cc4s3r381arozctxmi1fjk7k6y X-Rspamd-Queue-Id: 58E972000C X-Rspam-User: X-Rspamd-Server: rspam02 X-HE-Tag: 1747931427-486001 X-HE-Meta: U2FsdGVkX1+KGmxCbLIZx86HBfztFv3iabEyb903S8+c0/ZLsdwgxwFdo9N99hFnFgjV4E02x5u5o0oWYvIa8jp3mVJdQxv6RGzWGhDhbFjYDuJQzLDetRkRSm/XkK64lEfqLWZ88hVoxxVKjN2EXmnM+WcBUqqero+UV956g5WA5/P4GUC1PBaiOY9PvKy4LJFvPf3lPsVqLSOPDUXNCAluQwIE1Dvvmxo8ZfZA28gjZBLj1biDyXzgfkfIy3jHT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ds8HNS0tHfFmjY= 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 Wed, 21 May 2025 23:08:16 -0400 Gregory Price wrote: > On Wed, May 21, 2025 at 11:45:52AM -0700, SeongJae Park wrote: > > Hi Bharata, > > > > On Wed, 21 May 2025 13:32:36 +0530 Bharata B Rao wrote: > > > > > Hi, > > > > > > This is an attempt to convert the NUMA balancing to do batched > > > migration instead of migrating one folio at a time. The basic > > > idea is to collect (from hint fault handler) the folios to be > > > migrated in a list and batch-migrate them from task_work context. > > > More details about the specifics are present in patch 2/2. > > > > > > During LSFMM[1] and subsequent discussions in MM alignment calls[2], > > > it was suggested that separate migration threads to handle migration > > > or promotion request may be desirable. Existing NUMA balancing, hot > > > page promotion and other future promotion techniques could off-load > > > migration part to these threads. Or if we manage to have a single > > > source of hotness truth like kpromoted[3], then that too can hand > > > over migration requests to the migration threads. I am envisaging > > > that different hotness sources like kmmscand[4], MGLRU[5], IBS[6] > > > and CXL HMU would push hot page info to kpromoted, which would > > > then isolate and push the folios to be promoted to the migrator > > > thread. > > > > I think (or, hope) it would also be not very worthless or rude to mention other > > existing and ongoing works that have potentials to serve for similar purpose or > > collaborate in future, here. > > > > DAMON is designed for a sort of multi-source access information handling. In > > LSFMM, I proposed[1] damon_report_access() interface for making it easier to be > > extended for more types of access information. Currenlty damon_report_access() > > is under early development. I think this has a potential to serve something > > similar to your single source goal. > > > > It seems to me that DAMON might make use of the batch migration > interface, so if you need any changes or extensions, it might be good > for you (SJ) to take a look at that for us. I started this subthread not for batch migration but the long term goal. I took only a glance on the migration batching part, and I'm still trying to find time to take more deep look on batch migration. Nonetheless, yes, basically I believe DAMON and Bharata's works have great opportunities to collaborate and use each other in a very productive ways. I'm especially very intersted in kpromoted's AMD IBS code, and trying to make DAMON easier to be used for Bharata's works. For batch migration interface, though, to be honest I don't find very clear DAMON's usage of it, since DAMON does region-based sort of batched migration. Again, I took only a glance on migration batching part and gonna take more time to the details. Meanwhile, if you saw some opportunities, and if you don't mind, it would be very helpful if you can share your detailed view of the opportunity (how DAMON could be better by using the migration batching in what way?). Thanks, SJ > > ~Gregory