Re: Re: [PATCH v6 04/14] mm/damon: Apply dynamic memory mapping changes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 10 Mar 2020 09:00:26 +0000 Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx> wrote:

> On Mon, 24 Feb 2020 13:30:37 +0100
> SeongJae Park <sjpark@xxxxxxxxxx> wrote:
> 
> > From: SeongJae Park <sjpark@xxxxxxxxx>
> > 
> > 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@xxxxxxxxx>
> 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 :)

[...]




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux