public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@tv-sign.ru>
To: akpm@osdl.org
Cc: porpoise.chiang@gmail.com, mpm@selenic.com, linux-kernel@vger.kernel.org
Subject: [PATCH -mm] cascade: use list_replace_init()
Date: Thu, 18 May 2006 05:44:00 +0400	[thread overview]
Message-ID: <20060518014400.GA896@oleg> (raw)
In-Reply-To: <200605152130.k4FLUQTe018341@shell0.pdx.osdl.net>

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


           reply	other threads:[~2006-05-17 21:43 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <200605152130.k4FLUQTe018341@shell0.pdx.osdl.net>]

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=20060518014400.GA896@oleg \
    --to=oleg@tv-sign.ru \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpm@selenic.com \
    --cc=porpoise.chiang@gmail.com \
    /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