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, 17 Feb 2009 09:52:20 +1030
From:	Rusty Russell <rusty@...tcorp.com.au>
To:	"H. Peter Anvin" <hpa@...or.com>
Cc:	Tejun Heo <tj@...nel.org>, Ingo Molnar <mingo@...e.hu>,
	Thomas Gleixner <tglx@...utronix.de>, x86@...nel.org,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Jeremy Fitzhardinge <jeremy@...p.org>, cpw@....com
Subject: Re: #tj-percpu has been rebased

On Tuesday 17 February 2009 03:58:22 H. Peter Anvin wrote:
> Rusty Russell wrote:
> > 
> > But note that for the non-NUMA case, you can just use kmalloc/__get_free_pages
> > and no remapping tricks are necessary at all.
> > 
> 
> Only if your chunks are really small.  Keep in mind that
> num_possible_cpus() may be 4096, and so it is unlikely you'll be able to
> get enough contiguous pages unless you're using the largepage pool, and
> even then you only get 512 bytes per cpu.
> 
> All in all I think a dedicated virtual zone per CPU as opposed to
> interleaving them seems to make more sense.  Even with 4096 CPUs and
> reserving, say, 256 MB per CPU it's not that much address space in the
> context of a 47-bit kernel space.  On 32 bits I don't think anything but
> the most trivial amount of percpu space is going to fly no matter what.

It's the TLB cost which I really don't want to pay; num_possible_cpus()
4096 non-NUMA is a little silly (currently impossible).

I'm happy to limit per-cpu allocations to pagesize, then you only need to
find num_possible_cpus() contig pages, and if you can't, you fall back to
vmalloc.

Thanks,
Rusty.
--
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