From 83a65928c9fe02cd438ee8f02033f48ec4dd810d Mon Sep 17 00:00:00 2001 From: Anton Vorontsov Date: Sat, 26 May 2012 06:20:28 -0700 Subject: [PATCH] --- yaml --- r: 317339 b: refs/heads/master c: a3f5f075c2e2c52c9c656c54ea77ceff5b2e1e25 h: refs/heads/master i: 317337: dcec466a06e1d1abb293df7112948a00b5b032ce 317335: 11437404ef7f5eccec7432860c673baba135a3f8 v: v3 --- [refs] | 2 +- trunk/fs/pstore/platform.c | 15 +++++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index b1be5dd78a73..b32c2b145228 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b8587daa756141da776e3d4c3a5a315f5af78708 +refs/heads/master: a3f5f075c2e2c52c9c656c54ea77ceff5b2e1e25 diff --git a/trunk/fs/pstore/platform.c b/trunk/fs/pstore/platform.c index 61461ed9b6c8..34ca3141eb0a 100644 --- a/trunk/fs/pstore/platform.c +++ b/trunk/fs/pstore/platform.c @@ -31,6 +31,7 @@ #include #include #include +#include #include #include "internal.h" @@ -40,7 +41,10 @@ * whether the system is actually still running well enough * to let someone see the entry */ -#define PSTORE_INTERVAL (60 * HZ) +static int pstore_update_ms = 60000; +module_param_named(update_ms, pstore_update_ms, int, 0600); +MODULE_PARM_DESC(update_ms, "milliseconds before pstore updates its content " + "(default is 60000; -1 means runtime updates are disabled)"); static int pstore_new_entry; @@ -231,8 +235,11 @@ int pstore_register(struct pstore_info *psi) kmsg_dump_register(&pstore_dumper); pstore_register_console(); - pstore_timer.expires = jiffies + PSTORE_INTERVAL; - add_timer(&pstore_timer); + if (pstore_update_ms >= 0) { + pstore_timer.expires = jiffies + + msecs_to_jiffies(pstore_update_ms); + add_timer(&pstore_timer); + } return 0; } @@ -291,7 +298,7 @@ static void pstore_timefunc(unsigned long dummy) schedule_work(&pstore_work); } - mod_timer(&pstore_timer, jiffies + PSTORE_INTERVAL); + mod_timer(&pstore_timer, jiffies + msecs_to_jiffies(pstore_update_ms)); } module_param(backend, charp, 0444);