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:	Mon, 23 Feb 2009 11:17:41 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Tejun Heo <tj@...nel.org>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	rusty@...tcorp.com.au, tglx@...utronix.de, x86@...nel.org,
	linux-kernel@...r.kernel.org, hpa@...or.com, jeremy@...p.org,
	cpw@....com
Subject: Re: [PATCHSET x86/core/percpu] implement dynamic percpu allocator


* Tejun Heo <tj@...nel.org> wrote:

> Hello, Ingo.
> 
> Ingo Molnar wrote:
> > Heck no. It is absolutely crazy to complicate __pa()/__va() in 
> > _any_ way just to 'save' one more 2MB dTLB.
> 
> Are __pa()/__va() that hot paths?  Or am I over-estimating the 
> cost of 2MB dTLB?

yes, __pa()/__va() is a very hot path - in a defconfig they are 
used in about a thousand different places.

In fact it would be nice to get rid of the __phys_addr() 
redirection on the 64-bit side (which is non-linear and a 
function there, and all __pa()s go through it) and make it a 
constant offset again.

This isnt trivial/possible to do though as .data/.bss is in the 
high alias. (high .text aliases alone wouldnt be a big issue to 
fix, but the data aliases are an issue.)

Moving .data/.bss into the linear space isnt feasible as we'd 
lose RIP-relative addressing shortcuts.

Maybe we could figure out the places that do __pa() on a high 
alias and gradually eliminate them. __pa() on .data/.bss is a 
rare and unusal thing to do, and CONFIG_DEBUG_VIRTUAL could warn 
about them without crashing the kernel.

Later on we could make this check unconditional, and then switch 
over __pa() to addr-PAGE_OFFSET in the !CONFIG_DEBUG_VIRTUAL 
case (which is the default).

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