direct-io.hg

changeset 14321:818da23b7571

linux: fix condition for entering tickless state

I noticed that timer interrupts were running at full rate regardless
of whether the system was idle.
softlockup_get_next_event() must return the maximum of zero and the
delta to the next event, not the minimum (which is always zero or
negative, yielding zero or a very large positive number as return
value).

Signed-off-by: Jan Beulich <jbeulich@novell.com>
author kfraser@localhost.localdomain
date Fri Mar 09 18:30:52 2007 +0000 (2007-03-09)
parents 215b799fa181
children 2d4df044d7de
files patches/linux-2.6.18/softlockup-no-idle-hz.patch
line diff
     1.1 --- a/patches/linux-2.6.18/softlockup-no-idle-hz.patch	Fri Mar 09 18:26:47 2007 +0000
     1.2 +++ b/patches/linux-2.6.18/softlockup-no-idle-hz.patch	Fri Mar 09 18:30:52 2007 +0000
     1.3 @@ -34,7 +34,7 @@ diff -pruN ../orig-linux-2.6.18/kernel/s
     1.4  +			!per_cpu(watchdog_task, this_cpu))
     1.5  +		return MAX_JIFFY_OFFSET;
     1.6  +
     1.7 -+	return min_t(long, 0, touch_timestamp + HZ - jiffies);
     1.8 ++	return max_t(long, 0, touch_timestamp + HZ - jiffies);
     1.9  +}
    1.10  +
    1.11   /*