[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200901070636.n076aFY0061512@www262.sakura.ne.jp>
Date: Wed, 07 Jan 2009 15:36:15 +0900
From: Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>
To: jmorris@...ei.org
Cc: akpm@...ux-foundation.org, paulmck@...ux.vnet.ibm.com,
linux-security-module@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [TOMOYO #14 (mmotm 2008-12-30-16-05) 02/10] Singly linked list implementation.
James Morris wrote:
> > Not all structures listed below are used as singly linked list,
> > but many of them are used as singly linked list.
>
> Can any of these be converted to your singly linked list implementation ?
Maybe, but will be few.
Regular singly linked list (which is known as "slist") implementation has
below characteristics.
(1) Supports "add", "read" and "remove" operations.
(2) Caller holds read lock when reading, and holds write lock when adding or
removing.
(3) Iteration method (for_each_*) needn't to call rcu_dereference() because
caller holds locks as needed.
TOMOYO's singly linked list (which is named as "list1") implementation has
below characteristics.
(1) Supports "add" and "read" operations.
(2) Caller holds a lock when adding, but doesn't hold a lock when reading.
(3) Iteration method (for_each_*) needs to call rcu_dereference() because
caller doesn't hold a lock when reading.
I think it is not a good thing to rename "list1" to "slist".
Many of these in-tree singly linked list users need to use regular singly
linked list because they need to remove elements from their lists.
--
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