Messages in this thread | | | Date | Fri, 25 Mar 2016 15:56:13 +0100 | From | Frederic Weisbecker <> | Subject | Re: [PATCH 2/3] nohz: Convert tick dependency mask to atomic_t |
| |
On Fri, Mar 25, 2016 at 09:52:02AM +0100, Ingo Molnar wrote: > > diff --git a/kernel/time/tick-sched.h b/kernel/time/tick-sched.h > > index eb4e325..bf38226 100644 > > --- a/kernel/time/tick-sched.h > > +++ b/kernel/time/tick-sched.h > > @@ -60,7 +60,7 @@ struct tick_sched { > > u64 next_timer; > > ktime_t idle_expires; > > int do_timer_last; > > - unsigned long tick_dep_mask; > > + atomic_t tick_dep_mask; > > }; > > > > extern struct tick_sched *tick_get_tick_sched(int cpu); > > Yeah, so I really like this interface, because it makes it really, really obvious > that only atomic_t-compatible operations can be used on the value. It's a common > bug to have a long, operated on atomically via bitops - and then occasionally > operated on in a non-atomic fashion, or used without taking ordering into account. > Such bugs are quite hard to find. > > This change also shrinks the mask from long to int, which is an another bonus, and > which addresses the other objection Linus had.
Thanks, I much prefer it that way too!
Should I do a pull request or can I let you apply these?
| |