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: <4FAC60F7.4010704@intel.com>
Date:	Fri, 11 May 2012 08:44:39 +0800
From:	Alex Shi <alex.shi@...el.com>
To:	Borislav Petkov <bp@...64.org>
CC:	Peter Zijlstra <a.p.zijlstra@...llo.nl>, rob@...dley.net,
	tglx@...utronix.de, mingo@...hat.com, hpa@...or.com, arnd@...db.de,
	rostedt@...dmis.org, fweisbec@...il.com, jeremy@...p.org,
	gregkh@...uxfoundation.org, riel@...hat.com, luto@....edu,
	avi@...hat.com, len.brown@...el.com, dhowells@...hat.com,
	fenghua.yu@...el.com, ak@...ux.intel.com, cpw@....com,
	steiner@....com, akpm@...ux-foundation.org, penberg@...nel.org,
	hughd@...gle.com, rientjes@...gle.com,
	kosaki.motohiro@...fujitsu.com, n-horiguchi@...jp.nec.com,
	paul.gortmaker@...driver.com, trenn@...e.de, tj@...nel.org,
	oleg@...hat.com, axboe@...nel.dk, kamezawa.hiroyu@...fujitsu.com,
	viro@...iv.linux.org.uk, linux-kernel@...r.kernel.org,
	Andrea Arcangeli <aarcange@...hat.com>
Subject: Re: [PATCH v4 4/7] x86/tlb: fall back to flush all when meet a THP
 large page

On 05/10/2012 06:40 PM, Borislav Petkov wrote:

> On Thu, May 10, 2012 at 11:29:05AM +0200, Peter Zijlstra wrote:
>> On Thu, 2012-05-10 at 13:00 +0800, Alex Shi wrote:
>>> We don't need to flush large pages by PAGE_SIZE step, that just waste
>>> time. and actually, large page don't need 'invlpg' optimizing according
>>> to our macro benchmark. So, just flush whole TLB is enough for them.
>>>
>>> The following result is tested on a 2CPU * 4cores * 2HT NHM EP machine,
>>> with THP 'always' setting.
>>
>> What does it do when you disable THP? That has_large_page() thing is a
>> massive amount of pointer chasing..
> 
> Yeah, this looks like a bit of a overhead. Don't we have some per-mm
> accounting of whether that mm struct has hugepages in mm/huge_memory.c,
> i.e. something like what collapse_huge_page() does, for example, at the
> end by incrementing khugepaged_pages_collapsed but in a per-mm variable?
> 
> And make this part of the THP code so we get it for free here.
> 
> Is Andrea on the CC list... hm, no, CCed.


Andrea has said there is no easy way to know if there is a large page in
mm or vma.

Actually, has_large_page just called only once, that due to the
act_entries limit. But your opinion is worth to consider, the only one
calling can be avoid if the 'start' address is not align on HPAGE_SIZE.



> 
> Andrea?
> 


--
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