Discussion:
[PATCH 0/5] timers: description
(too old to reply)
Chen, Kenneth W
2005-03-24 21:59:01 UTC
Permalink
Oleg Nesterov wrote on Monday, March 21, 2005 6:19 AM
These patches are updated version of 'del_timer_sync: proof of concept'
2 patches.
Looks good performance wise. Took a quick micro benchmark measurement on
a 16-node numa box (32-way). Results are pretty nice (to the expectation).

Time to execute del_timer_sync, averaged over 10,000 call:
Vanilla 2.6.11 19,313 ns
2.6.12-rc1-mm1 81 ns
del_singleshot_timer_sync 74ns

Took another measurement on a 4-way smp box:
Vanilla 2.6.11 648 ns
2.6.12-rc1-mm1 55 ns
del_singleshot 41 ns

And Andrew always asks what are the impact on real-world bench, we did
not see performance regression on db transaction processing benchmark
with these set of timer patches versus using del_singleshot_timer_sync.
(del_singleshot_timer_sync is slightly faster, though 14 ns difference
falls well into noise range)

Note: I've only stress tested deleting an un-expired timer.

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



-------------------------------------------------------------------------------
Achtung: diese Newsgruppe ist eine unidirektional gegatete Mailingliste.
Antworten nur per Mail an die im Reply-To-Header angegebene Adresse.
Fragen zum Gateway -> ***@inka.de.
-------------------------------------------------------------------------------
Chen, Kenneth W
2005-03-26 19:54:37 UTC
Permalink
Oleg Nesterov wrote on March 19, 2005 17:28:48
These patches are updated version of 'del_timer_sync: proof of
concept' 2 patches.
I changed schedule_timeout() to call the new del_timer_sync instead of
currently del_singleshot_timer_sync in attempt to stress these set of
patches a bit more and I just observed a kernel hang.

The symptom starts with lost network connectivity. It looks like the
entire ethernet connections were gone, followed by blank screen on the
console. I'm not sure whether it is a hard or soft hang, but system
is inaccessible (blank screen and no network connection). I'm forced
to do a reboot when that happens.

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



-------------------------------------------------------------------------------
Achtung: diese Newsgruppe ist eine unidirektional gegatete Mailingliste.
Antworten nur per Mail an die im Reply-To-Header angegebene Adresse.
Fragen zum Gateway -> ***@inka.de.
-------------------------------------------------------------------------------
Oleg Nesterov
2005-03-27 10:04:26 UTC
Permalink
Post by Chen, Kenneth W
Oleg Nesterov wrote on March 19, 2005 17:28:48
These patches are updated version of 'del_timer_sync: proof of
concept' 2 patches.
I changed schedule_timeout() to call the new del_timer_sync instead of
currently del_singleshot_timer_sync in attempt to stress these set of
patches a bit more and I just observed a kernel hang.
The symptom starts with lost network connectivity. It looks like the
entire ethernet connections were gone, followed by blank screen on the
console. I'm not sure whether it is a hard or soft hang, but system
is inaccessible (blank screen and no network connection). I'm forced
to do a reboot when that happens.
Very strange. I am running 2.6.11 + timer patches +
#define del_singleshot_timer_sync(t) del_timer_sync(t)
without any problems.

This timer is private to schedule_timeout(), it can't change
base, so del_timer_sync() should be "obviously correct" in
that case.

What kernel version? Could you try this stupid patch?

Oleg.

--- TST/kernel/timer.c~ 2005-03-27 16:47:20.000000000 +0400
+++ TST/kernel/timer.c 2005-03-27 17:16:32.000000000 +0400
@@ -352,27 +352,46 @@ EXPORT_SYMBOL(del_timer);
*/
int del_timer_sync(struct timer_list *timer)
{
+ unsigned long tout;
+ int running = 0, migrated = 0, done = 0;
int ret;

check_timer(timer);

+ preempt_disable();
+ tout = jiffies + 10;
+
ret = 0;
for (;;) {
unsigned long flags;
tvec_base_t *base;

base = timer_base(timer);
- if (!base)
+ if (!base) {
+ preempt_enable();
return ret;
+ }
+ if (time_after(jiffies, tout)) {
+ preempt_enable();
+ printk(KERN_ERR "del_timer_sync hang: %d %d %d %d\n",
+ running, migrated, done, ret);
+ dump_stack();
+ return 0;
+ }

spin_lock_irqsave(&base->lock, flags);

- if (base->running_timer == timer)
+ if (base->running_timer == timer) {
+ ++running;
goto unlock;
+ }

- if (timer_base(timer) != base)
+ if (timer_base(timer) != base) {
+ ++migrated;
goto unlock;
+ }

+ ++done;
if (timer_pending(timer)) {
list_del(&timer->entry);
ret = 1;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



-------------------------------------------------------------------------------
Achtung: diese Newsgruppe ist eine unidirektional gegatete Mailingliste.
Antworten nur per Mail an die im Reply-To-Header angegebene Adresse.
Fragen zum Gateway -> ***@inka.de.
-------------------------------------------------------------------------------
Christoph Lameter
2005-03-28 19:15:43 UTC
Permalink
Post by Chen, Kenneth W
Oleg Nesterov wrote on March 19, 2005 17:28:48
These patches are updated version of 'del_timer_sync: proof of
concept' 2 patches.
I changed schedule_timeout() to call the new del_timer_sync instead of
currently del_singleshot_timer_sync in attempt to stress these set of
patches a bit more and I just observed a kernel hang.
The symptom starts with lost network connectivity. It looks like the
entire ethernet connections were gone, followed by blank screen on the
console. I'm not sure whether it is a hard or soft hang, but system
is inaccessible (blank screen and no network connection). I'm forced
to do a reboot when that happens.
Same problems here with occasional hangs w/o changes to schedule_timeout.

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



-------------------------------------------------------------------------------
Achtung: diese Newsgruppe ist eine unidirektional gegatete Mailingliste.
Antworten nur per Mail an die im Reply-To-Header angegebene Adresse.
Fragen zum Gateway -> ***@inka.de.
-------------------------------------------------------------------------------
Oleg Nesterov
2005-03-29 11:23:32 UTC
Permalink
Post by Christoph Lameter
Post by Chen, Kenneth W
I changed schedule_timeout() to call the new del_timer_sync instead of
currently del_singleshot_timer_sync in attempt to stress these set of
patches a bit more and I just observed a kernel hang.
The symptom starts with lost network connectivity. It looks like the
entire ethernet connections were gone, followed by blank screen on the
console. I'm not sure whether it is a hard or soft hang, but system
is inaccessible (blank screen and no network connection). I'm forced
to do a reboot when that happens.
Same problems here with occasional hangs w/o changes to schedule_timeout.
Bad. You are runnning 2.6.12-rc1-mm1 ?

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



-------------------------------------------------------------------------------
Achtung: diese Newsgruppe ist eine unidirektional gegatete Mailingliste.
Antworten nur per Mail an die im Reply-To-Header angegebene Adresse.
Fragen zum Gateway -> ***@inka.de.
-------------------------------------------------------------------------------
Christoph Lameter
2005-03-29 14:48:22 UTC
Permalink
Post by Oleg Nesterov
Post by Christoph Lameter
Same problems here with occasional hangs w/o changes to schedule_timeout.
Bad. You are runnning 2.6.12-rc1-mm1 ?
Not sure if this is really related to your patches. Its 2.6.11 with your
patches extracted from mm.

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



-------------------------------------------------------------------------------
Achtung: diese Newsgruppe ist eine unidirektional gegatete Mailingliste.
Antworten nur per Mail an die im Reply-To-Header angegebene Adresse.
Fragen zum Gateway -> ***@inka.de.
-------------------------------------------------------------------------------
Loading...