lkml.org 
[lkml]   [2009]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: #tj-percpu has been rebased
Date
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.


\
 
 \ /
  Last update: 2009-02-18 12:23    [W:0.111 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site