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 B5080C71159 for ; Mon, 16 Jun 2025 22:48:35 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D3A2D6B0093; Mon, 16 Jun 2025 18:48:34 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id CEB0B6B0095; Mon, 16 Jun 2025 18:48:34 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BDA5B6B0096; Mon, 16 Jun 2025 18:48:34 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id A95A66B0093 for ; Mon, 16 Jun 2025 18:48:34 -0400 (EDT) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id A1DDF5ED45 for ; Mon, 16 Jun 2025 22:48:33 +0000 (UTC) X-FDA: 83562754506.04.F228330 Received: from nyc.source.kernel.org (nyc.source.kernel.org [147.75.193.91]) by imf18.hostedemail.com (Postfix) with ESMTP id F3ACA1C000E for ; Mon, 16 Jun 2025 22:48:31 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Y6+LtIzK; spf=pass (imf18.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=1750114112; 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=EY7iBtYZHDMtJTxMkP0Egz3RsYFQz6qSsEpbRnNglQc=; b=7xkmfbHxhM92V1UY1rFlwboNaqprBxjoFxijZnQ1tdovipyKNfbYwrSxiUAVpb5f/MYCtO Ofd98QbU4i0byHBhssmV/I4DD6ISFzM7t4nOx0LflUErW5bI18Nj0nd5K8+ev1kLH1CBhC 4vVIK86AbQxdm6tqi49uy131JVn8klk= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Y6+LtIzK; spf=pass (imf18.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=1750114112; a=rsa-sha256; cv=none; b=xeOpiYa1YjAn55ZQW7zSp46IZyXGdOk5004hD+OkDdDYN/pNDcTG6oHwEw5DAvy+BuKkFZ AGgcQlxYz+mcFOKXfcRSJFAfLi8mpXv4WtnjT0940q1SQ2rCK/FRwzn1kP+KttpWLCTbUP VCThItJ1wFLgY7YFUEB6ZoUfj+SiBRc= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 3F26BA51D48; Mon, 16 Jun 2025 22:48:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B2BA6C4CEEA; Mon, 16 Jun 2025 22:48:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1750114110; bh=8krNgE0Q5cBmryTO2MlEGaTIpki6xXbb0E3l+b3+r1w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Y6+LtIzKEVGGN+1i5W51lzJbfRBFmG4SWPtB75S/A14iwGHX5kIYb6UGmfwIvnmYj v8bo8Ronz8UhU0dmllfHS0G+drLvTwq0LhWRHeTNzfBSoRb3ZEnrzoW1SOLs0e2k3r mugATTfMDuzXu1x2K6nPxiTMqvuEr2qkQk+0kiEzVP/MXPzUZt44zCuxIlzlTIhcFP VbRiHubsEuL5hFkNwBqsMbcvPkjcL5fJ4T/tO+3VyrBrUFBvfSI4BYsMiaBrjsqm13 IaUcNKw4sVz4vjYxMFjK5XiqxflY/pDMoDsp8jkhEVYiZiAmGmFR3GFpYxfHGIg0AM fqQcDComO/VDw== From: SeongJae Park To: Joshua Hahn Cc: SeongJae Park , Andrew Morton , David Hildenbrand , Honggyu Kim , Johannes Weiner , Lorenzo Stoakes , Michal Hocko , Qi Zheng , Shakeel Butt , damon@lists.linux.dev, kernel-team@meta.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH 0/3] mm/damon: use alloc_migrate_target() for DAMOS_MIGRATE_{HOT,COLD} Date: Mon, 16 Jun 2025 15:48:27 -0700 Message-Id: <20250616224827.3009-1-sj@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250616213159.2839382-1-joshua.hahnjy@gmail.com> References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: F3ACA1C000E X-Rspamd-Server: rspam07 X-Stat-Signature: hzqqgjiqfo7iaonacyej9fn5o959nic6 X-Rspam-User: X-HE-Tag: 1750114111-601794 X-HE-Meta: U2FsdGVkX19ETans67otk38+bjChO2AMvZJ1Ae8sKtU1aan62F97kxvJykg3s7B1ElMKqWkx1Su0K3Z1jI8nMHeusxwmkKLaN2gbG2/EWee/zrtto4tloMY/k0yrQ6taOUm0EbUezWMiBcLVtlgyD/pBNfbKxODLu6uHSVS5yaOierWGauW6fttFKksuaDnTLH8w+qG5knfXMlVX+Tdl/sG/pyBVZ75LShtdd5pQdwCtWX4ldAJDvNgJUQ2ZeDhhBAx2LQFsY1aROA+X28zhZPDDfXBvrALidbEWRSUQxxAeOV6Fq2N2Gmblu3Mu74+YRFUQ23Z43BMsmT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mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Hi Joshua, On Mon, 16 Jun 2025 14:31:58 -0700 Joshua Hahn wrote: > On Mon, 16 Jun 2025 10:23:43 -0700 SeongJae Park wrote: > > > DAMOS_MIGRATE_{HOT,COLD} implementation resembles that for demotion, and > > hence the behavior is also similar to that. But, since those are not > > only for demotion but general migrations, it would be better to match > > with that for move_pages() system call. Make the implementation and the > > behavior more similar to move_pages() by not setting migration fallback > > nodes, and using alloc_migration_target() instead of > > alloc_migrate_folio(). > > > > alloc_migrate_folio() was renamed from alloc_demote_folio() and been > > non-static function, to let DAMOS_MIGRATE_{HOT,COLD} call it. As > > alloc_migration_target() is called instead, the renaming and de-static > > changes are no more required but could only make future code readers be > > confused. Revert the changes, too. > > Hi SJ, > I hope you are doing well! Thank you, you too! :) > > These changes all look good to me. And I agree that changing the behavior > to mimic migration as opposed to demotion might be helpful in making > opportunities for others to use DAMOS as a means to perform other related > works (like [1]), without having to use a "demotion" mechanism for simply > moving pages around. > > I do have one question: I'm curious what kinds of changes callers can expect. > Would I be correct in understanding that this is mostly a semantic change > (aside from no longer having a fallback nodemask)? Just want to make sure I > have a correct understanding of your intent was. You're correct. This is not changing any DAMON interface, so DAMON API callers and DAMON ABI users would not need to make any change from their side. > > In the meantime, feel free to add the following to the series: > Reviewed-by: Joshua Hahn Thank you! :) > > Have a great day! You too! Thanks, SJ [...]