Re: [PATCH v23 01/15] mm: Introduce Data Access MONitor (DAMON)

From: Shakeel Butt
Date: Wed Dec 23 2020 - 17:50:55 EST


On Wed, Dec 23, 2020 at 8:34 AM SeongJae Park <sjpark@xxxxxxxxxx> wrote:
[snip]
> > Overall the patch looks good to me. Two concerns I have are if we
> > should damon_callback here or with the real user and the regions part
> > of primitive abstraction. For the first one, I don't have any strong
> > opinion but for the second one I do.
>
> I'd like to keep 'damon_callback' part here, to let API users know how the
> monitoring result will be available to them.
>
> For the 'regions' part, I will rename relevant things as below in the next
> version, to reduce any confusion.
>
> init_target_regions() -> init()
> update_target_regions() -> update()
> regions_update_interval -> update_interval
> last_regions_update -> last_update
>
> >
> > More specifically the question is if sampling and adaptive region
> > adjustment are general enough to be part of core monitoring context?
> > Can you give an example of a different primitive/use-case where these
> > would be beneficial.
>
> I think all adress spaces having some spatial locality and monitoring requests
> that need to have upper-bound overhead and best-effort accuracy could get
> benefit from it. The primitives targetting 'virtual address spaces' and the
> 'physical address space' clearly showed the benefit.

I am still not much convinced on the 'physical address space' use-case
or the way you are presenting it. Anyways I think we start with what
you have and if in future there is a use-case where regions adjustment
does not make sense, we can change it then.