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: <20200315012359.uebl54wauvcpd5j4@master>
Date:   Sun, 15 Mar 2020 01:23:59 +0000
From:   Wei Yang <richard.weiyang@...il.com>
To:     Matthew Wilcox <willy@...radead.org>
Cc:     Wei Yang <richard.weiyang@...il.com>, akpm@...ux-foundation.org,
        linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm/swap_state.c: use the same way to count page in
 [add_to|delete_from]_swap_cache

On Sat, Mar 14, 2020 at 05:21:01PM -0700, Matthew Wilcox wrote:
>On Sat, Mar 14, 2020 at 09:59:12PM +0000, Wei Yang wrote:
>> Function add_to_swap_cache() and delete_from_swap_cache() are counter
>> parts, while currently they use different way to count page.
>> 
>> It doesn't break any thing because we only have two size for PageAnon,
>> but this is confusing and not a good practice.
>> 
>> This patch corrects it by both using compound_nr().
>
>You're converting in the wrong direction.  hpage_nr_pages() is optimised
>away when CONFIG_TRANSPARENT_HUGEPAGE is undefined, whereas compound_nr()
>is not.

Ok, I didn't think about the optimisation.

Will use hpage_nr_pages() in v2.

>
>I also have this patch pending:
>http://git.infradead.org/users/willy/linux-dax.git/commitdiff/192b635b428ae74f680574cdcc3d5e9d213fcb64

-- 
Wei Yang
Help you, Help me

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ