Re: [PATCH] modules: Use a better scheme for refcounting
From: Eric Dumazet
Date: Sat May 17 2008 - 03:37:21 EST
Rusty Russell a écrit :
On Friday 16 May 2008 23:41:16 Mike Travis wrote:Christoph Lameter made good work last year and apparently the path is to :
Eric Dumazet wrote:
Rusty Russell a Ã©crit :
Any chance I can ask you look at the issue of full dynamic per-cpuYou mean using alloc_percpu() ? Problem is that current implementation
I mean rewriting alloc_percpu :)
We probably can change this to dynamic per-cpu as soon as Mike orYes, the zero-based percpu variables followed by the cpu_alloc patch should
Christopher finish their work on new dynamic per-cpu implementation ?
provide this and shrink the code quite well, including in some cases
removing locking requirements (because the resultant instructions will be
Ah, I hadn't realized that Mike was already working on this. Mike, have you
published patches already?
1) Put pda at the begining of percpu section.
2) Relocate percpu variables to begin at zero
3) Use %gs (or %fs) register to address pda AND percpu section.
4) Reserve an appropriate large virtual zone into percpu section so that
it can fullfill :
- percpu "static" allocations needed by module loader.
- per_cpu "dynamic" allocations
(No more need for an array of pointers to find the address of dynamic
- Eventually allocates PAGES dynamically into this zone to satisfy any
size of percpu needs.
(But with a limit of say 256 MB per cpu on x86_64)
Thats a lot of work and apparently Mike and Christoph are doing it.
Some pointers to previous work:
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/