| Age | Commit message (Collapse) | Author |
|
Since get_cpu_ptr() went away, we probably shouldn't tease developers by
telling them to use it in the comments.
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
Ingo points out that it's unusable anyway, because with some configs the
get_cpu() is evaluated and with others it is not.
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
From: Martin Hicks <mort@wildopensource.com>
This patch removes kmalloc_percpu_init() from include/linux/percpu.h
It is unused and doesn't seem to be required.
|
|
From: Rusty Russell <rusty@rustcorp.com.au>
OK, this does the *minimum* required to support DEFINE_PER_CPU inside
modules. If we decide to change kmalloc_percpu later, great, we can turf
this out.
Basically, overallocates the amount of per-cpu data at boot to at least
PERCPU_ENOUGH_ROOM if CONFIG_MODULES=y (arch-specific by default 32k: I have
only 7744 bytes of percpu data in my kernel here, so makes sense), and a
special allocator in module.c dishes it out.
|
|
From: Rusty Russell <rusty@rustcorp.com.au>
Several tweaks to the kmalloc_percpu()/kfree_percpu() interface, to
allow future implementations to be more flexible, and make easier to
use now we can see how it's actually being used.
1) No flags argument: GFP_ATOMIC doesn't make much sense,
2) Explicit alignment argument, so we don't have to give SMP_CACHE_BYTES
alignment always,
3) Zeros memory, since most callers want that and it's not entirely
trivial,
4) Convenient type-safe wrapper which takes a typename, and
5) Rename to alloc_percpu/__alloc_percpu, since usage no longer matches
kmalloc.
|
|
Patch from Ravikiran G Thirumalai <kiran@in.ibm.com>
Creates a simple "kmalloc for each CPU" API. This will be used for net
statistics, disk statistics, etc. (davem has acked the net patches which use
this code).
kmalloc_per_cpu() is available to modules, unlike the current static per-cpu
infrastructure.
|
|
I suck. Lvalues continue to haunt me. This works for me.
BTW, I prefer to have bug reports cc'd to linux-kernel, so the
results are archived. Plus, public humiliation is good for the
soul.
|
|
This old __per_cpu_data define wasn't enough if an arch wants to
use the gcc __thread prefix (thread local storage), which needs to
go *before* the type in the definition. So we have to go for a
DECLARE macro, and while we're there, separate DECLARE and DEFINE,
as definitions of per-cpu data cannot live in modules. This also
means that accidental direct references to per-cpu variables will
be caught at compile time.
|
|
This makes introduces get_cpu_var()/put_cpu_var() which gets a
per-cpu variable and disables preemption, and renames the (unsafe
under preemption) "this_cpu()" macro to __get_cpu_var(). It also
deletes the redundant definitions in linux/smp.h.
|
|
As per David Mosberger's request, splits into per-arch files (solves the
#include mess), and fixes my "was not an lvalue" bug.
|