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 E0852C83038 for ; Tue, 1 Jul 2025 23:45:43 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7436F6B00AC; Tue, 1 Jul 2025 19:45:43 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6F3B96B00C1; Tue, 1 Jul 2025 19:45:43 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5E3006B00C2; Tue, 1 Jul 2025 19:45:43 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 4B3886B00AC for ; Tue, 1 Jul 2025 19:45:43 -0400 (EDT) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 981AF140601 for ; Tue, 1 Jul 2025 23:45:42 +0000 (UTC) X-FDA: 83617330524.04.3731B92 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf13.hostedemail.com (Postfix) with ESMTP id ECDEB20007 for ; Tue, 1 Jul 2025 23:45:40 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=uSp5UT5g; dmarc=pass (policy=quarantine) header.from=kernel.org; spf=pass (imf13.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1751413541; a=rsa-sha256; cv=none; b=pknCkTtcuAhEXj14rskEecb8SCT2YScaxXa/iIq0XNQMtPMQW5ucI9YPOFfR1YzgXPjFF9 HKXX0pexgu8GrBRvyDRq7kMHdt9axIzC1DupdhxTV/6+sK5b4RiwTT04ehtCO5nJ3KLYPY TBm9ZMRxaD7KGoMgqd50O65npQLgioU= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=uSp5UT5g; dmarc=pass (policy=quarantine) header.from=kernel.org; spf=pass (imf13.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1751413541; 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=HmbilwRjeUyqulYP3o0qq6kiYQkkM5RZMXff08s46u4=; b=sAaxIf/8oLmekDkwRO71VdPidlUwAb/ywLpEXyEU5FnWn2iGnn/MLxHtnqmdJQ6TF8Y5fk dalq9Y+rnlqtTW3Dn5gGKG5s8dAwhRNk+62bG7+VcV5xNfOTVJiCve2PWzMycFFeNMEVXx X0HaGc8CAzFusSSg1xTPj7O6s8xDO0A= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id E163F5C5E3E; Tue, 1 Jul 2025 23:45:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4D5FDC4CEEB; Tue, 1 Jul 2025 23:45:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1751413539; bh=XYlsidoRUwVusXwpZreYOH7Z/kPmvluYj/9OEz9LeeQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uSp5UT5gL9TnmeHH1+LrZoqazZ9rGVw9BHXs3TdgoLyPujPSsh/bPyBYqqXjZ5oCI saTqGr6v4WUF5Q+6STCehZBSltcKYW92W73iupdtW3rCPaMU4Ghkn6iIrXxZ74LH/A /Wg81Oh2KCcsGcq1BQWTdxouHsiJSyJu/wHvGId0gczvEsZOttahMYvVhhqkot7tmR R2UglDoPFtZ8HVgCG1p8FazKt2i7ic//dN211lBilTU0r+DfXuRa9z2Xgg+PQd5Kpe inHO+aFxX5ww+T7//dkOciWESTGgnpLjY+NS/0GtRPZq7M7oxPjm/VeySoas8SvjPK lX9fFnCoLeetg== From: SeongJae Park To: Yunjeong Mun Cc: SeongJae Park , akpm@linux-foundation.org, damon@lists.linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel_team@skhynix.com, honggyu.kim@sk.com Subject: Re: [RFC PATCH 0/2] samples/damon: improve expression of target region in mtier Date: Tue, 1 Jul 2025 16:45:37 -0700 Message-Id: <20250701234537.57216-1-sj@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250701085417.1734-1-yunjeong.mun@sk.com> References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: ECDEB20007 X-Stat-Signature: ykk84tnxo4ekjuwgouzdq94uerrgumbc X-Rspam-User: X-HE-Tag: 1751413540-162791 X-HE-Meta: U2FsdGVkX1+AtLMWf/PHCa135U7KmV04CrP898QAaR+YsN+fgK0QVLPog18RMSLIA8CMdnmKeK1ORm/ovePKzJXc8AOGpVm76vj6SkG2yQAqS/WMfXD8VheeleMdrUeWdBVCDIWqLwg+ZBcilVl1dKGMeiVMzyTyZdjzEE8FeoWVG0VXCJ5YjHf3WUL1Gofczgx77ekpBPuoieqJDpCbzb2R0EjgMG5+sT9o6SUr8IB9F+rBbDLWDPJING4h8CZfE+swVj7qWC4duF5pWNkbfK0TXMgNwQMoOl7JlTyHpFzn4TFIHswptLvYQjsPfaccHYElhRnfYcyJ36noH+oV5eatuKjQjnmMQFXU+UfeAWc+QiemTcOFFTSktiu8s0zN9j8QW6vB8CD5Gp16bAK4GYuqPMF31FQDBl+STZwicvzIaZF9rHJDtovKG7wgBFW+fq6S4grBM0AIoCI4v4SvvA89iC7VTIWi/pEyygVyU/AorN+RYE5z8buV/14szlLO3GyEaw/nwJNsxFQNKCg/gNeLWlfVcEB37KBgq6vMYdecYp4XnAITppGhTVbF+AkBsqxzGNe3nmdIx3wFpxBYBx7pXDtcxseBctXB1RlY+yAgRCTJA9537QAt5f5UpzHTnRVeKHMSH4XzweSUVDOgancg/5bOR+Hr1jg9zf2pO44YAccp8+s+6lmqr6dsE9XOMhI3Cy8PUorn+FmAap1a9SZmO2pfTkT98SkdDDGP3OvgUL++qFlyDAPXMXfcP09KxO8RKBJzAfpnLWzyYlRb+6Z0cxESbfuucAZ3bZ9aTc2Yn0ORGH02RLhsPfqPRYlsukR0GWuU+qhVgExdskW3pJTi4JPyGf1Pu3AwKvzMjpEPYtXXPHRnnDFD1jLQ7n3XH+z0qfruU4r9BjZJva75J/tCilPp4hZ9fV0gLPjqsRtn88hd5TirdW+58dYVcHewqgDvDVPl0hbDr3LyqG0 DaJCMecG lKHRsiPqBtmcWvWrnVZhltIcT3J2PmRJWztk/WMhz1PrhdlTwuQ23HsWnSUwsATDoiF7pQxeUGK1sPqL2f8qpcTrVKc2Jtv0Xgwm5tH4LFCQEOlNJ0G1Zv76timcklDjEqM4JsdZyYwoCy9Q57oXF7PsE5IMyTOPKlPYUyTVRxFVvAAsdOJXA2LUx+OUxo4Ubzz/vFrAPQtbRgSSwdIsscIZfLm/XvCmP7ShpeUdRc1GJmUGH5nQfGLvi3NNOzCiB0fGiEjsU6EX16LE= 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: Hello Yunjeong, On Tue, 1 Jul 2025 17:54:15 +0900 Yunjeong Mun wrote: > `mtier` module is a static module for migrating pages using > damos_action: DAMOS_MIGRATE_HOT and DAMOS_MIGRATE_COLD. Currently, > this module is built on the assumption that the system has two NUMA > nodes, where node0 is the fast-tier and node1 is slow-tier. This > patchset aims to make the expression of the migration target region > more user-friendly by : Thank you for your continued patches! Let me clarify my humble opinions about what is the goal of mtier, and what improvements it needs first, though. mtier is not intended to be used as a solution for real world usages but a sample module for helping developers understand how they can utilize DAMON by calling its API functions. If someone is looking for a real world DAMON-based memory tiering solution, I think it should be under mm/damon/ directory like DAMON_RECLAIM, not under samples/damon/ directory. I hence think we should more focus on making mtier provides good example usages of DAMON API functions, more than its user-space usages. We could of course improve its user-space interface if it helps experimental run of it for better understanding of the code and DAMON API usages. But in my opinion, it should avoid a case that it result in adding more complicated code that makes reading of the example difficult. Please let me know if you have different opinions and I'm missing something. >From that perspective, I think the assumption of the fast node0 and the slow node1 is not a particular problem but helps keeping the sample code easier to read. Of course it has rooms to improve, like having more documentation or better names and cleaner code. > 1) allowing users to specify just the node id, > instead of physical address, and 2) adding two new knobs. > > Patch 1 removes four knobs, `node#_start_addr` and `node#_end_addr`, which > previously required users to input the physical address of the region. > It introduces logic to conver NUMA node ids to physical address. I think this is good change. But even though mtier is a sample module, I'd like to keep the old usages not broken if possible. I'll leave more comments on it as a reply to the patch. > > Patch 2 introduces two new knobs `migrate_hot` and `migrate_cold`, which > specify the source and destination node ids in a comma-separated format. As mentioned abovely, I think the assumption of the fast node0 and the slow node1 is particularly bad, so I'm sorry but I'm not really exciting with this change. I'll leave more comments as a reply to the patch. > > Yunjeong Mun (2): > samples/damon: convert node id to physical address > samples/damon: add `migrate_hot` and `migrate_cold` knobs > > samples/damon/mtier.c | 108 ++++++++++++++++++++++++++++++++++++------ > 1 file changed, 93 insertions(+), 15 deletions(-) > > > base-commit: db16fe88cdf83a1e7fdf75de282025b6ad61d08f > -- > 2.34.1 Thanks, SJ