From: Andrew Morton <akpm@linux-foundation.org>
To: SeongJae Park <sj@kernel.org>
Cc: 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: Re: [PATCH 1/4] mm/damon/dbgfs: Implement recording feature
Date: Sun, 10 Oct 2021 15:01:40 -0700 [thread overview]
Message-ID: <20211010150140.be96f07048079188d9d6b613@linux-foundation.org> (raw)
In-Reply-To: <20211008094509.16179-1-sj@kernel.org>
On Fri, 8 Oct 2021 09:45:06 +0000 SeongJae Park <sj@kernel.org> wrote:
> The user space can get the monitoring results via the 'damon_aggregated'
> tracepoint event. For simplicity and brevity, the tracepoint events
> have some duplicated information such as 'target_id' and 'nr_regions',
> though. As a result, its size is greater than really needed. Also,
> dealing with the tracepoint could be complex for some simple use cases.
> To provide a way for getting more efficient and simple monitoring
> results to user space, this commit implements 'recording' feature in
> 'damon-dbgfs'.
>
> The feature is exported to the user space via a new debugfs file named
> 'record', which is located in '<debugfs>/damon/' directory. The file
> allows users to record monitored access patterns in a regular binary
> file in a simple format.
Binary files are troublesome.
Is the format of this file documented anywhere?
I assume that the file's contents will have different representations
depending on host endianness and word size and I further assume that
the provided python script won't handle this very well?
> 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'.
> With a simple test workload[1], recording the tracepoint event using
> 'perf-record' results in 1.7 MiB 'perf.data' file. When the access
> pattern is recorded via this feature, the size is reduced to 264 KiB.
> Also, the resulting record file is simple enough to be manipulated by a
> small (100 lines of code) python script which will be introduced by a
> following commit ("selftests/damon: Test recording feature").
How useful and important is this? I mean, is it tremendously better or
is it a little bit nice to have? A description of the overall benefit
to DAMON users would be useful in helping others to understand the
benefit of this change.
next prev parent reply other threads:[~2021-10-10 22:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-08 9:45 [PATCH 1/4] mm/damon/dbgfs: Implement recording feature SeongJae Park
2021-10-08 9:45 ` [PATCH 2/4] mm/damon/dbgfs-test: Implement kunit tests for the record feature SeongJae Park
2021-10-08 9:45 ` [PATCH 3/4] selftests/damon: Test recording feature SeongJae Park
2021-10-08 9:45 ` [PATCH 4/4] Docs/damon/usage: Update for the record feature SeongJae Park
2021-10-10 22:01 ` Andrew Morton [this message]
2021-10-11 9:30 ` [PATCH 1/4] mm/damon/dbgfs: Implement recording feature SeongJae Park
2021-10-11 21:02 ` Andrew Morton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211010150140.be96f07048079188d9d6b613@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=Jonathan.Cameron@Huawei.com \
--cc=amit@kernel.org \
--cc=benh@kernel.crashing.org \
--cc=corbet@lwn.net \
--cc=david@redhat.com \
--cc=dwmw@amazon.com \
--cc=elver@google.com \
--cc=foersleo@amazon.de \
--cc=gthelen@google.com \
--cc=linux-damon@amazon.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=markubo@amazon.de \
--cc=rientjes@google.com \
--cc=shakeelb@google.com \
--cc=shuah@kernel.org \
--cc=sj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).