Re: [PATCH v31 01/13] mm: Introduce Data Access MONitor (DAMON)

From: Shakeel Butt
Date: Thu Jun 24 2021 - 10:34:55 EST


On Thu, Jun 24, 2021 at 3:26 AM SeongJae Park <sj38.park@xxxxxxxxx> wrote:
>
[...]
> > > if time() % update_interval == 0:
> >
> > regions_update_interval?
>
> It used the name before. But, I changed the name in this way to use it as a
> general periodic updates of monitoring primitives. Of course we can use the
> specific name only in this specific example, but also want to make this as
> similar to the actual code as possible.
>
> If you strongly want to rename this, please feel free to let me know.
>

Nah, it is ok.

[...]

> >
> > Any reason to not use kthread_stop() here?
>
> Using 'kthread_stop()' here will make the code much simpler. But, 'kdamond'
> also stops itself when all monitoring targets became invalid (e.g., all
> monitoring target processes terminated). However, 'kthread_stop()' is not easy
> to be used for the use case (self stopping). It's of course possible, but it
> would make the code longer. That's why I use 'kdamond_stop' flag here. So,
> I'd like leave this as is. If you think 'kthread_stop()' should be used,
> please feel free to let me know.
>

Fine as it is.