From: george anzinger <george@mvista.com>
To: Andrew Morton <akpm@digeo.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Andrea Arcangeli <andrea@suse.de>,
Tim Schmielau <tim@physik3.uni-rostock.de>
Subject: Re: [PATCH] Remove defered timer list in favor of moving the list time update
Date: Wed, 19 Mar 2003 14:25:23 -0800 [thread overview]
Message-ID: <3E78EE53.9090604@mvista.com> (raw)
In-Reply-To: <20030319155258.64cbc43d.akpm@digeo.com>
[-- Attachment #1: Type: text/plain, Size: 1172 bytes --]
Andrew Morton wrote:
> george anzinger <george@mvista.com> wrote:
>
>>I found a problem with the last version. The attached is for
>>2.5.65-1.1171 (i.e. after the other post 2.5.65 changes). The bug is
>>fixed, and theAndrew Morton wrote:
> george anzinger <george@mvista.com> wrote:
>
>>I found a problem with the last version. The attached is for
>>2.5.65-1.1171 (i.e. after the other post 2.5.65 changes). The bug is
>>fixed, and the code even simpler here.
>
>
> Thanks, I'll queue that up after Tim's stuff is merged.
And this removes the defered queue in favor of just moving the list
time update to just prior to the repeat label. (Apply after my
"bumps" patch.)
Do I have the right Andrea?
>
>
--
George Anzinger george@mvista.com
High-res-timers: http://sourceforge.net/projects/high-res-timers/
Preemption patch: http://www.kernel.org/pub/linux/kernel/people/rml
code even simpler here.
>
>
> Thanks, I'll queue that up after Tim's stuff is merged.
>
>
--
George Anzinger george@mvista.com
High-res-timers: http://sourceforge.net/projects/high-res-timers/
Preemption patch: http://www.kernel.org/pub/linux/kernel/people/rml
[-- Attachment #2: hrtimers-run-def.patch --]
[-- Type: text/plain, Size: 2022 bytes --]
--- linux-2.5.65-1.1171-run/kernel/timer.cX 2003-03-19 13:08:24.000000000 -0800
+++ linux/kernel/timer.c 2003-03-19 14:16:53.000000000 -0800
@@ -55,7 +55,6 @@
spinlock_t lock;
unsigned long timer_jiffies;
struct timer_list *running_timer;
- struct list_head *run_timer_list_running;
tvec_root_t tv1;
tvec_t tv2;
tvec_t tv3;
@@ -100,12 +99,6 @@
check_timer_failed(timer);
}
-/*
- * If a timer handler re-adds the timer with expires == jiffies, the timer
- * running code can lock up. So here we detect that situation and park the
- * timer onto base->run_timer_list_running. It will be added to the main timer
- * structures later, by __run_timers().
- */
static void internal_add_timer(tvec_base_t *base, struct timer_list *timer)
{
@@ -113,9 +106,7 @@
unsigned long idx = expires - base->timer_jiffies;
struct list_head *vec;
- if (base->run_timer_list_running) {
- vec = base->run_timer_list_running;
- } else if (idx < TVR_SIZE) {
+ if (idx < TVR_SIZE) {
int i = expires & TVR_MASK;
vec = base->tv1.vec + i;
} else if (idx < 1 << (TVR_BITS + TVN_BITS)) {
@@ -405,7 +396,6 @@
spin_lock_irq(&base->lock);
while (time_after_eq(jiffies, base->timer_jiffies)) {
- LIST_HEAD(deferred_timers);
struct list_head *head;
int index = base->timer_jiffies & TVR_MASK;
@@ -417,7 +407,7 @@
(! cascade(base, &base->tv3, INDEX(1))) &&
! cascade(base, &base->tv4, INDEX(2)))
cascade(base, &base->tv5, INDEX(3));
- base->run_timer_list_running = &deferred_timers;
+ ++base->timer_jiffies;
repeat:
head = base->tv1.vec + index;
if (!list_empty(head)) {
@@ -436,14 +426,6 @@
spin_lock_irq(&base->lock);
goto repeat;
}
- base->run_timer_list_running = NULL;
- ++base->timer_jiffies;
- while (!list_empty(&deferred_timers)) {
- timer = list_entry(deferred_timers.prev,
- struct timer_list, entry);
- list_del(&timer->entry);
- internal_add_timer(base, timer);
- }
}
set_running_timer(base, NULL);
spin_unlock_irq(&base->lock);
next prev parent reply other threads:[~2003-03-19 22:15 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Pine.LNX.4.33.0303181251130.28123-100000@gans.physik3.uni-rostock.de>
2003-03-18 20:26 ` [PATCH] fix nanosleep() granularity bumps Tim Schmielau
2003-03-19 2:08 ` george anzinger
2003-03-19 4:31 ` Andrew Morton
2003-03-19 2:37 ` george anzinger
2003-03-19 2:59 ` Andrew Morton
2003-03-19 7:51 ` Tim Schmielau
2003-03-19 8:35 ` george anzinger
2003-03-19 9:28 ` george anzinger
2003-03-19 9:40 ` Tim Schmielau
2003-03-19 21:30 ` george anzinger
[not found] ` <20030319155258.64cbc43d.akpm@digeo.com>
2003-03-19 22:25 ` george anzinger [this message]
2003-03-20 7:36 ` Tim Schmielau
2003-03-19 9:42 ` Andrew Morton
2003-03-19 18:08 ` george anzinger
2003-03-19 18:51 ` Andrew Morton
2003-03-19 20:29 ` 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=3E78EE53.9090604@mvista.com \
--to=george@mvista.com \
--cc=akpm@digeo.com \
--cc=andrea@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=tim@physik3.uni-rostock.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox