From: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
To: Rusty Russell <rusty@rustcorp.com.au>, linux-kernel@vger.kernel.org
Subject: [PATCH 3/3] stop_machine: add stopmachine_timeout sysctl entry
Date: Tue, 29 Apr 2008 10:33:55 +0900 [thread overview]
Message-ID: <48167B03.3010509@jp.fujitsu.com> (raw)
In-Reply-To: <481678F5.7080504@jp.fujitsu.com>
There would be some system which cannot accept the arbitrary
timeout value(= 5sec).
This patch allow us to change the value via sysctl.
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
---
kernel/stop_machine.c | 2 +-
kernel/sysctl.c | 10 ++++++++++
2 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/kernel/stop_machine.c b/kernel/stop_machine.c
index cd2ba88..cc6c8ec 100644
--- a/kernel/stop_machine.c
+++ b/kernel/stop_machine.c
@@ -31,7 +31,7 @@ static unsigned int stopmachine_num_threads;
static atomic_t stopmachine_thread_ack;
static atomic_t stopmachine_busy_exit;
-static unsigned long stopmachine_timeout = 5; /* secs, arbitrary */
+unsigned long stopmachine_timeout = 5; /* secs, arbitrary */
static int stopmachine(void *cpu)
{
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index fd33648..fe489a7 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -80,6 +80,7 @@ extern int compat_log;
extern int maps_protect;
extern int sysctl_stat_interval;
extern int latencytop_enabled;
+extern unsigned long stopmachine_timeout;
/* Constants used for minimum and maximum */
#if defined(CONFIG_DETECT_SOFTLOCKUP) || defined(CONFIG_HIGHMEM)
@@ -809,6 +810,15 @@ static struct ctl_table kern_table[] = {
.proc_handler = &proc_dostring,
.strategy = &sysctl_string,
},
+ {
+ .ctl_name = CTL_UNNUMBERED,
+ .procname = "stopmachine_timeout",
+ .data = &stopmachine_timeout,
+ .maxlen = sizeof(unsigned long),
+ .mode = 0644,
+ .proc_handler = &proc_doulongvec_minmax,
+ .strategy = &sysctl_intvec,
+ },
/*
* NOTE: do not add new entries to this table unless you have read
* Documentation/sysctl/ctl_unnumbered.txt
next prev parent reply other threads:[~2008-04-29 1:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-29 1:25 [PATCH 0/3] patches for stop_machine Hidetoshi Seto
2008-04-29 1:29 ` [PATCH 1/3] stop_machine: short exit path for if we cannot create enough threads Hidetoshi Seto
2008-05-06 2:57 ` Rusty Russell
2008-04-29 1:31 ` [PATCH 2/3] stop_machine: add timeout for child thread deployment Hidetoshi Seto
2008-04-29 1:33 ` Hidetoshi Seto [this message]
2008-04-29 2:25 ` [PATCH 0/3] patches for stop_machine Hidetoshi Seto
2008-05-02 20:33 ` Pavel Machek
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=48167B03.3010509@jp.fujitsu.com \
--to=seto.hidetoshi@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
/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