Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4409117ioa; Wed, 27 Apr 2022 03:16:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxeTuKwke8wzs/59VijvFhGgPrFd9x98xbglzKr2nVi0gyRqFdui+zlBUkbxRNhEZsAkLUW X-Received: by 2002:a63:4a09:0:b0:382:597:3d0d with SMTP id x9-20020a634a09000000b0038205973d0dmr23197325pga.18.1651054579175; Wed, 27 Apr 2022 03:16:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651054579; cv=none; d=google.com; s=arc-20160816; b=HWzQqgUrtXKqNYtcHe2kFPL/NWM+EkvbwwuEtz/4u4Gf9HLi0R2cy7wWk37zDODYtN WLXR7/mgmDLFzq4ZzfOvPiYbNyJBCx5/Blqc6mYB972zG97Hs48En2SQKCEbh5y2ymsa xVupktbcY+OolXKm8rYcaf74McbbrLerhhjcBAg5L3/FJ7j9EfVPryfqbLfRKghZ1sEB DmdLw/vc92ckrqre3vUHBNmuQAqe88FMvsPzzqLHaEKTFbq1uSkGYDKa+ofJQtZasLTj WisSrdmWfFtMrlWi9cecNvBw16I04bxSiK3/5fTwfVoAiulIR/AYgbYi0/orxJt3KzWz URwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=dgGgePWgxro4+zcpbHeC7ZzNbm03t3xDeLufqw+08js=; b=b07sf+ijK+w8EALT0fWICzOCpCUNRcdreirCtP/kkVEsLhfmFLkeSkoCJnHyIjuqlT mOdgD4TIxBKQhkHXRNEFjXlvACvbcvl33CtpbBSWwZySWruIy/ph34uLc75XNd2AbLXE dTC7aAKqE2JIOaUHTvoBEis0LCU2tbgIPEl5m83es8B1+RcDIvFqWBiSN0MqFAAgoOH6 G7MC5L1aCZCevmdW+p6OF4MYzS+gYVE+Wl/CZqm3tNVx2C+mbkPX2lVpjvrYq1Iw06jE VNKsfwkFQ/Jmdak3YUdIjzcVlVB1DajLz757Alos8jvNszIdaEaahOTL0l76XZsZ04Il NfnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GRwDexlP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id il11-20020a17090b164b00b001caf0adf692si5631611pjb.189.2022.04.27.03.16.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 03:16:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GRwDexlP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1E01A340AFD; Wed, 27 Apr 2022 02:37:42 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355086AbiDZUmN (ORCPT + 99 others); Tue, 26 Apr 2022 16:42:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355076AbiDZUmF (ORCPT ); Tue, 26 Apr 2022 16:42:05 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46B177C159 for ; Tue, 26 Apr 2022 13:38:57 -0700 (PDT) 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 dfw.source.kernel.org (Postfix) with ESMTPS id D7C3C61460 for ; Tue, 26 Apr 2022 20:38:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B1F68C385C1; Tue, 26 Apr 2022 20:38:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1651005536; bh=EJTLlpRlUCkEhKFM6MungmBPQeFMLPhClXDK/efWxik=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GRwDexlP/87pblyKCM6WAN/LSZPIQ/UBs4lFHVo6lWOaQssnenqG8+L1+WbOTXozY 3SAtRV65+WGruiUFbP62mEBDmt8wqPgSR2kZIIKZ0kfn/Kx05DdtfdMW9Uem3rDTAu wwZtAbLSrzZhQWYR3u1pFlIwKp7wu56aJlmzWRntcdo3D9x72CsjGYlXDbAwfe1HiS lcOm0YeRxKvsJ9a0VsdyXn9aQpDbru6GZ00oZBP3iDtkn6UNqyF2FCy1l5+xj7PKG/ yv5+W0UfjF5halkZSnDOYu1zIQulZCwM9slHj3vT9D64tDiol3YfDrt4j3YVUZgzYM bllirWCyIpNzg== From: sj@kernel.org To: akpm@linux-foundation.org Cc: linux-damon@amazon.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, SeongJae Park Subject: [PATCH 4/4] Docs/{ABI,admin-guide}/damon: document 'avail_operations' sysfs file Date: Tue, 26 Apr 2022 20:38:43 +0000 Message-Id: <20220426203843.45238-5-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220426203843.45238-1-sj@kernel.org> References: <20220426203843.45238-1-sj@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE autolearn=unavailable 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 From: SeongJae Park This commit updates the DAMON ABI and usage documents for the new sysfs file, 'avail_operations'. Signed-off-by: SeongJae Park --- .../ABI/testing/sysfs-kernel-mm-damon | 10 +++++++++- Documentation/admin-guide/mm/damon/usage.rst | 18 ++++++++++++------ 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/Documentation/ABI/testing/sysfs-kernel-mm-damon b/Documentation/ABI/testing/sysfs-kernel-mm-damon index 9e282065cbcf..d724b8a12228 100644 --- a/Documentation/ABI/testing/sysfs-kernel-mm-damon +++ b/Documentation/ABI/testing/sysfs-kernel-mm-damon @@ -40,6 +40,12 @@ 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//avail_operations +Date: Apr 2022 +Contact: SeongJae Park +Description: Reading this file returns the available monitoring operations + sets on the currently running kernel. + What: /sys/kernel/mm/damon/admin/kdamonds//contexts//operations Date: Mar 2022 Contact: SeongJae Park @@ -47,7 +53,9 @@ 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. + the operations set the context is set to use. Note that only + the operations sets that listed in 'avail_operations' file are + valid inputs. What: /sys/kernel/mm/damon/admin/kdamonds//contexts//monitoring_attrs/intervals/sample_us Date: Mar 2022 diff --git a/Documentation/admin-guide/mm/damon/usage.rst b/Documentation/admin-guide/mm/damon/usage.rst index 592ea9a50881..af6ffaea567b 100644 --- a/Documentation/admin-guide/mm/damon/usage.rst +++ b/Documentation/admin-guide/mm/damon/usage.rst @@ -68,7 +68,7 @@ comma (","). :: │ kdamonds/nr_kdamonds │ │ 0/state,pid │ │ │ contexts/nr_contexts - │ │ │ │ 0/operations + │ │ │ │ 0/avail_operations,operations │ │ │ │ │ monitoring_attrs/ │ │ │ │ │ │ intervals/sample_us,aggr_us,update_us │ │ │ │ │ │ nr_regions/min,max @@ -143,17 +143,23 @@ be written to the file. contexts// ------------- -In each context directory, one file (``operations``) and three directories -(``monitoring_attrs``, ``targets``, and ``schemes``) exist. +In each context directory, two files (``avail_operations`` and ``operations``) +and three directories (``monitoring_attrs``, ``targets``, and ``schemes``) +exist. DAMON supports multiple types of monitoring operations, including those for -virtual address space and the physical address space. You can set and get what -type of monitoring operations DAMON will use for the context by writing one of -below keywords to, and reading from the file. +virtual address space and the physical address space. You can get the list of +available monitoring operations set on the currently running kernel by reading +``avail_operations`` file. Based on the kernel configuration, the file will +list some or all of below keywords. - vaddr: Monitor virtual address spaces of specific processes - paddr: Monitor the physical address space of the system +You can set and get what type of monitoring operations DAMON will use for the +context by writing one of the keywords listed in ``avail_operations`` file and +reading from the ``operations`` file. + contexts//monitoring_attrs/ ------------------------------ -- 2.25.1