Messages in this thread | | | From | SeongJae Park <> | Subject | Re: Re: [PATCH v6 04/14] mm/damon: Apply dynamic memory mapping changes | Date | Tue, 10 Mar 2020 12:53:55 +0100 |
| |
On Tue, 10 Mar 2020 09:00:26 +0000 Jonathan Cameron <Jonathan.Cameron@Huawei.com> wrote:
> On Mon, 24 Feb 2020 13:30:37 +0100 > SeongJae Park <sjpark@amazon.com> wrote: > > > From: SeongJae Park <sjpark@amazon.de> > > > > Only a number of parts in the virtual address space of the processes is > > mapped to physical memory and accessed. Thus, tracking the unmapped > > address regions is just wasteful. However, tracking every memory > > mapping change might incur an overhead. For the reason, DAMON applies > > the dynamic memory mapping changes to the tracking regions only for each > > of a user-specified time interval (``regions update interval``). > > > > Signed-off-by: SeongJae Park <sjpark@amazon.de> > Trivial inline. Otherwise makes sense to me. > [...] > > +static void damon_apply_three_regions(struct damon_ctx *ctx, > > + struct damon_task *t, struct region bregions[3]) > > +{ > > + struct damon_region *r, *next; > > + unsigned int i = 0; > > + > > + /* Remove regions which isn't in the three big regions now */ > > + damon_for_each_region_safe(r, next, t) { > > + for (i = 0; i < 3; i++) { > > + if (damon_intersect(r, &bregions[i])) > > + break; > > + } > > + if (i == 3) > > + damon_destroy_region(r); > > + } > > + > > + /* Adjust intersecting regions to fit with the threee big regions */ > > three
Good eye! Thanks for finding :)
[...]
| |