Messages in this thread | | | From | Rusty Russell <> | Subject | Re: [RFC PATCH] x86-64: software IRQ masking and handling | Date | Mon, 12 Jul 2010 17:32:24 +0930 |
| |
On Mon, 12 Jul 2010 02:41:33 pm Eric Dumazet wrote: > Two changes are possible : > > 1) Get rid of the cpu_online_mask (its a const pointer to a known > target). I cant see a reason for its need it actually...
There was a reason, but I'm trying to remember it.
ISTR, it was to catch direct frobbing of the masks. That was important: we were converting code everywhere to hand around cpumasks by ptr rather than by copy. But that semantic change meant that a function which previously harmlessly frobbed a copy would now frob (say) cpu_online_mask.
However, ((const struct cpumask *)cpu_online_bits)) would work for that too. (Well, renaming cpu_online_bits to __cpu_online_bits would be better since it's not non-static).
Ideally, those masks too would be dynamically allocated. But the boot changes required for that are best left until someone really needs > 64k CPUs.
> 2) Dont use a the last const qualifier but __read_mostly to move > cpu_online_mask on same section. > > Rusty, could you comment on one or other way before I submit a patch ? > > (Of course, possible/present/active have same problem)
Yep. Might want to do a patch to get rid of the remaining 100 references to cpu_online_map (etc) as well if you're feeling enthusiastic :)
Thanks! Rusty.
| |