mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Frederic Weisbecker <fweisbec@gmail.com>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Christoph Hellwig <hch@infradead.org>,
	Don Zickus <dzickus@redhat.com>, Ingo Molnar <mingo@kernel.org>,
	Jan Kara <jack@suse.cz>, Jens Axboe <axboe@fb.com>,
	Michal Hocko <mhocko@suse.cz>,
	"Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
Subject: [PATCH 09/11] watchdog: Simplify a little the IPI call
Date: Mon, 24 Feb 2014 16:40:00 +0100	[thread overview]
Message-ID: <1393256402-16907-10-git-send-email-fweisbec@gmail.com> (raw)
In-Reply-To: <1393256402-16907-1-git-send-email-fweisbec@gmail.com>

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.

Acked-by: Don Zickus <dzickus@redhat.com>
Reviewed-by: Michal Hocko <mhocko@suse.cz>
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 <axboe@fb.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>
---
 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


  parent reply	other threads:[~2014-02-24 15:40 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-24 15:39 [PATCH 00/11] smp: Single IPI cleanups v2 Frederic Weisbecker
2014-02-24 15:39 ` [PATCH 01/11] block: Stop abusing csd.list for fifo_time Frederic Weisbecker
2014-02-24 15:39 ` [PATCH 02/11] block: Remove useless IPI struct initialization Frederic Weisbecker
2014-02-24 15:39 ` [PATCH 03/11] block: Stop abusing rq->csd.list in blk-softirq Frederic Weisbecker
2014-02-24 15:39 ` [PATCH 04/11] smp: Iterate functions through llist_for_each_entry_safe() Frederic Weisbecker
2014-02-24 15:39 ` [PATCH 05/11] smp: Remove unused list_head from csd Frederic Weisbecker
2014-02-24 15:39 ` [PATCH 06/11] smp: Teach __smp_call_function_single() to check for offline cpus Frederic Weisbecker
2014-02-24 15:39 ` [PATCH 07/11] smp: Consolidate the various smp_call_function_single() declensions Frederic Weisbecker
2014-02-24 15:39 ` [PATCH 08/11] smp: Move __smp_call_function_single() below its safe version Frederic Weisbecker
2014-02-24 15:40 ` Frederic Weisbecker [this message]
2014-02-24 15:40 ` [PATCH 10/11] smp: Remove wait argument from __smp_call_function_single() Frederic Weisbecker
2014-02-24 15:40 ` [PATCH 11/11] smp: Rename __smp_call_function_single() to smp_call_function_single_async() Frederic Weisbecker
2014-02-24 17:20 ` [PATCH 00/11] smp: Single IPI cleanups v2 Jens Axboe
2014-02-24 20:37   ` Frederic Weisbecker
2014-02-24 22:45     ` Jens Axboe
  -- strict thread matches above, loose matches on Subject: below --
2014-02-08 16:18 [RFC PATCH 00/11] smp: Single IPI cleanups Frederic Weisbecker
2014-02-08 16:18 ` [PATCH 09/11] watchdog: Simplify a little the IPI call Frederic Weisbecker
2014-02-10 12:26   ` Michal Hocko
2014-02-10 14:46   ` Don Zickus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1393256402-16907-10-git-send-email-fweisbec@gmail.com \
    --to=fweisbec@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=axboe@fb.com \
    --cc=dzickus@redhat.com \
    --cc=hch@infradead.org \
    --cc=jack@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhocko@suse.cz \
    --cc=mingo@kernel.org \
    --cc=srivatsa.bhat@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome