aboutsummaryrefslogtreecommitdiffstats
path: root/fs/pstore/platform.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/pstore/platform.c')
-rw-r--r--fs/pstore/platform.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/fs/pstore/platform.c b/fs/pstore/platform.c
index 61461ed9b6c8..34ca3141eb0a 100644
--- a/fs/pstore/platform.c
+++ b/fs/pstore/platform.c
@@ -31,6 +31,7 @@
31#include <linux/slab.h> 31#include <linux/slab.h>
32#include <linux/uaccess.h> 32#include <linux/uaccess.h>
33#include <linux/hardirq.h> 33#include <linux/hardirq.h>
34#include <linux/jiffies.h>
34#include <linux/workqueue.h> 35#include <linux/workqueue.h>
35 36
36#include "internal.h" 37#include "internal.h"
@@ -40,7 +41,10 @@
40 * whether the system is actually still running well enough 41 * whether the system is actually still running well enough
41 * to let someone see the entry 42 * to let someone see the entry
42 */ 43 */
43#define PSTORE_INTERVAL (60 * HZ) 44static int pstore_update_ms = 60000;
45module_param_named(update_ms, pstore_update_ms, int, 0600);
46MODULE_PARM_DESC(update_ms, "milliseconds before pstore updates its content "
47 "(default is 60000; -1 means runtime updates are disabled)");
44 48
45static int pstore_new_entry; 49static int pstore_new_entry;
46 50
@@ -231,8 +235,11 @@ int pstore_register(struct pstore_info *psi)
231 kmsg_dump_register(&pstore_dumper); 235 kmsg_dump_register(&pstore_dumper);
232 pstore_register_console(); 236 pstore_register_console();
233 237
234 pstore_timer.expires = jiffies + PSTORE_INTERVAL; 238 if (pstore_update_ms >= 0) {
235 add_timer(&pstore_timer); 239 pstore_timer.expires = jiffies +
240 msecs_to_jiffies(pstore_update_ms);
241 add_timer(&pstore_timer);
242 }
236 243
237 return 0; 244 return 0;
238} 245}
@@ -291,7 +298,7 @@ static void pstore_timefunc(unsigned long dummy)
291 schedule_work(&pstore_work); 298 schedule_work(&pstore_work);
292 } 299 }
293 300
294 mod_timer(&pstore_timer, jiffies + PSTORE_INTERVAL); 301 mod_timer(&pstore_timer, jiffies + msecs_to_jiffies(pstore_update_ms));
295} 302}
296 303
297module_param(backend, charp, 0444); 304module_param(backend, charp, 0444);