lkml.org 
[lkml]   [2010]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] avoid second smp_processor_id() call in __touch_watchdog
On Wed, Sep 22, 2010 at 12:00:12PM +0300, Sergey Senozhatsky wrote:
> Hello,
>
> Per our previous conversation:
>
> Andrew Morton wrote:
> > Fair enough, although strictly speaking this should be done in a
> > separate and later patch.
> >
>
>
> Avoid double smp_processor_id() call in __touch_watchdog (smp_processor_id()
> itself and later call in __get_cpu_var())
>
> Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>

Thanks! I'll apply it.

Cheers,
Don
>
> ---
>
> diff --git a/kernel/watchdog.c b/kernel/watchdog.c
> index 7f9c3c5..03d97c5 100644
> --- a/kernel/watchdog.c
> +++ b/kernel/watchdog.c
> @@ -116,8 +116,7 @@ static unsigned long get_sample_period(void)
> static void __touch_watchdog(void)
> {
> int this_cpu = smp_processor_id();
> -
> - __get_cpu_var(watchdog_touch_ts) = get_timestamp(this_cpu);
> + per_cpu(watchdog_touch_ts, this_cpu) = get_timestamp(this_cpu);
> }
>
> void touch_softlockup_watchdog(void)
>


\
 
 \ /
  Last update: 2010-09-22 16:45    [W:0.198 / U:0.864 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site