lkml.org 
[lkml]   [2006]   [May]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH -mm] cascade: use list_replace_init()
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
-
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: 2006-05-17 23:46    [W:0.159 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site