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]
Message-ID: <55633EAC.8060702@suse.cz>
Date:	Mon, 25 May 2015 17:24:28 +0200
From:	Vlastimil Babka <vbabka@...e.cz>
To:	Mel Gorman <mgorman@...e.de>, Michal Hocko <mhocko@...e.cz>
CC:	Johannes Weiner <hannes@...xchg.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Naoya Horiguchi <n-horiguchi@...jp.nec.com>,
	linux-mm@...ck.org, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] hugetlb: Do not account hugetlb pages as NR_FILE_PAGES

On 05/22/2015 04:35 PM, Mel Gorman wrote:
>> 
>> Thanks!
>> 
>> > This makes a lot of sense to me.  The only thing I worry about is the
>> > proliferation of PageHuge(), a function call, in relatively hot paths.
>> 
>> I've tried that (see the patch below) but it enlarged the code by almost
>> 1k
>>    text    data     bss     dec     hex filename
>>  510323   74273   44440  629036   9992c mm/built-in.o.before
>>  511248   74273   44440  629961   99cc9 mm/built-in.o.after
>> 
>> I am not sure the code size increase is worth it. Maybe we can reduce
>> the check to only PageCompound(page) as huge pages are no in the page
>> cache (yet).
>> 
> 
> That would be a more sensible route because it also avoids exposing the
> hugetlbfs destructor unnecessarily.

You could maybe do test such as (PageCompound(page) && PageHuge(page)) to
short-circuit the call while remaining future-proof.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ