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:	Tue, 13 Jan 2009 09:33:27 +0900
From:	Tejun Heo <tj@...nel.org>
To:	"Eric W. Biederman" <ebiederm@...ssion.com>
CC:	Christoph Lameter <cl@...ux-foundation.org>,
	Rusty Russell <rusty@...tcorp.com.au>,
	Ingo Molnar <mingo@...e.hu>, travis@....com,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	"H. Peter Anvin" <hpa@...or.com>,
	Andrew Morton <akpm@...ux-foundation.org>, steiner@....com,
	Hugh Dickins <hugh@...itas.com>
Subject: Re: regarding the x86_64 zero-based percpu patches

Hello, Eric.

Eric W. Biederman wrote:
>> There are 2M TLB entries on x86_64. If we really get into a high usage
>> scenario then the 2M entry makes sense. Average server memory sizes likely
>> already are way beyond 10G per box. The higher that goes the more
>> reasonable the 2M TLB entry will be.
> 
> 2M of per cpu data doesn't make sense, and likely indicates a design
> flaw somewhere.  It just doesn't make sense to have large amounts of
> data allocated per cpu.

Why?  On almost all large machines I've seen or heard of, memory size
scales way better than the number of cpus.  Whether certain usage
makes sense or not surely is debatable but I can't imagine all use
cases where 2MB percpu TLB entry could be useful would be senseless.

> The most common user of per cpu data I am aware of is allocating one
> word per cpu for counters.
> 
> What would be better is simply to: 
> - Require a lock to access another cpus per cpu data.
> - Do large page allocations for the per cpu data.
> 
> At which point we could grow the per cpu data by simply reallocating it on
> each cpu and updating the register that holds the base pointer.

I don't think moving live objects is such a good idea for the
following reasons.

1. Programming convenience is usually much more important than people
   think it is.  Even in the kernel.  I think it's very likely that
   we'll have unending stream of small feature requirements which
   would step just outside the supported bounds and ever smart
   workaround until the restriction is finally removed years later.

2. Moving live objects is inherently dangerous + it won't happen
   often.  Thinking about possible subtle bugs is scary.

Thanks.

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