Re: [RFC] CPUMASK: proposal for replacing cpumask_t

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Mike Travis
Date: Friday, September 12, 2008 - 7:28 am

Rusty Russell wrote:

Using a typedef came from Linus, and the idea is basically if NR_CPUS fits
into a long, then it's carried as an array of one (ie., local variable).
If it's bigger, then it's a pointer to a remote array.  The references can
all be pointers (*cpumask), though most of the references use the cpu_XXX
operators which already treat the references correctly (in my proposal,
that is).  That way, small systems can optimize out the indirect reference
and the overhead becomes zero.

Also, cpumask_alloc/free() becomes nop's for small systems.

But I like the idea of dumping some of the initializers.  I should have
made CPU0 "cpumask_of_cpu(0)".  I'll have to look at where they are used to
see if this is feasible.

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

Messages in current thread:
[RFC] CPUMASK: proposal for replacing cpumask_t, Mike Travis, (Wed Sep 10, 3:47 pm)
Re: [RFC] CPUMASK: proposal for replacing cpumask_t, Andi Kleen, (Wed Sep 10, 3:53 pm)
Re: [RFC] CPUMASK: proposal for replacing cpumask_t, Mike Travis, (Wed Sep 10, 4:33 pm)
Re: [RFC] CPUMASK: proposal for replacing cpumask_t, Andi Kleen, (Wed Sep 10, 10:21 pm)
Re: [RFC] CPUMASK: proposal for replacing cpumask_t, Peter Zijlstra, (Thu Sep 11, 2:00 am)
Re: [RFC] CPUMASK: proposal for replacing cpumask_t, Mike Travis, (Thu Sep 11, 8:04 am)
Re: [RFC] CPUMASK: proposal for replacing cpumask_t, Rusty Russell, (Thu Sep 11, 9:55 pm)
Re: [RFC] CPUMASK: proposal for replacing cpumask_t, Mike Travis, (Fri Sep 12, 7:28 am)
Re: [RFC] CPUMASK: proposal for replacing cpumask_t, Rusty Russell, (Fri Sep 12, 3:02 pm)
Re: [RFC] CPUMASK: proposal for replacing cpumask_t, Mike Travis, (Fri Sep 12, 3:50 pm)
Re: [RFC] CPUMASK: proposal for replacing cpumask_t, H. Peter Anvin, (Fri Sep 12, 3:58 pm)