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 E0170C83F1B for ; Wed, 16 Jul 2025 05:18:56 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 670916B008C; Wed, 16 Jul 2025 01:18:56 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 621076B0092; Wed, 16 Jul 2025 01:18:56 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 536A06B0093; Wed, 16 Jul 2025 01:18:56 -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 47F3C6B008C for ; Wed, 16 Jul 2025 01:18:56 -0400 (EDT) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id E5439B79D4 for ; Wed, 16 Jul 2025 05:18:55 +0000 (UTC) X-FDA: 83668973430.21.F459E49 Received: from invmail4.hynix.com (exvmail4.hynix.com [166.125.252.92]) by imf13.hostedemail.com (Postfix) with ESMTP id 3B1E520009 for ; Wed, 16 Jul 2025 05:18:52 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; spf=pass (imf13.hostedemail.com: domain of honggyu.kim@sk.com designates 166.125.252.92 as permitted sender) smtp.mailfrom=honggyu.kim@sk.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1752643134; a=rsa-sha256; cv=none; b=FAtOZmmty+lIhvREZZauID11MDm0r6o49JkGUrvPGe3esQQJKdIQoFCO2K9ZJZnbrlF+2E PFjvik2ZcRHTqLpsn8UxUZ63OMTCaPgVoaYpdFU6WuldGOZ9ifpQSUF6m8gSBanp5LLBNm YsRGYa9FKVXH7L9tuDo9SX+0hplebqw= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=none; spf=pass (imf13.hostedemail.com: domain of honggyu.kim@sk.com designates 166.125.252.92 as permitted sender) smtp.mailfrom=honggyu.kim@sk.com; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1752643134; 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-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JiQFCd163Shakwcqf7JO9SBVoGYapHiKjGiJx8vpbbI=; b=BkXGTSkOq1pGzagP4wS6PeFA7x8hIpJNGvCGS3AgHwas5qe2UK/LT9xAuyj1BBZE3HPP0b 4od/iQrgvrCbfS+4sZLTbdy+MctmUPpg0xHfLWdzZsWVsDa0Dt1nN9hDHb0D5TLnIcKMb+ a58M+/cd7fV0jiYvTBeE5M0zaGiC6Dw= X-AuditID: a67dfc5b-681ff7000002311f-78-68773639fce4 Message-ID: <4c83fac5-0990-4280-9a21-969d83582112@sk.com> Date: Wed, 16 Jul 2025 14:18:48 +0900 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Cc: kernel_team@skhynix.com, Andrew Morton , Jonathan Corbet , damon@lists.linux.dev, kernel-team@meta.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [RFC PATCH 0/4] mm/damon/sysfs: support periodic and automated stats update Content-Language: ko To: SeongJae Park References: <20250716025118.92544-1-sj@kernel.org> From: Honggyu Kim In-Reply-To: <20250716025118.92544-1-sj@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrHLMWRmVeSWpSXmKPExsXC9ZZnka6lWXmGQcdsUYs569ewWTw50M5o 8eT/b1aLfReB3IVtS1gsLu+aw2Zxb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JtNQE3iystJYDangLHE/cYTzBC9ZhJdW7sYIWx5ie1v5zBPYOSbheSOWUhWzELSMgtJywJG llWMIpl5ZbmJmTmmesXZGZV5mRV6yfm5mxiBgb+s9s/EHYxfLrsfYhTgYFTi4d1hXZYhxJpY VlyZe4hRgoNZSYR38iWgEG9KYmVValF+fFFpTmrxIUZpDhYlcV6v8NQEIYH0xJLU7NTUgtQi mCwTB6dUA+PyZ/ODKi9+87vWwWZvkMa/llGxJ1XO0qnw6svwq/1n2RhUix48b5VrjUzYddS2 6GL5Jke7Bct/rPgQ1+s7e+31ORsZz9ifPV+5J8r36/fbE2Yo/Exj9t0ZrKwcdeDPTMOdNU9P ZFr2zJslOF+kmzWsv8Pz+oo5wU1eM24zPmKqFehc/1otx02JpTgj0VCLuag4EQBGPn4EeAIA AA== X-CFilter-Loop: Reflected X-Rspam-User: X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 3B1E520009 X-Stat-Signature: oid7g6wk51mi9iumwzqu9idojm1dw7in X-HE-Tag: 1752643132-171167 X-HE-Meta: U2FsdGVkX18FNLhtlOIOIVsHsTY6vSmqH2eBSiVPDsTXBhGiiTBqB8T8Cozdh38EV464cO7cDzOlIIF99J2Ip76705iLW6kJ6KyMdjdWAXHLTo97/lk/wl9SIejeQucnF2642H18dYm5hfZr1pvkDShoQM2mQRiRaxh5hGstmdzlY/33non6xR1ReSYtSkVmoKPGx2QlSAvkq8IXwpOsazpSnI8zZHD0uBhKGQjuM148tQxZVRUUOA/xDkNSLArvghpKEP54FG9GuH1rOkuXX+yFVVBBr1sK81r4YUa2p5NjS6tXN5P4ZqmWiPtHEof0dJP16odVPC9H1cClyMeHBPzZkGmcVqq5TWqNELTLAV64OmwNmUFSeBvJBTbRIRKpBi0BEAzeJ5s+vzQZbLjtvZZEHM/33KY+eTLRccTkxIBdaHUJNiJte9IWC56pXigvc2jzAViYWKyjGSjbcNdQeh0KVcR3OWPZIffYQEWLMvJrUWPWCChOLKbTXqNK9czVZWYA18Gouw4KLCwxr2sPBUXkM7VRcjWUGjJc1MwUtbp0kVUyUFv+W0iBJzpp2XTp14KSKswTQfnwuG9IBFwozolBLPCTHqc6b59mkS4HHqXBoueah6PF0LvFv8zcHWiFtfqntdF01bu+vaFv5AH45VYLK1n7Ef/O9wG7EXyaEg9mh2Bzg3DKervPKwcYqWu3OCadc7oexqEGUps9/7AlXzgJcYUyZrdzzMPR9EMF5zIie4jK8QvIRE+ipbKoIt+sXJb7QWQNMnr5TBfSIjekScDfYdfE45e22L3BUE5aY3aFZJDrEoB+5i+l8if/HsOqFrSoaImVM6tDBO5z2CYjW2svWZ7xYpz7JUe+Gbn9+mqSBoEJSQcFZtNAsthyR8d1SW1cpCkfqwkCE/4ARPOnmDhStkcXeb7dH/VmE+WvjnFMxbFJ6mAjbKCWDBhcMIvzWoTbJfBBggpRrdiXeEO lr7DomAz oJjOGYxOyj9dwlCJiWwnw5us6cXMEpO4fMf+8lkmRxMn41wIbv2wgdUYO/8siLX4SMnDIftUI3A5U6vnbslTbE6tXwth09JfUc7ZK 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 7/16/2025 11:51 AM, SeongJae Park wrote: > On Wed, 16 Jul 2025 10:58:06 +0900 Honggyu Kim wrote: > >> Hi SeongJae, >> >> On 7/16/2025 8:43 AM, SeongJae Park wrote: >>> On Wed, 16 Jul 2025 07:20:57 +0900 Honggyu Kim wrote: >>> >>>> Hi SeongJae, >>>> >>>> On 7/13/2025 5:46 AM, SeongJae Park wrote: >>>>> DAMON sysfs interface provides files for reading DAMON internal status >>>>> including DAMOS stats. The content of the files are not automatically >>>>> updated, though. Users should manually request updates of the contents >>>>> by writing a special command to 'state' file of each kdamond directory. >>>>> This interface is good for minimizing overhead, but causes the below >>>>> problems. [...snip...] >>>>> Introduce a new sysfs file, namely refresh_ms, for asking DAMON sysfs >>>>> interface to repeat the essential contents update with a user-specified >>>>> time delay. >>>> >>>> Thanks for working on this, but I have a few questions. >>>> 1. Could you please list up what are the "essential contents"? >>> >>> Thank you for asking this. The contents are auto-tuned monitoring intervals, >>> DAMOS stats, and auto-tuned effective size quota. >> >> Thanks, but I meant the specific list of damon knobs refreshed. If there are >> too many knobs, then don't have to list them all. > > I guess you are saying about sysfs files? Yes, I think listing those all is > unnecessary. OK. No problem then. >>> I will add these on the next version cover letter. >> >> Thanks. >> >>>> 2. Does it mean that it is different from writing "commit" to "state"? >>>> 3. If not, then is there equivalent action to writing something to "state"? >>> >>> "refresh_ms" works same to other DAMON parameter files. You can set it before >>> starting DAMON, or "commit" new values (including 0 for turning this refresh >>> off) in runtime. >>> >>> I'm not that confident if I understood your point very well, especially what >>> "it"s mean. Let me know if I'm misunderstanding something. >> >> I mean writing "commit" to "state" refresh all knobs, > > Assuming "knobs" mean sysfs files, this is incorrect. Writing "commit" to > "state" passes the parameters written on appropriate files to running kdamond. > It doesn't update any sysfs files until a "update_*" keyword is written to the > "state" file. I thought writing "commit" to "state" applies config changes and updates all the readable sysfs files together, but it doesn't. Thanks for the correction. > >> but it seems "refresh_ms" >> internally refresh paritial knobs so I was wondering what are refreshed and what >> aren't. >> >> Regarding the "equivalent action", I was also wondering if there is a command >> that works same as "refresh_ms" internally does among the command below. >> >> update_tuned_intervals >> commit_schemes_quota_goals >> update_schemes_stats >> update_schemes_tried_regions >> update_schemes_tried_bytes >> clear_schemes_tried_regions >> update_schemes_effective_quotas >> >> https://docs.kernel.org/admin-guide/mm/damon/usage.html#kdamonds-n >> >> In other words, if there is the same command listed above, then users might be >> able to run a script that regularaly write the command to the current "state" >> even without this "refresh_ms". I know having "refresh_ms" is much better >> though. > > Thank you for this nice question. Yes. Enabling "refresh_ms" is roughly same > to periodically writing > "update_{tuned_intervals,schemes_stats,schemes_effective_quotas" to "state" > file. OK. I get that "refresh_ms" does periodic write the combination of them to "state" without "update_{schemes_tried_regions,schemes_tried_bytes}. In other words, it is same as periodic execution of the follows. echo update_tuned_intervals > state echo update_schemes_stats > state echo update_schemes_effective_quotas > state That makes my question clear. Thanks for the explanation! Thanks, Honggyu > > > Thanks, > SJ > > [...]