linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Docs/admin-guide/mm/damon/usage: fix the example code snip
@ 2022-08-22 10:56 Kairui Song
  2022-08-22 16:56 ` SeongJae Park
  0 siblings, 1 reply; 4+ messages in thread
From: Kairui Song @ 2022-08-22 10:56 UTC (permalink / raw)
  To: damon
  Cc: SeongJae Park, Jonathan Corbet, linux-mm, linux-doc,
	linux-kernel, Kairui Song

From: Kairui Song <kasong@tencent.com>

The workflow example code is not working since it got the file names
wrong. So fix this.

Signed-off-by: Kairui Song <kasong@tencent.com>
---
 Documentation/admin-guide/mm/damon/usage.rst | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/Documentation/admin-guide/mm/damon/usage.rst b/Documentation/admin-guide/mm/damon/usage.rst
index d52f572a90298..ca91ecc290785 100644
--- a/Documentation/admin-guide/mm/damon/usage.rst
+++ b/Documentation/admin-guide/mm/damon/usage.rst
@@ -50,10 +50,10 @@ For a short example, users can monitor the virtual address space of a given
 workload as below. ::
 
     # cd /sys/kernel/mm/damon/admin/
-    # echo 1 > kdamonds/nr && echo 1 > kdamonds/0/contexts/nr
+    # echo 1 > kdamonds/nr_kdamonds && echo 1 > kdamonds/0/contexts/nr_contexts
     # echo vaddr > kdamonds/0/contexts/0/operations
-    # echo 1 > kdamonds/0/contexts/0/targets/nr
-    # echo $(pidof <workload>) > kdamonds/0/contexts/0/targets/0/pid
+    # echo 1 > kdamonds/0/contexts/0/targets/nr_targets
+    # echo $(pidof <workload>) > kdamonds/0/contexts/0/targets/0/pid_target
     # echo on > kdamonds/0/state
 
 Files Hierarchy
@@ -366,12 +366,12 @@ memory rate becomes larger than 60%, or lower than 30%". ::
     # echo 1 > kdamonds/0/contexts/0/schemes/nr_schemes
     # cd kdamonds/0/contexts/0/schemes/0
     # # set the basic access pattern and the action
-    # echo 4096 > access_patterns/sz/min
-    # echo 8192 > access_patterns/sz/max
-    # echo 0 > access_patterns/nr_accesses/min
-    # echo 5 > access_patterns/nr_accesses/max
-    # echo 10 > access_patterns/age/min
-    # echo 20 > access_patterns/age/max
+    # echo 4096 > access_pattern/sz/min
+    # echo 8192 > access_pattern/sz/max
+    # echo 0 > access_pattern/nr_accesses/min
+    # echo 5 > access_pattern/nr_accesses/max
+    # echo 10 > access_pattern/age/min
+    # echo 20 > access_pattern/age/max
     # echo pageout > action
     # # set quotas
     # echo 10 > quotas/ms
-- 
2.35.2



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] Docs/admin-guide/mm/damon/usage: fix the example code snip
  2022-08-22 10:56 [PATCH] Docs/admin-guide/mm/damon/usage: fix the example code snip Kairui Song
@ 2022-08-22 16:56 ` SeongJae Park
  2022-08-22 17:05   ` SeongJae Park
  0 siblings, 1 reply; 4+ messages in thread
From: SeongJae Park @ 2022-08-22 16:56 UTC (permalink / raw)
  To: Kairui Song
  Cc: damon, SeongJae Park, Jonathan Corbet, linux-mm, linux-doc,
	linux-kernel, Kairui Song

Hi Kairui,


On Mon, 22 Aug 2022 18:56:17 +0800 Kairui Song <ryncsn@gmail.com> wrote:

> From: Kairui Song <kasong@tencent.com>
> 
> The workflow example code is not working since it got the file names
> wrong. So fix this.

Nice finding, thank you for this patch!

> 
> Signed-off-by: Kairui Song <kasong@tencent.com>

Reviewed-by: SeongJae Park <sj@kernel.org>


Thanks,
SJ

> ---
>  Documentation/admin-guide/mm/damon/usage.rst | 18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/Documentation/admin-guide/mm/damon/usage.rst b/Documentation/admin-guide/mm/damon/usage.rst
> index d52f572a90298..ca91ecc290785 100644
> --- a/Documentation/admin-guide/mm/damon/usage.rst
> +++ b/Documentation/admin-guide/mm/damon/usage.rst
> @@ -50,10 +50,10 @@ For a short example, users can monitor the virtual address space of a given
>  workload as below. ::
>  
>      # cd /sys/kernel/mm/damon/admin/
> -    # echo 1 > kdamonds/nr && echo 1 > kdamonds/0/contexts/nr
> +    # echo 1 > kdamonds/nr_kdamonds && echo 1 > kdamonds/0/contexts/nr_contexts
>      # echo vaddr > kdamonds/0/contexts/0/operations
> -    # echo 1 > kdamonds/0/contexts/0/targets/nr
> -    # echo $(pidof <workload>) > kdamonds/0/contexts/0/targets/0/pid
> +    # echo 1 > kdamonds/0/contexts/0/targets/nr_targets
> +    # echo $(pidof <workload>) > kdamonds/0/contexts/0/targets/0/pid_target
>      # echo on > kdamonds/0/state
>  
>  Files Hierarchy
> @@ -366,12 +366,12 @@ memory rate becomes larger than 60%, or lower than 30%". ::
>      # echo 1 > kdamonds/0/contexts/0/schemes/nr_schemes
>      # cd kdamonds/0/contexts/0/schemes/0
>      # # set the basic access pattern and the action
> -    # echo 4096 > access_patterns/sz/min
> -    # echo 8192 > access_patterns/sz/max
> -    # echo 0 > access_patterns/nr_accesses/min
> -    # echo 5 > access_patterns/nr_accesses/max
> -    # echo 10 > access_patterns/age/min
> -    # echo 20 > access_patterns/age/max
> +    # echo 4096 > access_pattern/sz/min
> +    # echo 8192 > access_pattern/sz/max
> +    # echo 0 > access_pattern/nr_accesses/min
> +    # echo 5 > access_pattern/nr_accesses/max
> +    # echo 10 > access_pattern/age/min
> +    # echo 20 > access_pattern/age/max
>      # echo pageout > action
>      # # set quotas
>      # echo 10 > quotas/ms
> -- 
> 2.35.2
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Docs/admin-guide/mm/damon/usage: fix the example code snip
  2022-08-22 16:56 ` SeongJae Park
@ 2022-08-22 17:05   ` SeongJae Park
  2022-08-23 11:39     ` Kairui Song
  0 siblings, 1 reply; 4+ messages in thread
From: SeongJae Park @ 2022-08-22 17:05 UTC (permalink / raw)
  To: SeongJae Park
  Cc: Kairui Song, damon, Jonathan Corbet, linux-mm, linux-doc,
	linux-kernel, Kairui Song

On Mon, 22 Aug 2022 16:56:46 +0000 SeongJae Park <sj@kernel.org> wrote:

> Hi Kairui,
> 
> 
> On Mon, 22 Aug 2022 18:56:17 +0800 Kairui Song <ryncsn@gmail.com> wrote:
> 
> > From: Kairui Song <kasong@tencent.com>
> > 
> > The workflow example code is not working since it got the file names
> > wrong. So fix this.
> 
> Nice finding, thank you for this patch!
> 
> > 

Oh, I forgot saying that it would be good to have Fixes: here, like below:

Fixes: b18402726bd1 ("Docs/admin-guide/mm/damon/usage: document DAMON sysfs interface")

I wouldn't say this needs to Cc stable@, as this is just a document example
fix.  Nevertheless, if anyone has a different opinion, please shout out.


Thanks,
SJ

> > Signed-off-by: Kairui Song <kasong@tencent.com>
> 
> Reviewed-by: SeongJae Park <sj@kernel.org>
> 
> 
> Thanks,
> SJ
> 
> > ---
> >  Documentation/admin-guide/mm/damon/usage.rst | 18 +++++++++---------
> >  1 file changed, 9 insertions(+), 9 deletions(-)
> > 
> > diff --git a/Documentation/admin-guide/mm/damon/usage.rst b/Documentation/admin-guide/mm/damon/usage.rst
> > index d52f572a90298..ca91ecc290785 100644
> > --- a/Documentation/admin-guide/mm/damon/usage.rst
> > +++ b/Documentation/admin-guide/mm/damon/usage.rst
> > @@ -50,10 +50,10 @@ For a short example, users can monitor the virtual address space of a given
> >  workload as below. ::
> >  
> >      # cd /sys/kernel/mm/damon/admin/
> > -    # echo 1 > kdamonds/nr && echo 1 > kdamonds/0/contexts/nr
> > +    # echo 1 > kdamonds/nr_kdamonds && echo 1 > kdamonds/0/contexts/nr_contexts
> >      # echo vaddr > kdamonds/0/contexts/0/operations
> > -    # echo 1 > kdamonds/0/contexts/0/targets/nr
> > -    # echo $(pidof <workload>) > kdamonds/0/contexts/0/targets/0/pid
> > +    # echo 1 > kdamonds/0/contexts/0/targets/nr_targets
> > +    # echo $(pidof <workload>) > kdamonds/0/contexts/0/targets/0/pid_target
> >      # echo on > kdamonds/0/state
> >  
> >  Files Hierarchy
> > @@ -366,12 +366,12 @@ memory rate becomes larger than 60%, or lower than 30%". ::
> >      # echo 1 > kdamonds/0/contexts/0/schemes/nr_schemes
> >      # cd kdamonds/0/contexts/0/schemes/0
> >      # # set the basic access pattern and the action
> > -    # echo 4096 > access_patterns/sz/min
> > -    # echo 8192 > access_patterns/sz/max
> > -    # echo 0 > access_patterns/nr_accesses/min
> > -    # echo 5 > access_patterns/nr_accesses/max
> > -    # echo 10 > access_patterns/age/min
> > -    # echo 20 > access_patterns/age/max
> > +    # echo 4096 > access_pattern/sz/min
> > +    # echo 8192 > access_pattern/sz/max
> > +    # echo 0 > access_pattern/nr_accesses/min
> > +    # echo 5 > access_pattern/nr_accesses/max
> > +    # echo 10 > access_pattern/age/min
> > +    # echo 20 > access_pattern/age/max
> >      # echo pageout > action
> >      # # set quotas
> >      # echo 10 > quotas/ms
> > -- 
> > 2.35.2


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Docs/admin-guide/mm/damon/usage: fix the example code snip
  2022-08-22 17:05   ` SeongJae Park
@ 2022-08-23 11:39     ` Kairui Song
  0 siblings, 0 replies; 4+ messages in thread
From: Kairui Song @ 2022-08-23 11:39 UTC (permalink / raw)
  To: SeongJae Park; +Cc: damon, Jonathan Corbet, linux-mm, linux-doc, linux-kernel

SeongJae Park <sj@kernel.org> 于2022年8月23日周二 01:05写道:
>
> On Mon, 22 Aug 2022 16:56:46 +0000 SeongJae Park <sj@kernel.org> wrote:
>
> > Hi Kairui,
> >
> >
> > On Mon, 22 Aug 2022 18:56:17 +0800 Kairui Song <ryncsn@gmail.com> wrote:
> >
> > > From: Kairui Song <kasong@tencent.com>
> > >
> > > The workflow example code is not working since it got the file names
> > > wrong. So fix this.
> >
> > Nice finding, thank you for this patch!
> >
> > >
>
> Oh, I forgot saying that it would be good to have Fixes: here, like below:
>
> Fixes: b18402726bd1 ("Docs/admin-guide/mm/damon/usage: document DAMON sysfs interface")

Thanks for the review, Let me send a V2 adding the "Fixes:" tag and
your review by.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-08-23 11:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-22 10:56 [PATCH] Docs/admin-guide/mm/damon/usage: fix the example code snip Kairui Song
2022-08-22 16:56 ` SeongJae Park
2022-08-22 17:05   ` SeongJae Park
2022-08-23 11:39     ` Kairui Song

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).