* [PATCH -mm] cascade: use list_replace_init()
[not found] <200605152130.k4FLUQTe018341@shell0.pdx.osdl.net>
@ 2006-05-18 1:44 ` Oleg Nesterov
0 siblings, 0 replies; only message in thread
From: Oleg Nesterov @ 2006-05-18 1:44 UTC (permalink / raw)
To: akpm; +Cc: porpoise.chiang, mpm, linux-kernel
On top of Porpoise's
when-config_base_samll=1-the-kernel-261611-cascade-in-kernel-timerc-may-enter-the-infinite-loop.patch
Microoptimization, cascade() can use list_replace_init()
instead of list_splice_init().
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
--- MM/kernel/timer.c~ 2006-05-15 00:03:53.000000000 +0400
+++ MM/kernel/timer.c 2006-05-18 05:12:35.000000000 +0400
@@ -385,9 +385,9 @@ static int cascade(tvec_base_t *base, tv
{
/* cascade all the timers from tv up one level */
struct timer_list *timer, *tmp;
- LIST_HEAD(tv_list);
+ struct list_head tv_list;
- list_splice_init(tv->vec + index, &tv_list);
+ list_replace_init(tv->vec + index, &tv_list);
/*
* We are removing _all_ timers from the list, so we
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-05-17 21:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <200605152130.k4FLUQTe018341@shell0.pdx.osdl.net>
2006-05-18 1:44 ` [PATCH -mm] cascade: use list_replace_init() Oleg Nesterov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox