lkml.org 
[lkml]   [2005]   [Jun]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Real-Time Preemption, using msecs_to_jiffies() instead of HZ

* Luca Falavigna <dktrkranz@gmail.com> wrote:

> I was looking at kernel/softlookup.c when I noticed you used HZ in order to get
> a 10-second delay:
>
> void softlockup_tick(struct pt_regs *regs)
> {
> ...
> if (time_after(jiffies, timestamp + 10*HZ)) {
> ...
> }

oops, indeed. (i've also forwarded your patch to akpm, as the softlockup
patch is included in -mm too)

> I created this small patch (built against version
> 2.6.12-rc6-V0.7.48-05) which does use of msecs_to_jiffies() to get a
> correct behaviour with every platform. Similarly I modified function
> watchdog and kernel/irq/autoprobe.c file (probe_irq_on function).
>
> Here is the patch:

> ++ msleep(msecs_to_jiffies(20));
> ++ msleep(msecs_to_jiffies(100));
> ++ msleep_interruptible(msecs_to_jiffies(1000));

actually, this should be msleep(20/100/1000). I've fixed these in my
tree.

Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-06-11 15:39    [W:0.039 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site