From patchwork Fri Oct 8 09:45:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 12544825 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 769DCC433F5 for ; Fri, 8 Oct 2021 09:45:28 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 23F3D60F93 for ; Fri, 8 Oct 2021 09:45:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 23F3D60F93 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id BDDB06B0074; Fri, 8 Oct 2021 05:45:27 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B66D16B0075; Fri, 8 Oct 2021 05:45:27 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A2E8E6B0078; Fri, 8 Oct 2021 05:45:27 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0133.hostedemail.com [216.40.44.133]) by kanga.kvack.org (Postfix) with ESMTP id 919076B0074 for ; Fri, 8 Oct 2021 05:45:27 -0400 (EDT) Received: from smtpin33.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 4F6DF2B357 for ; Fri, 8 Oct 2021 09:45:27 +0000 (UTC) X-FDA: 78672787494.33.36A9819 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf15.hostedemail.com (Postfix) with ESMTP id 06F90D0020CB for ; Fri, 8 Oct 2021 09:45:26 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id BFD146103C; Fri, 8 Oct 2021 09:45:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1633686326; bh=uC4W2jWbff4o+8j/4jlq8gabmGnb3ze9ixSc1qm46Ik=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ovmuYHnBibd0vBnkLzr8AdxGIe9UdvMWk7Z5F1lRlIYZyfrNf5GwfP/wt7IvnAgR1 ODumsHwxe5W1Imwm4HrV7iUwhJIhc9cPICAgASxRlhYcCF05MDWgHNcOjSOjvj4o6S As343tN6Vjhi/LmLhQbyqd/bQS4gzK2bRiGTWL3BGLnTyP+4inKjDIS37B95LiBq2w FefVAZjFLFl2Y2lufEvh45Tq/OyA6xlPm/n6TRinBq8cA03XNPaOELifeXEEE1AJzg JZ6qE+8eWzu5x/HAzJmzcDg6mi56FDQzvHd1qoGRe8MFcMS7UMXmdxaoM0Oto8rP8j blsphceiKOKOw== From: SeongJae Park To: akpm@linux-foundation.org Cc: SeongJae Park , Jonathan.Cameron@Huawei.com, amit@kernel.org, benh@kernel.crashing.org, corbet@lwn.net, david@redhat.com, dwmw@amazon.com, elver@google.com, foersleo@amazon.de, gthelen@google.com, markubo@amazon.de, rientjes@google.com, shakeelb@google.com, shuah@kernel.org, linux-damon@amazon.com, linux-mm@kvack.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/4] Docs/damon/usage: Update for the record feature Date: Fri, 8 Oct 2021 09:45:09 +0000 Message-Id: <20211008094509.16179-4-sj@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211008094509.16179-1-sj@kernel.org> References: <20211008094509.16179-1-sj@kernel.org> X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 06F90D0020CB X-Stat-Signature: 9ksy8dy5tatteoutw5fxp6dodpix56hb Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=ovmuYHnB; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf15.hostedemail.com: domain of sj@kernel.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=sj@kernel.org X-HE-Tag: 1633686326-981256 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: This commit updates the usage document for the record feature of DAMON. Signed-off-by: SeongJae Park --- Documentation/admin-guide/mm/damon/usage.rst | 22 ++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/Documentation/admin-guide/mm/damon/usage.rst b/Documentation/admin-guide/mm/damon/usage.rst index c0296c14babf..9973dac7101e 100644 --- a/Documentation/admin-guide/mm/damon/usage.rst +++ b/Documentation/admin-guide/mm/damon/usage.rst @@ -34,8 +34,8 @@ the reason, this document describes only the debugfs interface debugfs Interface ================= -DAMON exports four files, ``attrs``, ``target_ids``, ``schemes`` and -``monitor_on`` under its debugfs directory, ``/damon/``. +DAMON exports five files, ``attrs``, ``target_ids``, ``record``, ``schemes`` +and ``monitor_on`` under its debugfs directory, ``/damon/``. Attributes @@ -74,6 +74,24 @@ check it again:: Note that setting the target ids doesn't start the monitoring. +Record +------ + +This debugfs file allows you to record monitored access patterns in a regular +binary file. The recorded results are first written in an in-memory buffer and +flushed to a file in batch. Users can get and set the size of the buffer and +the path to the result file by reading from and writing to the ``record`` file. +For example, below commands set the buffer to be 4 KiB and the result to be +saved in ``/damon.data``. :: + + # cd /damon + # echo "4096 /damon.data" > record + # cat record + 4096 /damon.data + +The recording can be disabled by setting the buffer size zero. + + Schemes -------