Re: [PATCH v31 02/13] mm/damon/core: Implement region-based sampling
From: Shakeel Butt <hidden>
Date: 2021-06-22 14:59:38
Also in:
linux-mm, lkml
From: Shakeel Butt <hidden>
Date: 2021-06-22 14:59:38
Also in:
linux-mm, lkml
On Mon, Jun 21, 2021 at 1:31 AM SeongJae Park [off-list ref] wrote:
From: SeongJae Park <redacted> To avoid the unbounded increase of the overhead, DAMON groups adjacent pages that are assumed to have the same access frequencies into a region. As long as the assumption (pages in a region have the same access frequencies) is kept, only one page in the region is required to be checked. Thus, for each ``sampling interval``, 1. the 'prepare_access_checks' primitive picks one page in each region, 2. waits for one ``sampling interval``, 3. checks whether the page is accessed meanwhile, and 4. increases the access count of the region if so. Therefore, the monitoring overhead is controllable by adjusting the number of regions. DAMON allows both the underlying primitives and user callbacks to adjust regions for the trade-off. In other words, this commit makes DAMON to use not only time-based sampling but also space-based sampling. This scheme, however, cannot preserve the quality of the output if the assumption is not guaranteed. Next commit will address this problem. Signed-off-by: SeongJae Park <redacted> Reviewed-by: Leonard Foerster <redacted> Reviewed-by: Fernand Sieber <redacted>
Acked-by: Shakeel Butt <redacted>