[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.58.0710231005540.29506@gandalf.stny.rr.com>
Date: Tue, 23 Oct 2007 10:08:24 -0400 (EDT)
From: Steven Rostedt <rostedt@...dmis.org>
To: Peter Zijlstra <a.p.zijlstra@...llo.nl>
cc: linux-kernel@...r.kernel.org, Daniel Walker <dwalker@...sta.com>,
Ingo Molnar <mingo@...e.hu>,
Thomas Gleixner <tglx@...utronix.de>,
Gregory Haskins <ghaskins@...ell.com>,
Oleg Nesterov <oleg@...sign.ru>
Subject: Re: [RFC/PATCH 2/5] rt: list_splice2
--
On Tue, 23 Oct 2007, Peter Zijlstra wrote:
>
> /**
> @@ -341,7 +341,13 @@ static inline void __list_splice(struct
> static inline void list_splice(struct list_head *list, struct list_head *head)
> {
> if (!list_empty(list))
> - __list_splice(list, head);
> + __list_splice(list, head, head->next);
> +}
> +
> Index: linux-2.6/lib/lock_list.c
> ===================================================================
> --- linux-2.6.orig/lib/lock_list.c
> +++ linux-2.6/lib/lock_list.c
> @@ -128,7 +128,7 @@ void lock_list_splice_init(struct lock_l
> lock = __lock_list_reverse(list);
> if (!list_empty(&list->head)) {
> spin_lock_nested(&head->lock, LOCK_LIST_NESTING_NEXT);
> - __list_splice(&list->head, &head->head);
> + __list_splice(&list->head, &head->head, head->head.next);
Can't this just now be list_splice and not __list_splice?
Yes it tests for list_empty again, but that should (hopefully) be
optimized out.
-- Steve
> INIT_LIST_HEAD(&list->head);
> spin_unlock(&head->lock);
> }
>
> --
>
>
>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists