Re: [PATCH] fix BUG using smp_processor_id() in touch_nmi_watchdog and touch_softlockup_watchdog

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Don Zickus
Date: Tuesday, August 17, 2010 - 6:13 am

On Tue, Aug 17, 2010 at 01:39:48PM +0300, Sergey Senozhatsky wrote:

I don't have a deep enough understanding of the subtleties between
per_cpu, __get_cpu_var, and __raw_get_cpu_var to really say which is
correct.  To me, all three versions of your patch look they do the same
thing.

Technically, it seems like preempt_disable/enable would be the correct
thing to do.  But as someone pointed out earlier, if the code is preempted
and switches cpu, then the touch_*_watchdog effectively becomes a no-op
(which I guess it can do even with the preempt_disable/enable surrounding
it).  So I have no idea.  I am going to wait for smarter people than me to
provide an opinion. :-)

Cheers,
Don

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
fix BUG: using smp_processor_id() in touch_nmi_watchdog an ..., Sergey Senozhatsky, (Fri Aug 13, 3:21 am)
[PATCH] fix BUG using smp_processor_id() in touch_nmi_watc ..., Sergey Senozhatsky, (Mon Aug 16, 7:08 am)
Re: [PATCH] fix BUG using smp_processor_id() in touch_nmi_ ..., Frederic Weisbecker, (Mon Aug 16, 7:59 pm)
[PATCH] fix BUG using smp_processor_id() in touch_nmi_watc ..., Sergey Senozhatsky, (Tue Aug 17, 12:56 am)
Re: [PATCH] fix BUG using smp_processor_id() in touch_nmi_ ..., Sergey Senozhatsky, (Tue Aug 17, 1:39 am)
Re: [PATCH] fix BUG using smp_processor_id() in touch_nmi_ ..., Sergey Senozhatsky, (Tue Aug 17, 2:24 am)
Re: [PATCH] fix BUG using smp_processor_id() in touch_nmi_ ..., Sergey Senozhatsky, (Tue Aug 17, 3:28 am)
Re: [PATCH] fix BUG using smp_processor_id() in touch_nmi_ ..., Sergey Senozhatsky, (Tue Aug 17, 3:39 am)
Re: [PATCH] fix BUG using smp_processor_id() in touch_nmi_ ..., Don Zickus, (Tue Aug 17, 6:13 am)
Re: [PATCH] fix BUG using smp_processor_id() in touch_nmi_ ..., Frederic Weisbecker, (Tue Aug 17, 7:48 pm)
[PATCH] avoid second smp_processor_id() call in __touch_wa ..., Sergey Senozhatsky, (Wed Sep 22, 2:00 am)
Re: [PATCH] avoid second smp_processor_id() call in __touc ..., Frederic Weisbecker, (Wed Sep 22, 9:27 am)
Re: [PATCH] avoid second smp_processor_id() call in __touc ..., Frederic Weisbecker, (Wed Sep 22, 9:47 am)
Re: [PATCH] avoid second smp_processor_id() call in __touc ..., Sergey Senozhatsky, (Sat Sep 25, 10:43 am)