RFR: Hint unused regions instead of uncommit them

Zhengyu Gu zgu at redhat.com
Tue Jan 16 19:09:12 UTC 2018



On 01/16/2018 12:49 PM, Aleksey Shipilev wrote:
> On 01/16/2018 02:13 PM, Zhengyu Gu wrote:
>>> As I read MADV_DONTNEED man page and the explanations of different kernel people, I am getting
>>> uneasy using this. madvise call that basically corrupts memory, say what? And it also does not
>>> support large pages...
>> Hummm ... can you point me how it can corrupt memory? since it is the way how thread stack is released.
> 
> Ah, I meant that it is very surprising to have madvise to do anything that affects correctness
> MADV_DONTNEED basically destructs the page contents, as far as application is concerned. Awkward API...

Well, unmapping also destructs page contents. In fact, it will 
reconstruct content from the underlying mapped file, if it has backing 
file, or zero-fill-on-demand (which does not do any good to us) pages 
for mappings without an underlying file.

-Zhengyu




> 
> -Aleksey
> 


More information about the shenandoah-dev mailing list