[lkml]   [2004]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [Patch 6/23] mask v2 - Replace cpumask_t with one using mask
On Fri, 2004-04-02 at 15:35, Paul Jackson wrote:
> > What do you think about this?
> Check out my patch 24 of 23, sent last night, which should make
> cpumask_of_cpu() efficient for UP systems.

Yep, I was just reading through that patch. It's an interesting
solution, but I'm not quite sure how I feel about it. It's definitely
not the way I would have solved the problem, but it looks like it will
work fine. My only problem with it is that it seems to preclude the
possibility of having two different sized masks in a single file. At
least without making a .h file for each different mask, and then
including each those files in the .c file that needs the multiple
masks. This behavior is fine for cpumasks & nodemasks, but makes it
difficult for arbitrary masks. I don't foresee this happening a lot
(multiple different size masks excluding cpumasks and nodemasks), so it
shouldn't be a big deal.

My first impression would be to just define both MASK_ALL1 & MASK_ALL2,
and less importantly mask_of_bit1 & mask_of_bit2, in mask.h, and let
whatever is using the macros choose the appropriate one to use. For
example, moving the cpumask_of_bit() & CPU_MASK_ALL defines into the
#ifdef CONFIG_SMP part. This alleviates the (albeit unlikely) problem
of multiple masks.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 14:02    [W:0.104 / U:14.320 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site