linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: SeongJae Park <sj@kernel.org>
To: SeongJae Park <sj@kernel.org>
Cc: Xin Hao <xhao@linux.alibaba.com>,
	akpm@linux-foundation.org, damon@lists.linux.dev,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH V4] mm/damon: Remove duplicate get_monitoring_region() definitions
Date: Fri,  9 Sep 2022 21:39:31 +0000	[thread overview]
Message-ID: <20220909213931.136283-1-sj@kernel.org> (raw)
In-Reply-To: <20220909204520.60047-1-sj@kernel.org>

As my previous comments are almost only cosmetic trivial nits and I don't want
to make this unnecessarily delayed long, I made the changes on my own and
posted it:
https://lore.kernel.org/damon/20220909213606.136221-1-sj@kernel.org/

Xin, if there was anything I missed or there is anything you disagree about my
changes, please let me know.


Thanks,
SJ

On Fri, 9 Sep 2022 20:45:20 +0000 SeongJae Park <sj@kernel.org> wrote:

> On Fri, 9 Sep 2022 10:41:05 +0800 Xin Hao <xhao@linux.alibaba.com> wrote:
> 
> > In lru_sort.c and reclaim.c, they are all defining get_monitoring_region()
> > function, there is no need to define it separately.
> > 
> > As 'get_monitoring_region()' is not a 'static' function anymore, we try
> > to use a prefix to distinguish with other functions, so there rename it
> > to 'damon_find_biggest_system_ram'.
> > 
> > Suggested-by: SeongJae Park <sj@kernel.org>
> > Signed-off-by: Xin Hao <xhao@linux.alibaba.com>
> > ---
> >  include/linux/damon.h | 11 +++++++++++
> >  mm/damon/core.c       | 29 +++++++++++++++++++++++++++++
> >  mm/damon/lru_sort.c   | 37 ++-----------------------------------
> >  mm/damon/reclaim.c    | 37 ++-----------------------------------
> >  4 files changed, 44 insertions(+), 70 deletions(-)
> > 
> > diff --git a/include/linux/damon.h b/include/linux/damon.h
> > index 7b1f4a488230..6c863b281fb2 100644
> > --- a/include/linux/damon.h
> > +++ b/include/linux/damon.h
> > @@ -448,6 +448,16 @@ struct damon_ctx {
> >  	struct list_head schemes;
> >  };
> >  
> > +/**
> > + * struct damon_system_ram_region - System RAM resource address region of [@start, @end).
> 
> I prefer 80 columns, let's break down this line.
> https://docs.kernel.org/process/coding-style.html#breaking-long-lines-and-strings
> 
> Also this struct is gonna be used by only damon_find_biggest_system_ram(), so I
> think it might make more sense to move this into core.c.
> 
> And, as this is not aimed to directly be used by external API users, I think it
> would make more sense to hide from kernel doc (/* instead of /**).
> 
> > + * @start:	Start address of the  (inclusive).
> 
> of the 'region'?
> 
> > + * @end:	End address of the region (exclusive).
> 
> I like the nice explanation: whether its inclusive or exclusive.
> 
> > + */
> > +struct damon_system_ram_region {
> > +	unsigned long start;
> > +	unsigned long end;
> > +};
> > +
> 
> As this struct is only used by damon_find_biggest_system_ram(), I think it
> might make more sense to move this into core.c?
> 
> Below parts all look good.
> 
> Also, this patch seems cannot cleanly applied on top of the latest
> mm/mm-unstable branch.  Would need rebase.
> 
> 
> Thanks,
> SJ
> 
> [...]
> 


  reply	other threads:[~2022-09-09 21:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-09  2:41 Xin Hao
2022-09-09 20:45 ` SeongJae Park
2022-09-09 21:39   ` SeongJae Park [this message]
2022-09-10  1:11     ` haoxin

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=20220909213931.136283-1-sj@kernel.org \
    --to=sj@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=damon@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=xhao@linux.alibaba.com \
    /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