Skip to content

Commit

Permalink
[PATCH] remove unused blkp field in percpu_data
Browse files Browse the repository at this point in the history
I found that blkp field was not used in kernel tree.

As most of the times NR_CPUS is a power of two and kmalloc() memory blocks
too, this extra field basically doubles the memory space allocated in
__alloc_percpu() to store the 'struct percpu_data'

(for example, if NR_CPUS=8 on i386, kmalloc(4*8+4) returns a 64 bytes block
instead of a 32 bytes block after this patch)

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Eric Dumazet authored and Linus Torvalds committed Jan 9, 2006
1 parent e78c9a0 commit f867bac
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion include/linux/percpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

struct percpu_data {
void *ptrs[NR_CPUS];
void *blkp;
};

/*
Expand Down

0 comments on commit f867bac

Please sign in to comment.