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 6C6E6C54E65 for ; Thu, 22 May 2025 18:52:26 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 089E36B0082; Thu, 22 May 2025 14:52:26 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 063126B0083; Thu, 22 May 2025 14:52:26 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EBB116B0085; Thu, 22 May 2025 14:52:25 -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 CBD606B0082 for ; Thu, 22 May 2025 14:52:25 -0400 (EDT) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 332B6120150 for ; Thu, 22 May 2025 18:52:25 +0000 (UTC) X-FDA: 83471439450.28.24A12CC Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf13.hostedemail.com (Postfix) with ESMTP id 8E5F02000C for ; Thu, 22 May 2025 18:52:23 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=uNcP9Ilh; spf=pass (imf13.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 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=1747939943; 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=cdSPe2TNYDbtPoc7RsYNDLzDnQyCahpkh4fUUIDSfks=; b=qimuEmfRBH9mUDyVvXzM+ugaSeIwVr6Y3NWrWCQf5nitryYPc76WEi/APx0MWULT7s8Qq7 sdiGtx/3UkGM9EMHSBQKf8X+bhMzhuYiLU+sjEb2Qb5kWAAfUxsJjtOW8h+EBTQB+mCu2O UZ2bgIzyjOVCqArFqnDJPvjl/hA0lvU= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=uNcP9Ilh; spf=pass (imf13.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 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=1747939943; a=rsa-sha256; cv=none; b=pM/o4R8KpjbrailI916FHJVlbLAlRekuft6m0jRp/ICUCGPXtw5iAPI6HxpLgQc3UcWOoR HMzTJesZT/KuGllTA7Eippm0WO3Er4sa+MxSf9QcTehO9PoQViu401WU6H4hcvbV7khRC0 dbZmruVMqsHtsxKpQHSEBOTZ8Eq79+o= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 548345C67F9; Thu, 22 May 2025 18:50:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0010CC4CEE4; Thu, 22 May 2025 18:52:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1747939942; bh=OmcJmFrYMF/uIfDhZxz9R89CVIAO7GUP6Rp+QMQA4Cw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uNcP9IlhXC5J2lvLG54o8CBqlzhqljYSbdFmEnk80/85KX5Us+Z6YPriz9YkVqSmV paTl4YyF1Ii8Q1Y001w/K4UjAY17Af/hsZioZNpVZqvXwRIr2Or/3p9tKHymba4Nvp GKo74E0RBNrgK8zeR/i3vKf4DepexjLefIaFArWRuxgRenRV2z3zfG35anngKawvYk FZXpST/BPwlqJV5c8qEWbWHjcA9IL3Tmd+cFxrBkujDt15HvJYVYzNlT6xfcjqv1m9 ET/3apfObjR9ffxUYAcxEvb0OezpeGEea5LO4JKjqpybkK7/sJrnXY/ZrAbFAA7xc8 EJI0QJRchzbfA== 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 11:52:19 -0700 Message-Id: <20250522185219.57843-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-Rspamd-Queue-Id: 8E5F02000C X-Stat-Signature: y5saji1hhx3hnhmwx58pjcsdpjigjscw X-Rspam-User: X-Rspamd-Server: rspam07 X-HE-Tag: 1747939943-914791 X-HE-Meta: U2FsdGVkX18fs5QYgWHqnFIvcTs+/5x92UhoXaQ2s0dNM27iYO0wjHOJTyPMqXttSAZGaLGYNirz78+fIUnBA/fV0TjcOTd78MOFb49dFTlnwtjj9q/f4YGNSD8TVO5PkUCTKMEVEtm+xVA/9zFEnugbsPvxk6rVDOs8MRfQT+L8a5APrUNH3c6BBfJ5XSpBH4V4u60UObuxe3fVLnvVGCKNaKTLNz4wUS0JWnNuneGALLA2pkF/FbXnfxW2bKJwn0X5pZ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osity: 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 Thu, 22 May 2025 13:40:59 -0400 Gregory Price wrote: > On Thu, May 22, 2025 at 09:30:23AM -0700, SeongJae Park wrote: > > On Wed, 21 May 2025 23:08:16 -0400 Gregory Price wrote: > > > > > > > > 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. > > > > 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. > > > > DAMON would identify a set of PFNs or Folios to migrate, at some point, > wouldn't it be beneficial to DAMON to simply re-use: > > int migrate_misplaced_folio_batch(struct list_head *folio_list, int node) Good idea. Actually we implemnted DAMOS_MIGRATE_HOT and DAMOS_MIGRATE_COLD instead of DAMOS_PROMOTE and DAMOS_DEMOTE since we didn't sure the promotion path logic is somewhat everyone agreed upon. FYI, I'm planning to revisit the promotion path logic later (don't wait for me though ;) ). > > If not, then why? I'll need to look into the detail, but from a high level glance I think it is a good idea. > > That's why I mean by what would DAMON want out of such an interface. > Not the async part, but the underlying migration functions. Makes sense, thank you! Thanks, SJ [...]