From: George Anzinger <george@mvista.com>
To: Daniel Walker <dwalker@mvista.com>
Cc: linux-kernel@vger.kernel.org, tglx@linutronix.de
Subject: Re: RT and timers
Date: Thu, 09 Jun 2005 16:30:52 -0700 [thread overview]
Message-ID: <42A8D12C.7080308@mvista.com> (raw)
In-Reply-To: <Pine.LNX.4.44.0506091520210.11001-100000@dhcp153.mvista.com>
Daniel Walker wrote:
> George,
>
> I wanted to show you the code below, from the RT patch. I think
> it's possible that, if the code isn't changed in the way below, the
> while() loop could run forever. If jiffies is very fast moving , and the
> softirqd is low priority. Do you have any comments on this?
What you are saying is that it is possible that the kernel will not be able to
keep up the timer list if we lower its priority. Making this change just allows
softirqd to do other things and come right back to this code. If we care at all
about timers, we should do a better job of setting priorities.
In the end, I think we will want to go to a system where timers are just moved
to an expired list on the jiffie interrupt (this is very fast except for the
cascade, as the whole list is moved in one operation). The expired list would
then be processed by a dedicated timer delivery thread that shifts its priority
to match the priority of the highest priority pending timer.
Thomas Gleixner (added to the cc) is currently working on just such a change.
So, in short, I don't see the point to the suggested change. If the kernel is
late, it is best to let it catch up as fast as it can by looping here. The only
counter argument that makes sense to me it that in this case we are starving
other softirqd driven tasks, but that should, if any thing, lighten the timer
load and let this complete faster.
George
--
>
> Daniel
>
>
> @@ -436,13 +437,30 @@ static int cascade(tvec_base_t *base, tv
> static inline void __run_timers(tvec_base_t *base)
> {
> struct timer_list *timer;
> + unsigned long jiffies_sample = jiffies;
>
> spin_lock_irq(&base->lock);
> - while (time_after_eq(jiffies, base->timer_jiffies)) {
> + while (time_after_eq(jiffies_sample, base->timer_jiffies)) {
> struct list_head work_list = LIST_HEAD_INIT(work_list);
> struct list_head *head = &work_list;
> int index = base->timer_jiffies & TVR_MASK;
>
>
> -
> 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/
>
--
George Anzinger george@mvista.com
HRT (High-res-timers): http://sourceforge.net/projects/high-res-timers/
next prev parent reply other threads:[~2005-06-09 23:31 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-09 7:37 [patch] Real-Time Preemption, -RT-2.6.12-rc4-V0.7.47-00 Ingo Molnar
2005-05-09 19:54 ` George Anzinger
2005-05-24 7:59 ` Ingo Molnar
2005-05-24 14:27 ` George Anzinger
2005-05-27 7:21 ` Ingo Molnar
2005-06-09 22:13 ` George Anzinger
2005-06-09 22:25 ` RT and timers Daniel Walker
2005-06-09 23:30 ` George Anzinger [this message]
2005-06-09 23:47 ` Daniel Walker
2005-06-10 1:36 ` George Anzinger
2005-06-10 8:30 ` Thomas Gleixner
[not found] ` <20050523091114.GB24956@elte.hu>
2005-05-27 0:38 ` [patch] Real-Time Preemption, -RT-2.6.12-rc4-V0.7.47-00 George Anzinger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=42A8D12C.7080308@mvista.com \
--to=george@mvista.com \
--cc=dwalker@mvista.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.