lkml.org 
[lkml]   [2014]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 09/11] watchdog: Simplify a little the IPI call
On Sat 08-02-14 17:18:38, Frederic Weisbecker wrote:
> In order to remotely restart the watchdog hrtimer, update_timers()
> allocates a csd on the stack and pass it to __smp_call_function_single().
>
> There is no partcular need, however, for a specific csd here. Lets
> simplify that a little by calling smp_call_function_single()
> which can already take care of the csd allocation by itself.
>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Christoph Hellwig <hch@infradead.org>
> Cc: Don Zickus <dzickus@redhat.com>
> Cc: Ingo Molnar <mingo@kernel.org>
> Cc: Jan Kara <jack@suse.cz>
> Cc: Jens Axboe <jens.axboe@oracle.com>
> Cc: Michal Hocko <mhocko@suse.cz>
> Cc: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>

Looks good to me.
Reviewed-by: Michal Hocko <mhocko@suse.cz>

> ---
> kernel/watchdog.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/kernel/watchdog.c b/kernel/watchdog.c
> index 4431610..01c6f97 100644
> --- a/kernel/watchdog.c
> +++ b/kernel/watchdog.c
> @@ -505,7 +505,6 @@ static void restart_watchdog_hrtimer(void *info)
>
> static void update_timers(int cpu)
> {
> - struct call_single_data data = {.func = restart_watchdog_hrtimer};
> /*
> * Make sure that perf event counter will adopt to a new
> * sampling period. Updating the sampling period directly would
> @@ -515,7 +514,7 @@ static void update_timers(int cpu)
> * might be late already so we have to restart the timer as well.
> */
> watchdog_nmi_disable(cpu);
> - __smp_call_function_single(cpu, &data, 1);
> + smp_call_function_single(cpu, restart_watchdog_hrtimer, NULL, 1);
> watchdog_nmi_enable(cpu);
> }
>
> --
> 1.8.3.1
>

--
Michal Hocko
SUSE Labs


\
 
 \ /
  Last update: 2014-02-10 14:01    [W:0.101 / U:0.800 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site