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] [day] [month] [year] [list]
Message-ID: <2b62898c-2f39-bc0d-e801-20b5efe90dfd@redhat.com>
Date:   Mon, 13 Feb 2023 13:55:22 +0100
From:   David Hildenbrand <david@...hat.com>
To:     yang.yang29@....com.cn
Cc:     akpm@...ux-foundation.org, imbrenda@...ux.ibm.com,
        jiang.xuexin@....com.cn, linux-kernel@...r.kernel.org,
        linux-mm@...ck.org, ran.xiaokai@....com.cn, xu.xin.sc@...il.com,
        xu.xin16@....com.cn
Subject: Re: [PATCH v5 3/6] ksm: count all zero pages placed by KSM

On 09.02.23 13:01, yang.yang29@....com.cn wrote:
>>> diff --git a/mm/ksm.c b/mm/ksm.c
>>> index 652c088f9786..72c0722be280 100644
>>> --- a/mm/ksm.c
>>> +++ b/mm/ksm.c
>>> @@ -276,6 +276,9 @@ static unsigned int zero_checksum __read_mostly;
>>>    /* Whether to merge empty (zeroed) pages with actual zero pages */
>>>    static bool ksm_use_zero_pages __read_mostly;
>>>
>>> +/* The number of zero pages placed by KSM use_zero_pages */
>>> +static unsigned long ksm_zero_pages_sharing;
>>
>> Does this count how many zero pages are currently placed or how many
>> rmap items with ZERO_PAGE_FLAG are in the system?
> 
> Yes, it counts how many ksm zero pages are currently placed. and we use
> rmap items with ZERO_PAGE_FLAG to record these zero page, similar to
> ksm_pages_sharing and ksm_pages_shared which are recorded by the rmap_items
> with STABLE_FLAG.
> 
>>
>> IOW, if someone triggers MADV_DONTNEED on such a zeropage, the counter
>> will not get updated, correct?
> 
> Well, the counter can get updated as someone triggers MADV_DONTNEED on such
> a zeropage. You might write a simple code to test it.

Interesting, I'll have a look how that will be triggered.

-- 
Thanks,

David / dhildenb

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ