Re: #tj-percpu has been rebased
From: H. Peter Anvin
Date: Mon Feb 16 2009 - 12:32:20 EST
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.
-hpa
--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/