Re: [PATCH v4] locking/lock_events: Use this_cpu_add() when necessary

2019-05-28 Thread Peter Zijlstra
On Mon, May 27, 2019 at 12:33:56PM -0700, Linus Torvalds wrote: > On Mon, May 27, 2019 at 1:23 AM Peter Zijlstra wrote: > > > > That's disguisting... I see Linus already applied it, but yuck. That's > > what we have raw_cpu_*() for. > > Ahh, I tried to look for that, but there was enough indirect

Re: [PATCH v4] locking/lock_events: Use this_cpu_add() when necessary

2019-05-27 Thread Linus Torvalds
On Mon, May 27, 2019 at 1:23 AM Peter Zijlstra wrote: > > That's disguisting... I see Linus already applied it, but yuck. That's > what we have raw_cpu_*() for. Ahh, I tried to look for that, but there was enough indirection and confusion that I wasn't sure they were generically available. And t

Re: [PATCH v4] locking/lock_events: Use this_cpu_add() when necessary

2019-05-27 Thread Peter Zijlstra
On Fri, May 24, 2019 at 03:42:22PM -0400, Waiman Long wrote: > +#ifdef CONFIG_DEBUG_PREEMPT > +#define lockevent_percpu_inc(x) this_cpu_inc(x) > +#define lockevent_percpu_add(x, v) this_cpu_add(x, v) > +#else > +#define lockevent_percpu_inc(x) __this_cpu_inc(x) > +#defin

Re: [PATCH v4] locking/lock_events: Use this_cpu_add() when necessary

2019-05-24 Thread Linus Torvalds
On Fri, May 24, 2019 at 12:42 PM Waiman Long wrote: > > Fixes: a8654596f0371 ("locking/rwsem: Enable lock event counting") Applied directly, Linus