Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1364721
| From | Frederic Weisbecker <fweisbec@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 2/3] nohz: Convert tick dependency mask to atomic_t |
| Date | 2016-03-25 16:00 +0100 |
| Message-ID | <rgBnt-36A-35@gated-at.bofh.it> (permalink) |
| References | <rgeAx-3Uf-3@gated-at.bofh.it> <rgeAx-3Uf-1@gated-at.bofh.it> <rgvL4-7AD-21@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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?
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 2/3] nohz: Convert tick dependency mask to atomic_t Frederic Weisbecker <fweisbec@gmail.com> - 2016-03-24 15:40 +0100
Re: [PATCH 2/3] nohz: Convert tick dependency mask to atomic_t Ingo Molnar <mingo@kernel.org> - 2016-03-25 10:00 +0100
Re: [PATCH 2/3] nohz: Convert tick dependency mask to atomic_t Frederic Weisbecker <fweisbec@gmail.com> - 2016-03-25 16:00 +0100
[tip:core/urgent] timers/nohz: Convert tick dependency mask to atomic_t tip-bot for Frederic Weisbecker <tipbot@zytor.com> - 2016-03-29 12:40 +0200
csiph-web