[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100817102819.GC12022@swordfish.minsk.epam.com>
Date: Tue, 17 Aug 2010 13:28:19 +0300
From: Sergey Senozhatsky <sergey.senozhatsky@...il.com>
To: Yong Zhang <yong.zhang0@...il.com>
Cc: Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
Frederic Weisbecker <fweisbec@...il.com>,
Peter Zijlstra <peterz@...radead.org>,
Don Zickus <dzickus@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Ingo Molnar <mingo@...e.hu>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] fix BUG using smp_processor_id() in touch_nmi_watchdog
and touch_softlockup_watchdog
On (08/17/10 17:37), Yong Zhang wrote:
> On Tue, Aug 17, 2010 at 5:24 PM, Sergey Senozhatsky
> <sergey.senozhatsky@...il.com> wrote:
> > OK. Suppose (I don't know if it could) migration has happen
> >
> > acpi_os_stall
> > __migration__
> > touch_nmi_watchdog
> >
> > How calling raw_smp_processor_id() (which is current_thread_info()->cpu)
> > vs. preepmt_disable - smp_processor_id() will give us different CPUs?
>
> I don't mean you will get different CPUS(sorry for my poor english).
> I mean if the migration could happen, you want to touch_nmi_watchdog()
> on CPU A(otherwise the watchdog will shout on us), but eventually we
> touch_nmi_watchdog() on CPU B(because of migration),
> and this is not what we want.
>
> So preempt_disable() is redundant here.
>
Shouldn't we be for sure not preepmtible when calling __raw_get_cpu_var?
preempt_disable is reduntant here because current_thread_info()->cpu is
atomic and we just don't want preempt_(enable|disable) overhead?
Sergey
> >
> >> So I prefer using __raw_get_cpu_var() as what we have been done before.
> >>
> >
> > Hm...
> >
> > 26e09c6eee14f4827b55137ba0eedc4e77cd50ab
>
> f69bcf60c3f17aa367e16eef7bc6ab001ea6d58a
> 2508ce1845a3b256798532b2c6b7997c2dc6533b
>
> you can get the previous touch_*_watchdog there.
>
> Thanks,
> Yong
>
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists