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:   Thu, 26 Mar 2020 16:00:09 -0700
From:   Dave Hansen <dave.hansen@...el.com>
To:     Minchan Kim <minchan@...nel.org>,
        Dave Hansen <dave.hansen@...ux.intel.com>
Cc:     linux-kernel@...r.kernel.org, mhocko@...e.com, jannh@...gle.com,
        vbabka@...e.cz, dancol@...gle.com, joel@...lfernandes.org,
        akpm@...ux-foundation.org
Subject: Re: [PATCH 2/2] mm/madvise: skip MADV_PAGEOUT on shared swap cache
 pages

On 3/25/20 11:28 PM, Minchan Kim wrote:
>> diff -puN mm/madvise.c~madv-pageout-ignore-shared-swap-cache mm/madvise.c
>> --- a/mm/madvise.c~madv-pageout-ignore-shared-swap-cache	2020-03-23 16:30:52.022385888 -0700
>> +++ b/mm/madvise.c	2020-03-23 16:41:15.448384333 -0700
>> @@ -261,6 +261,7 @@ static struct page *pte_get_reclaim_page
>>  {
>>  	swp_entry_t entry;
>>  	struct page *page;
>> +	int nr_page_references = 0;
> nit: just 'referenced' would be enough.

I guess I could track one bit like that.  But, it would require checking
both page_mapcount() and page_swapcount() for being >1.  This way, I
just accumulate the count and have a check at a single place.

I think it ends up much simpler this way.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ