lkml.org 
[lkml]   [2008]   [Jun]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: [PATCH 3/3] softlockup: fix watchdog task wakeup frequency
Date
Ingo Molnar <mingo@elte.hu> writes:

> * Johannes Weiner <hannes@saeurebad.de> wrote:
>
>> Wake up the watchdog every second instead of every second. [...]
>
> now _that_ is a real improvement ;-)
>
>> /* Wake up the high-prio watchdog task every second: */
>> - if (now > (touch_timestamp + 1))
>> + if (now > touch_timestamp)
>> wake_up_process(per_cpu(watchdog_task, this_cpu));
>
> you mean wake up every second instead of every two seconds?

Every second second :D The second `second' [adjective] refers to the
first `second' [noun].

> i think the best sleep period for the watchdog is half of the threshold.
> It makes no point to check sooner than that. I.e. softlockup_thresh/2
> would be better?

Hm, it updates the timestamp, so it makes only sense if it runs at a
maximum every second (timestamp granularity) or even less. The check
for hung tasks uses the cpu timestamp as well for comparison, so that
would be okay too.

Like this?

diff --git a/kernel/softlockup.c b/kernel/softlockup.c
index c828c23..b884546 100644
--- a/kernel/softlockup.c
+++ b/kernel/softlockup.c
@@ -106,8 +106,9 @@ void softlockup_tick(void)

now = get_timestamp(this_cpu);

- /* Wake up the high-prio watchdog task every second: */
- if (now > (touch_timestamp + 1))
+ /* Wake up the high-prio watchdog task twice per
+ * threshold timespan. */
+ if (now > (touch_timestamp + softlockup_thresh / 2))
wake_up_process(per_cpu(watchdog_task, this_cpu));

/* Warn about unreasonable delays: */

\
 
 \ /
  Last update: 2008-06-27 14:37    [W:0.061 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site