Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp733310pxm; Fri, 25 Feb 2022 18:39:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJx8/LJvAODKumzgBSsRgyWq3ke6mAAmd+ZHilXfAWhDb68op3J4G9k3U8jNxzcKkoa0I+1y X-Received: by 2002:aa7:8f33:0:b0:4cb:95a7:928c with SMTP id y19-20020aa78f33000000b004cb95a7928cmr10753488pfr.42.1645843168570; Fri, 25 Feb 2022 18:39:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645843168; cv=none; d=google.com; s=arc-20160816; b=rIzvEYE7uDc4Aza0G2JGvN55aMxNn9yWq5bcFNGT8R21sF8RryF3+5QJQ39YmduOxT hW+hu7768AECohmX9+iNNgBgCegGegGnyQL0Rd5s6XbQNXWdGQbDvpX3c6gPUxL1DH51 UiG8tUTP3EgY9uhYbgNpoez/z8Sq2mQcTp3MQ4DrGb9snCzhfcwO37t8wfxcYE6rENG9 6sIgg9yoxZoAjvjl2quZ+GhFL2MZZR5mJnBdhpWMR0huvUaLsbKZSEG+wrgy0anXYvAE ylHlmEXtXtcUiWK/KkcD74vrX/hQmhzHuPDeCwchA1Rkvu9bry24fQ2rgBYmufFPCunQ /RRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=j5Dr9OGaRd/bEJ4HS6Owgw8cCYlxSNI7lxbdvsxyans=; b=FqcdJY9vTLqLg5Eh6Z4emhjapXQ0hnF4r1iTp49lnBnhLSItM0fTPMzG57aMgs24Be YmGoPd3VuzXlrxf61V+5z/UjvOcu4zgQyuf15PPg44nTBiK67ArLzRDn6rhguSiuKFOY gJbXW6wlObuchFs67uV9FSk9ipr/5X83kTVmjXce4AA5NU8Fv9B5LuvGjpcTeOL/Ip2i e5FWqJy9uoWWovO3FBBuxywwP213Pcg+4KtBbbGxbjokv3yaRB8Cav5LFjzBZN6VM/Jq hb0Xl7uhqO6tezd7LvgI2qK1raxQRZ6XquJclHzyNy3NK3dS+soN3kfooTnqMGqgv938 fMVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=aTAvdVYF; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id t29-20020a63461d000000b0037487b6b6c5si3429375pga.826.2022.02.25.18.39.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Feb 2022 18:39:28 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=aTAvdVYF; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 867938A6CF; Fri, 25 Feb 2022 18:04:14 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232001AbiBYO7c (ORCPT + 99 others); Fri, 25 Feb 2022 09:59:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54334 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231800AbiBYO71 (ORCPT ); Fri, 25 Feb 2022 09:59:27 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B505181E51; Fri, 25 Feb 2022 06:58:54 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 2FCC0B82F74; Fri, 25 Feb 2022 14:58:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 73083C340E7; Fri, 25 Feb 2022 14:58:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1645801131; bh=pan2vHeRoZ4QSKhyxEPZHSgXnGB7vv/sxolQySS2/+k=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=aTAvdVYFMRGyxwejmr20yILLawieZdkBfQGMfxasTkuV2jkoLwLcD7rYmRNvCdmgZ X8gZtZy45lmtPo/Ajv5ClsyX+rTbMzK31tCAWGSlcOehoT4FLSluWze/WKoEx6TsI0 A9fyYsraqM3Wx/5+FQUm4VLW0yULNbK6yGyIDIzY= Date: Fri, 25 Feb 2022 15:58:49 +0100 From: Greg KH To: SeongJae Park Cc: akpm@linux-foundation.org, corbet@lwn.net, skhan@linuxfoundation.org, rientjes@google.com, xhao@linux.alibaba.com, linux-damon@amazon.com, linux-mm@kvack.org, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 13/13] Docs/ABI/testing: Add DAMON sysfs interface ABI document Message-ID: References: <20220225141007.12974-1-sj@kernel.org> <20220225141540.13082-1-sj@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220225141540.13082-1-sj@kernel.org> X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 25, 2022 at 02:15:40PM +0000, SeongJae Park wrote: > On Fri, 25 Feb 2022 14:10:07 +0000 SeongJae Park wrote: > > > Hello Gregg, > > > > > > On Fri, 25 Feb 2022 13:23:00 +0000 SeongJae Park wrote: > > > > > On Fri, 25 Feb 2022 14:18:59 +0100 Greg KH wrote: > > > > > > > On Fri, Feb 25, 2022 at 01:07:12PM +0000, SeongJae Park wrote: > > > > > This commit adds DAMON sysfs interface ABI document under > > > > > Documentation/ABI/testing. > > > > > > > > > > Signed-off-by: SeongJae Park > > > > > --- > > > > > .../ABI/testing/sysfs-kernel-mm-damon | 276 ++++++++++++++++++ > > > > > MAINTAINERS | 1 + > > > > > 2 files changed, 277 insertions(+) > > > > > create mode 100644 Documentation/ABI/testing/sysfs-kernel-mm-damon > > > > > > > > > > diff --git a/Documentation/ABI/testing/sysfs-kernel-mm-damon b/Documentation/ABI/testing/sysfs-kernel-mm-damon > > > > > new file mode 100644 > > > > > index 000000000000..11984c3a4b55 > > > > > --- /dev/null > > > > > +++ b/Documentation/ABI/testing/sysfs-kernel-mm-damon > > > > > @@ -0,0 +1,276 @@ > > > > > +what: /sys/kernel/mm/damon/ > > > > > +Date: Feb 2022 > > > > > +Contact: SeongJae Park > > > > > +Description: Interface for Data Access MONitoring (DAMON). > > > > > + See Documentation/admin-guide/mm/damon/index.rst for details. > > > > > > > > Ick, no. Put the real details in here please. That way it works with > > > > our tools. > > > > > > Ok, thanks for the quick comment! > > > > Before sending the full series again, I'd like to get your comment if you're > > ok. What do you think about below? > > > > diff --git a/Documentation/ABI/testing/sysfs-kernel-mm-damon b/Documentation/ABI/testing/sysfs-kernel-mm-damon > > new file mode 100644 > > index 000000000000..11984c3a4b55 > > --- /dev/null > > +++ b/Documentation/ABI/testing/sysfs-kernel-mm-damon > > @@ -0,0 +1,276 @@ > > +what: /sys/kernel/mm/damon/ > > +Date: Feb 2022 > > +Contact: SeongJae Park > > +Description: Interface for Data Access MONitoring (DAMON). > > + See Documentation/admin-guide/mm/damon/index.rst for details. > > Oops, I pasted wrong, sorry. Please read below: > > diff --git a/Documentation/ABI/testing/sysfs-kernel-mm-damon b/Documentation/ABI/testing/sysfs-kernel-mm-damon > new file mode 100644 > index 000000000000..e58d844b4f82 > --- /dev/null > +++ b/Documentation/ABI/testing/sysfs-kernel-mm-damon > @@ -0,0 +1,273 @@ > +what: /sys/kernel/mm/damon/ > +Date: Feb 2022 > +Contact: SeongJae Park > +Description: Interface for Data Access MONitoring (DAMON). Contains files > + for controlling DAMON. For this entry, point people at your larger documentation. > + > +What: /sys/kernel/mm/damon/admin/ > +Date: Feb 2022 > +Contact: SeongJae Park > +Description: Interface for privileged users of DAMON. Contains files for > + controlling DAMON that aimed to be used by privileged users. > + > +What: /sys/kernel/mm/damon/admin/kdamonds/nr_kdamonds > +Date: Feb 2022 > +Contact: SeongJae Park > +Description: Writing a number 'N' to this file creates the number of > + directories for controlling each DAMON worker thread (kdamond) > + named '0' to 'N-1' under the kdamonds/ directory. > + > +What: /sys/kernel/mm/damon/admin/kdamonds//state > +Date: Feb 2022 > +Contact: SeongJae Park > +Description: Writing 'on' or 'off' to this file makes the kdamond starts or > + stops, respectively. Reading the file returns the keywords > + based on the current status. Writing 'update_schemes_stats' to > + the file updates contents of schemes stats files of the > + kdamond. > + > +What: /sys/kernel/mm/damon/admin/kdamonds//pid > +Date: Feb 2022 > +Contact: SeongJae Park > +Description: Reading this file returns the pid of the kdamond if it is > + running. > + > +What: /sys/kernel/mm/damon/admin/kdamonds//contexts/nr_contexts > +Date: Feb 2022 > +Contact: SeongJae Park > +Description: Writing a number 'N' to this file creates the number of > + directories for controlling each DAMON context named '0' to > + 'N-1' under the contexts/ directory. > + > +What: /sys/kernel/mm/damon/admin/kdamonds//contexts//operations > +Date: Feb 2022 > +Contact: SeongJae Park > +Description: Writing a keyword for a monitoring operations set ('vaddr' for > + virtual address spaces monitoring, and 'paddr' for the physical > + address space monitoring) to this file makes the context to use > + the operations set. Reading the file returns the keyword for > + the operations set the context is set to use. > + > +What: /sys/kernel/mm/damon/admin/kdamonds//contexts//monitoring_attrs/intervals/sample_us > +Date: Feb 2022 > +Contact: SeongJae Park > +Description: Writing a value to this file sets the sampling interval of the > + DAMON context in microseconds as the value. Reading this file > + returns the value. > + > +What: /sys/kernel/mm/damon/admin/kdamonds//contexts//monitoring_attrs/intervals/aggr_us > +Date: Feb 2022 > +Contact: SeongJae Park > +Description: Writing a value to this file sets the aggregation interval of > + the DAMON context in microseconds as the value. Reading this > + file returns the value. > + > +What: /sys/kernel/mm/damon/admin/kdamonds//contexts//monitoring_attrs/intervals/update_us > +Date: Feb 2022 > +Contact: SeongJae Park > +Description: Writing a value to this file sets the update interval of the > + DAMON context in microseconds as the value. Reading this file > + returns the value. > + > +What: /sys/kernel/mm/damon/admin/kdamonds//contexts//monitoring_attrs/nr_regions/min > + > +WDate: Feb 2022 > +Contact: SeongJae Park > +Description: Writing a value to this file sets the minimum number of > + monitoring regions of the DAMON context as the value. Reading > + this file returns the value. > + > +What: /sys/kernel/mm/damon/admin/kdamonds//contexts//monitoring_attrs/nr_regions/max > +Date: Feb 2022 > +Contact: SeongJae Park > +Description: Writing a value to this file sets the maximum number of > + monitoring regions of the DAMON context as the value. Reading > + this file returns the value. > + > +What: /sys/kernel/mm/damon/admin/kdamonds//contexts//targets/nr_targets > +Date: Feb 2022 > +Contact: SeongJae Park > +Description: Writing a number 'N' to this file creates the number of > + directories for controlling each DAMON target of the context > + named '0' to 'N-1' under the contexts/ directory. > + > +What: /sys/kernel/mm/damon/admin/kdamonds//contexts//targets//pid_target > +Date: Feb 2022 > +Contact: SeongJae Park > +Description: Writing to and reading from this file sets and gets the pid of > + the target process if the context is for virtual address spaces > + monitoring, respectively. > + > +What: /sys/kernel/mm/damon/admin/kdamonds//contexts//targets//regions/nr_regions > +Date: Feb 2022 > +Contact: SeongJae Park > +Description: Writing a number 'N' to this file creates the number of > + directories for setting each DAMON target memory region of the > + context named '0' to 'N-1' under the regions/ directory. In > + case of the virtual address space monitoring, DAMON > + automatically sets the target memory region based on the target > + processes' mappings. > + > +What: /sys/kernel/mm/damon/admin/kdamonds//contexts//targets//regions//start > +Date: Feb 2022 > +Contact: SeongJae Park > +Description: Writing to and reading from this file sets and gets the start > + address of the monitoring region. > + > +What: /sys/kernel/mm/damon/admin/kdamonds//contexts//targets//regions//end > +Date: Feb 2022 > +Contact: SeongJae Park > +Description: Writing to and reading from this file sets and gets the end > + address of the monitoring region. > + > +What: /sys/kernel/mm/damon/admin/kdamonds//contexts//schemes/nr_schemes > +Date: Feb 2022 > +Contact: SeongJae Park > +Description: Writing a number 'N' to this file creates the number of > + directories for controlling each DAMON-based operation scheme > + of the context named '0' to 'N-1' under the schemes/ directory. > + > +What: /sys/kernel/mm/damon/admin/kdamonds//contexts//schemes//action > +Date: Feb 2022 > +Contact: SeongJae Park > +Description: Writing to and reading from this file sets and gets the action > + of the scheme. > + > +What: /sys/kernel/mm/damon/admin/kdamonds//contexts//schemes//access_pattern/sz/min > +Date: Feb 2022 > +Contact: SeongJae Park > +Description: Writing to and reading from this file sets and gets the mimimum > + size of the scheme's target regions in bytes. > + > +What: /sys/kernel/mm/damon/admin/kdamonds//contexts//schemes//access_pattern/sz/max > +Date: Feb 2022 > +Contact: SeongJae Park > +Description: Writing to and reading from this file sets and gets the maximum > + size of the scheme's target regions in bytes. > + > +What: /sys/kernel/mm/damon/admin/kdamonds//contexts//schemes//access_pattern/nr_accesses/min > +Date: Feb 2022 > +Contact: SeongJae Park > +Description: Writing to and reading from this file sets and gets the manimum > + 'nr_accesses' of the scheme's target regions. > + > +What: /sys/kernel/mm/damon/admin/kdamonds//contexts//schemes//access_pattern/nr_accesses/max > +Date: Feb 2022 > +Contact: SeongJae Park > +Description: Writing to and reading from this file sets and gets the maximum > + 'nr_accesses' of the scheme's target regions. > + > +What: /sys/kernel/mm/damon/admin/kdamonds//contexts//schemes//access_pattern/age/min > +Date: Feb 2022 > +Contact: SeongJae Park > +Description: Writing to and reading from this file sets and gets the minimum > + 'age' of the scheme's target regions. > + > +What: /sys/kernel/mm/damon/admin/kdamonds//contexts//schemes//access_pattern/age/max > +Date: Feb 2022 > +Contact: SeongJae Park > +Description: Writing to and reading from this file sets and gets the maximum > + 'age' of the scheme's target regions. > + > +What: /sys/kernel/mm/damon/admin/kdamonds//contexts//schemes//quotas/ms > +Date: Feb 2022 > +Contact: SeongJae Park > +Description: Writing to and reading from this file sets and gets the time > + quota of the scheme in milliseconds. > + > +What: /sys/kernel/mm/damon/admin/kdamonds//contexts//schemes//quotas/bytes > +Date: Feb 2022 > +Contact: SeongJae Park > +Description: Writing to and reading from this file sets and gets the size > + quota of the scheme in bytes. > + > +What: /sys/kernel/mm/damon/admin/kdamonds//contexts//schemes//quotas/reset_interval_ms > +Date: Feb 2022 > +Contact: SeongJae Park > +Description: Writing to and reading from this file sets and gets the quotas > + charge reset interval of the scheme in milliseconds. > + > +What: /sys/kernel/mm/damon/admin/kdamonds//contexts//schemes//quotas/weights/sz_permil > +Date: Feb 2022 > +Contact: SeongJae Park > +Description: Writing to and reading from this file sets and gets the > + under-quota limit regions prioritization weight for 'size' in > + permil. > + > +What: /sys/kernel/mm/damon/admin/kdamonds//contexts//schemes//quotas/weights/nr_accesses_permil > +Date: Feb 2022 > +Contact: SeongJae Park > +Description: Writing to and reading from this file sets and gets the > + under-quota limit regions prioritization weight for > + 'nr_accesses' in permil. > + > +What: /sys/kernel/mm/damon/admin/kdamonds//contexts//schemes//quotas/weights/age_permil > +Date: Feb 2022 > +Contact: SeongJae Park > +Description: Writing to and reading from this file sets and gets the > + under-quota limit regions prioritization weight for 'age' in > + permil. > + > +What: /sys/kernel/mm/damon/admin/kdamonds//contexts//schemes//watermarks/metric > +Date: Feb 2022 > +Contact: SeongJae Park > +Description: Writing to and reading from this file sets and gets the metric > + of the watermarks for the scheme. The writable/readable > + keywords for this file are 'none' for disabling the watermarks > + feature, or 'free_mem_rate' for the system's global free memory > + rate in permil. > + > +What: /sys/kernel/mm/damon/admin/kdamonds//contexts//schemes//watermarks/interval_us > +Date: Feb 2022 > +Contact: SeongJae Park > +Description: Writing to and reading from this file sets and gets the metric > + check interval of the watermarks for the scheme in > + microseconds. > + > +What: /sys/kernel/mm/damon/admin/kdamonds//contexts//schemes//watermarks/high > +Date: Feb 2022 > +Contact: SeongJae Park > +Description: Writing to and reading from this file sets and gets the high > + watermark of the scheme in permil. > + > +What: /sys/kernel/mm/damon/admin/kdamonds//contexts//schemes//watermarks/mid > +Date: Feb 2022 > +Contact: SeongJae Park > +Description: Writing to and reading from this file sets and gets the mid > + watermark of the scheme in permil. > + > +What: /sys/kernel/mm/damon/admin/kdamonds//contexts//schemes//watermarks/low > +Date: Feb 2022 > +Contact: SeongJae Park > +Description: Writing to and reading from this file sets and gets the low > + watermark of the scheme in permil. > + > +What: /sys/kernel/mm/damon/admin/kdamonds//contexts//schemes//stats/nr_tried > +Date: Feb 2022 > +Contact: SeongJae Park > +Description: Reading this file returns the number of regions that the action > + of the scheme has tried to be applied. > + > +What: /sys/kernel/mm/damon/admin/kdamonds//contexts//schemes//stats/sz_tried > +Date: Feb 2022 > +Contact: SeongJae Park > +Description: Reading this file returns the total size of regions that the > + action of the scheme has tried to be applied in bytes. > + > +What: /sys/kernel/mm/damon/admin/kdamonds//contexts//schemes//stats/nr_applied > +Date: Feb 2022 > +Contact: SeongJae Park > +Description: Reading this file returns the number of regions that the action > + of the scheme has successfully applied. > + > +What: /sys/kernel/mm/damon/admin/kdamonds//contexts//schemes//stats/sz_applied > +Date: Feb 2022 > +Contact: SeongJae Park > +Description: Reading this file returns the total size of regions that the > + action of the scheme has successfully applied in bytes. > + > +What: /sys/kernel/mm/damon/admin/kdamonds//contexts//schemes//stats/qt_exceeds > +Date: Feb 2022 > +Contact: SeongJae Park > +Description: Reading this file returns the number of the exceed events of > + the scheme's quotas. > Yes, this looks much better, thanks. But you might want to change the month as I doubt this will be merged in the next few days :) thanks, greg k-h