[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1590578628-27088-1-git-send-email-foersleo@amazon.com>
Date: Wed, 27 May 2020 13:23:48 +0200
From: Leonard Foerster <foersleo@...zon.com>
To: SeongJae Park <sjpark@...zon.com>
Cc: akpm@...ux-foundation.org, SeongJae Park <sjpark@...zon.de>,
Jonathan.Cameron@...wei.com, aarcange@...hat.com, acme@...nel.org,
alexander.shishkin@...ux.intel.com, amit@...nel.org,
benh@...nel.crashing.org, brendan.d.gregg@...il.com,
brendanhiggins@...gle.com, cai@....pw, colin.king@...onical.com,
corbet@....net, dwmw@...zon.com, irogers@...gle.com,
jolsa@...hat.com, kirill@...temov.name, mark.rutland@....com,
mgorman@...e.de, minchan@...nel.org, mingo@...hat.com,
namhyung@...nel.org, peterz@...radead.org, rdunlap@...radead.org,
riel@...riel.com, rientjes@...gle.com, rostedt@...dmis.org,
sblbir@...zon.com, shakeelb@...gle.com, shuah@...nel.org,
sj38.park@...il.com, snu@...zon.de, vbabka@...e.cz,
vdavydov.dev@...il.com, yang.shi@...ux.alibaba.com,
ying.huang@...el.com, linux-damon@...zon.com, linux-mm@...ck.org,
linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v13 04/15] mm/damon: Implement region based sampling
On 2020-05-25T11:15:01+02:00 SeongJae Park <sjpark@...zon.com> wrote:
> From: SeongJae Park <sjpark@...zon.de>
>
> This commit implements DAMON's basic access check and region based
> sampling mechanisms. This change would seems make no sense, mainly
> because it is only a part of the DAMON's logics. Following two commits
> will make more sense.
>
> Basic Access Check
> ------------------
>
> DAMON basically reports what pages are how frequently accessed. Note
> that the frequency is not an absolute number of accesses, but a relative
> frequency among the pages of the target workloads.
>
> Users can control the resolution of the reports by setting two time
> intervals, ``sampling interval`` and ``aggregation interval``. In
> detail, DAMON checks access to each page per ``sampling interval``,
> aggregates the results (counts the number of the accesses to each page),
> and reports the aggregated results per ``aggregation interval``. For
> the access check of each page, DAMON uses the Accessed bits of PTEs.
>
> This is thus similar to common periodic access checks based access
> tracking mechanisms, which overhead is increasing as the size of the
> target process grows.
>
> Region Based Sampling
> ---------------------
>
> To avoid the unbounded increase of the overhead, DAMON groups a number
> of adjacent pages that assumed to have same access frequencies into a
> region. As long as the assumption (pages in a region have same access
> frequencies) is kept, only one page in the region is required to be
> checked. Thus, for each ``sampling interval``, DAMON randomly picks one
> page in each region and clears its Accessed bit. After one more
> ``sampling interval``, DAMON reads the Accessed bit of the page and
> increases the access frequency of the region if the bit has set
> meanwhile. Therefore, the monitoring overhead is controllable by
> setting the number of regions.
>
> Nonetheless, this scheme cannot preserve the quality of the output if
> the assumption is not kept. Following commit will introduce how we can
> make the guarantee with best effort.
>
> Signed-off-by: SeongJae Park <sjpark@...zon.de>
Reviewed-by: Leonard Foerster <foersleo@...zon.de>
Powered by blists - more mailing lists