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 16619C8303D for ; Fri, 4 Jul 2025 18:24:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A9BED6B806A; Fri, 4 Jul 2025 14:24:11 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A4CF66B8067; Fri, 4 Jul 2025 14:24:11 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 98A986B806A; Fri, 4 Jul 2025 14:24:11 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 8869C6B8067 for ; Fri, 4 Jul 2025 14:24:11 -0400 (EDT) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 3F5CDC0209 for ; Fri, 4 Jul 2025 18:24:11 +0000 (UTC) X-FDA: 83627406702.21.2F869BF Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) by imf02.hostedemail.com (Postfix) with ESMTP id 77F2680012 for ; Fri, 4 Jul 2025 18:24:09 +0000 (UTC) Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Irx2uYzK; spf=pass (imf02.hostedemail.com: domain of sj@kernel.org designates 172.105.4.254 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=1751653449; 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=eFDqkBrJ9b4f0w0rGeLWC0Sy7o+cUXijoN+wqBWvquQ=; b=FAXKD2XBH8DMTz7uBgyT9UPsfR0g3tqSlhaIGZPUGzQPPZU4itcGEe5XYT/5I8rX76IYMT gDIhD1x275aa908c6o72qUnJW0Kpx8zYJmnN0VoXpGI5I3/hB9Fu5HWXi/YjWpJ+Uvllt9 6HnnB4iQ3jwiVAirkFDuJQQVujXWpXc= ARC-Authentication-Results: i=1; imf02.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Irx2uYzK; spf=pass (imf02.hostedemail.com: domain of sj@kernel.org designates 172.105.4.254 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=1751653449; a=rsa-sha256; cv=none; b=YP/0p2rmGhCcfIrYMLR9cp63uVz6i89cdWD1A7ocnPiEaCOR95lE4tp/WOyPu9ixmTMzht bsYHcODc7J0zZ66NCks29xpKADWTEffHaSe4wRF73JEKFX4lLhz2FifB++A0PyjLGDwUu1 JZZzrRIt6nw8nZRiv9N8/ojQaFChipM= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id A0B4661139; Fri, 4 Jul 2025 18:24:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2E84BC4CEE3; Fri, 4 Jul 2025 18:24:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1751653448; bh=x/a97G6tGt7l3YWx8tm//SOtg12sNF3g8piy675aVjc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Irx2uYzKkDetJQaPWejxHZb3Kx6pybEHKZpto6Bp6Wtk2rZxqF6ZwYJgcs6XPicVF UEHo6vbLVAuOZ3UlvKlupEn3DAPIwGnjqRzZIsIxKYIyagS/LP61nUUk5/1xRJtQzf atlFouHudW1TdueywtaePPfpp2TmtNUNnDd/eidQBzn6zPdK8MfiyqhdGtpvtfZqSI BevBXYn9Oi40Lh78rnkP8IZbyNnXduKDK6ycbUp208EKi1bBoYSV5FSJNbXlajkvoa 6NgTiHrQJFBTXtqMqVlP7gmF4vV3eHB6uimyaBWoQrlN3ZoF5VUSc3NR3wD+E5O0l2 qhgsKIqRG2eSA== 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 v2] samples/damon: support automatic node address detection Date: Fri, 4 Jul 2025 11:24:05 -0700 Message-Id: <20250704182405.51346-1-sj@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250704070600.1786-1-yunjeong.mun@sk.com> References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspam-User: X-Rspamd-Queue-Id: 77F2680012 X-Rspamd-Server: rspam09 X-Stat-Signature: 3wqidumtxa5c91ctzf3e7zg7arykybjb X-HE-Tag: 1751653449-643703 X-HE-Meta: U2FsdGVkX18brfE2y6+WOGuw+8kuqeMjGphmaSs1YkMqx5eH66GZGXaJ9hKg8+2B9oDqoWjj3GkFYYGP0E/Ak1ncyjZT1jBtMYcomaBrmIv8upcRgFOhonUqFBxX4zajUWw2LjtSJGhWZLLBQpL0ROkRcH/+e53fd2eIggog4bjrBIeJznY3Cv9/MxacDptwZ2priNbRPDfKi/PBoDKO9XcKfeTJ0lD/nEy6+fidlvXn9eFv+UjOBn2gBW8NPi4EnALVmgjR4cHvTRjKxF/s339XC/njOnsXBX/9UNlFXGtSamYuCquYn1ajc4w9TI04V3k8vHsc2Wy/oKiOmQgOi1q/UoFwR6Ap/bsmEKmXwP+LgOffDUnIwl7wTwPOPbi3CxTLkjbenY0pstA4or4eRhUf2bIPsXMSheSwC//lVKJKyhQWcN+zkRYtMP56UUPGPH/qG2eWdiE0jegXAA6riv02n6q3UnWUuXNNE62Vr4WZlF8BYmLZUbsaIbb7zNLLy2tSjLiuwePd2DtMN+O2j4Ci6TtsiXnV8/tjck5nRAuW8hfb3kxi3SohKdFPILsYsy1IuUtOULvFMsH3/KOmcFJW0+59RhqX/mle3sw9gNcPs+e93Z82YiKI5OCz3888w/vbOqEoQBurtG5dAIMeSOQ1tfQtAH2cn0+dlSmvOgNa4uYjUUkunMMFpB+4c6Q+7gWmo+yCyRVr1ENXcdlC5/SVzeM3fn6U2NS3axGYucrlxfhTVOBYRdJMuXR52q1Up+Hk8Sr8GFrX2FU38D3qXP6BH8aofzuJAyo/++nPeCy9m3ADyi/gKMZoYunSxEsgJJm1Oa9hTL2PX4BWCgfQkm6IKJNUkl1KEjx5upyAUTEpudlNKNyKXEnral/vMFs5ea3hlsvlVFjEaxkMPWup3q9tNOhpthoFyz2EWatFl5rIkroqMuL/3fUxtzPvpH/8ID+Cqh6n8zo62M8X6+Y +HhdnSTF eXgqd7N1L52/iYQwow77FnuPtjmyNaS+6Jw2K/R73vUNnSiLjKvNQmkFcGrgT8AK8FH/+Zk57KrFZBeJzHBQJYHbllK0QzhgZyHIR3HKNCHOCTM3thjjkpz1P05jCIen5S0ZSMP0W1tILtf/bBx/k9iCF7+hwE+uEr69rCkLMTJVuCsy/jVx3z/aJc1LLmLBmQTR40jbg1wSs19Rf8X+pCguwgSN25nXCWzYtvLS9JHKQC8A405cBTT+NXd2zpQB/UPBbcv7u7/HKRs37BIG7Q4MUTbRkAu3XMFuZ 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 Fri, 4 Jul 2025 16:05:59 +0900 Yunjeong Mun wrote: > Hello Seongjae, > > On Thu, 3 Jul 2025 09:52:37 -0700 SeongJae Park wrote: > > Hello Yunjeong, > > > > On Thu, 3 Jul 2025 16:44:22 +0900 Yunjeong Mun wrote: > > > > > This patch adds a new knob `detect_node_addresses`, which determines > > > whether the physical address range is set manually using the existing > > > knobs or automatically by the mtier module. When `detect_node_addresses` > > > set to 'Y', mtier automatically converts node0 and node1 to their > > > physical addresses. If set to 'N', it uses the existing > > > 'node#_start_addr' and 'node#_end_addr' to define regions as before. > > > > Thank you for this patch! > > > > > > > > Suggested-by: Honggyu Kim > > > Signed-off-by: Yunjeong Mun > > > > Reviewed-by: SeongJae Park > > > > > --- > > > > From next time, please consider adding a summary of what changes have made from > > the previous version here, like suggested[1] on the documentation. > > Ok, I'll add it next time, thanks:) > One concern I have about this patch is the requirement to set > 'detect_node_addresses=Y' before setting 'enable=Y'. Not following > this order causes an error, which makes it difficult for users to use > the module. That's same to existing address parameters, and similar to existing DAMON user interfaces. Parameters are applied when starting DAMON. Parameters can be updated while DAMON is running, but it requires explicit "commit" action for updating those at once. DAMON sample modules don't support the runtime commit feature, though. I think it is not a bad tradeoff for simplicity of the code, given the purpose of sample modules. > So, how about removing 'detect_node_address'? Instead, we > could convert node0,1 to physical address automatically by default, and use > existing 'node#_*_addr' values only when those files are explicitly set. This would make old usage broken. Since this is a sample module, I think that could be justified if there is a very good reason. But I don't think we have a very good reason here. So I suggest not to do that. Thanks, SJ [...]