[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <0f8883ee-6e31-a1dd-a749-6d2ba07e758d@redhat.com>
Date: Fri, 24 May 2019 15:05:18 -0400
From: Waiman Long <longman@...hat.com>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Will Deacon <will.deacon@....com>,
Thomas Gleixner <tglx@...utronix.de>,
Borislav Petkov <bp@...en8.de>,
"H. Peter Anvin" <hpa@...or.com>,
Linux List Kernel Mailing <linux-kernel@...r.kernel.org>,
the arch/x86 maintainers <x86@...nel.org>,
Davidlohr Bueso <dave@...olabs.net>,
Tim Chen <tim.c.chen@...ux.intel.com>,
huang ying <huang.ying.caritas@...il.com>
Subject: Re: [PATCH v3] locking/lock_events: Use this_cpu_add() when necessary
On 5/24/19 3:00 PM, Linus Torvalds wrote:
> On Fri, May 24, 2019 at 11:54 AM Waiman Long <longman@...hat.com> wrote:
>> v2: Simplify the condition to just preempt or !preempt.
>> v3: Document the imprecise nature of the percpu count.
> My point was that if they are imprecise., then you shouldn't use CONFIG_PREEMPT.
>
> Because CONFIG_PREEMPT doesn't matter, and the count is imprecise with
> it or without it.
>
> So if they are imprecise, then what matters isn't whether the
> operation is atomic or not, and the real issue is avout whether it
> causes that "BUG: using __this_cpu_add() in preemptible" message.
>
> IOW, you should use the config option that matters and is relevant,
> namely CONFIG_DEBUG_PREEMPT.
Yes, that makes sense. I will update the patch again.
Thanks,
Longman
Powered by blists - more mailing lists