Re: [PATCH] Allocate module.ref array dynamically

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Christoph Lameter <cl@...>
Cc: Eric Dumazet <dada1@...>, Takashi Iwai <tiwai@...>, Andreas Gruenbacher <agruen@...>, Jan Blunck <jblunck@...>, Andrew Morton <akpm@...>, <linux-kernel@...>, Mike Travis <travis@...>
Date: Wednesday, November 12, 2008 - 5:59 am

On Wednesday 12 November 2008 13:44:51 Christoph Lameter wrote:

Oops, updated thanks.


Perhaps I'm missing the overarching plan here?

You've introduced a third set of per-cpu primitives, yet the second set still 
has 0 users.

Your new basic interface is:
CPU_ALLOC/CPU_FREE/CPU_PTR/THIS_CPU/__THIS_CPU

I don't think the CAPS adds anything.  I'd like to see standard docbook 
comments.  It's not clear from your documentation whether this allocates for 
all possible or only all online CPUs, and the difference between THIS_CPU and 
__THIS_CPU is not immediately obvious.

How about re-using alloc_percpu/free_percpu/per_cpu_ptr APIs?  Rename THIS_CPU 
to __get_cpu_ptr and implement get_cpu_ptr and put_cpu_ptr wrappers (a-la 
get_cpu_var).

I love this work, but I think it stumbles on the final polish.  If that's just 
a "not done yet", I'd be happy to try to put some patches together.

Thanks!
Rusty.
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] Allocate module.ref array dynamically, Takashi Iwai, (Tue Nov 11, 4:01 pm)
Re: [PATCH] Allocate module.ref array dynamically, Eric Dumazet, (Tue Nov 11, 6:06 pm)
Re: [PATCH] Allocate module.ref array dynamically, Rusty Russell, (Tue Nov 11, 9:44 pm)
Re: [PATCH] Allocate module.ref array dynamically, Christoph Lameter, (Tue Nov 11, 11:14 pm)
Re: [PATCH] Allocate module.ref array dynamically, Rusty Russell, (Wed Nov 12, 5:59 am)
Re: [PATCH] Allocate module.ref array dynamically, Christoph Lameter, (Wed Nov 12, 4:11 pm)
Re: [PATCH] Allocate module.ref array dynamically, Rusty Russell, (Wed Nov 12, 6:01 pm)
Re: [PATCH] Allocate module.ref array dynamically, Christoph Lameter, (Wed Nov 12, 6:50 pm)
Re: [PATCH] Allocate module.ref array dynamically, Rusty Russell, (Thu Nov 13, 5:21 am)
Re: [PATCH] Allocate module.ref array dynamically, Christoph Lameter, (Thu Nov 13, 10:40 am)
Re: [PATCH] Allocate module.ref array dynamically, Rusty Russell, (Thu Nov 13, 7:49 pm)
Re: [PATCH] Allocate module.ref array dynamically, Christoph Lameter, (Thu Nov 13, 8:20 pm)
Re: [PATCH] Allocate module.ref array dynamically, Rusty Russell, (Sat Nov 15, 8:00 pm)
Re: [PATCH] Allocate module.ref array dynamically, Christoph Lameter, (Thu Nov 20, 12:47 pm)
Re: [PATCH] Allocate module.ref array dynamically, Rusty Russell, (Thu Nov 20, 7:21 pm)
Re: [PATCH] Allocate module.ref array dynamically, Rusty Russell, (Sun Nov 16, 5:41 pm)
Re: [PATCH] Allocate module.ref array dynamically, Mike Travis, (Tue Nov 11, 10:26 pm)
Re: [PATCH] Allocate module.ref array dynamically, Christoph Lameter, (Tue Nov 11, 11:17 pm)
Re: [PATCH] Allocate module.ref array dynamically, Mike Travis, (Wed Nov 12, 9:46 am)
Re: [PATCH] Allocate module.ref array dynamically, Takashi Iwai, (Tue Nov 11, 6:26 pm)
Re: [PATCH] Allocate module.ref array dynamically, Eric Dumazet, (Tue Nov 11, 6:15 pm)
Re: [PATCH] Allocate module.ref array dynamically, Takashi Iwai, (Tue Nov 11, 6:32 pm)