lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 25 May 2021 15:44:27 +0000
From:   SeongJae Park <sj38.park@...il.com>
To:     sieberf@...zon.com
Cc:     sj38.park@...il.com, Jonathan.Cameron@...wei.com, acme@...nel.org,
        akpm@...ux-foundation.org, alexander.shishkin@...ux.intel.com,
        amit@...nel.org, benh@...nel.crashing.org,
        brendanhiggins@...gle.com, corbet@....net, david@...hat.com,
        dwmw@...zon.com, elver@...gle.com, fan.du@...el.com,
        foersleo@...zon.de, greg@...ah.com, gthelen@...gle.com,
        guoju.fgj@...baba-inc.com, linux-damon@...zon.com,
        linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-mm@...ck.org, mgorman@...e.de, minchan@...nel.org,
        mingo@...hat.com, namhyung@...nel.org, peterz@...radead.org,
        riel@...riel.com, rientjes@...gle.com, rostedt@...dmis.org,
        rppt@...nel.org, shakeelb@...gle.com, shuah@...nel.org,
        sjpark@...zon.de, snu@...zon.de, vbabka@...e.cz,
        vdavydov.dev@...il.com, zgf574564920@...il.com
Subject: Re: [PATCH v29 05/13] mm/damon: Implement primitives for the virtual memory address spaces

From: SeongJae Park <sjpark@...zon.de>

On Tue, 25 May 2021 17:19:04 +0200 <sieberf@...zon.com> wrote:

> Hi SeongJae,
> 
> Some questions for this patch:
> 
> Why do we split the regions in 3 areas (heap, stack, mmaped)? I 
> understand we don't want to model the whole virtual address space, but 
> why don't we just use whatever is modeled by the VMAs to define the 
> regions boundaries?

First of all, number of VMAs could be very large in some processes.  Also, VMAs
could have small gaps between them so that our merge/split strategy doesn't
works effectively.

> 
> I am not quite understanding why we both set the page idle and young (in 
> damon_ptep_mkold). For WSS computation on our end we have used 
> pte_clear_young_notify. Why do we touch the page idle flag at all? What 
> flags do the reclaim logic use to track access?

Both DAMON and reclaim logic read and write 'Accessed' bits in page table
entries to check if a page is accessed or not.  Because this could let them
interfere each other, we have two per-page flags called PG_Idle and PG_Young,
which save the original state of the 'Accessed' bit.

For example, if DAMON needs to clear 'Accessed' bit of a page, it first sees if
the page accessed.  Because simply clearing the bit could make the reclaim
logic thinks the page was not accessed, it sets PG_Young in this case.  Later,
when reclaim logic needs to check if the page is accessed or not, it first
reads the 'Accessed' bit, which cleared by DAMON, and finds it's not set.  But,
reclaim logic checks PG_Young together, which set by DAMON, so it knows the
page has accessed.  This also means PG_Young should cleared by reclaim logic,
when it clears 'Accessed' bit.  Similarly, DAMON sets PG_Idle when it clears
'Accessed' bit.  And, vice versa for reclaim logic.

Hope these answer your questions.  If something unclear or I missed some of
your point, please feel free to let me know.


Thanks,
SeongJae Park

> 
> Kind regards,
> 
> Fernand

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ