[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20070917205945.GA29333@linux.vnet.ibm.com>
Date: Mon, 17 Sep 2007 13:59:45 -0700
From: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Matthew Helsley <matthltc@...ibm.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] State limits to safety of _safe iterators
On Fri, Sep 14, 2007 at 05:21:51PM -0700, Andrew Morton wrote:
> On Thu, 13 Sep 2007 08:21:07 -0700
> "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com> wrote:
> > On Thu, Sep 13, 2007 at 02:22:45AM -0700, Matthew Helsley wrote:
> > > On Wed, 2007-09-12 at 18:01 -0700, Paul E. McKenney wrote:
> > > > The _safe list iterators make a blanket statement about how they are
> > > > safe against removal. This patch, inspired by private conversations
> > > > with people who unwisely but perhaps understandably took this blanket
> > > > statement at its word, adds comments stating limits to this safety.
> > > >
> > > > Signed-off-by: Paul E. McKenney <paulmck@...ux.vnet.ibm.com>
> > > > ---
> > > >
> > > > list.h | 42 ++++++++++++++++++++++++++++++++++++++++++
> > > > 1 file changed, 42 insertions(+)
> > > >
> > > > diff -urpNa -X dontdiff linux-2.6.22/include/linux/list.h linux-2.6.22-safedoc/include/linux/list.h
> > > > --- linux-2.6.22/include/linux/list.h 2007-07-08 16:32:17.000000000 -0700
> > > > +++ linux-2.6.22-safedoc/include/linux/list.h 2007-09-12 17:45:38.000000000 -0700
> > > > @@ -472,6 +472,12 @@ static inline void list_splice_init_rcu(
> > > > * @pos: the &struct list_head to use as a loop cursor.
> > > > * @n: another &struct list_head to use as temporary storage
> > > > * @head: the head for your list.
> > > > + *
> > > > + * Please note that this is safe only against removal by the code in
> > >
> > > I'm not trying to be snarky but how far should we go before expecting
> > > folks to read the macros? Depending on the answer you may also want to
> > > mention that without additional additional code it's safe only against
> > > removal of the list element at pos.
> >
> > Good question. In fact, I would have agreed with you before coming
> > across people who in my experience are generally reasonably well clued
> > in who were confused about this.
> >
>
> hmm, yes, I must say, one would need to be fairly thick to expect a little
> helper macro to protect you from activity on other CPUs.
Or distracted or tired or whatever.
In any case, I don't feel all that strongly about this, so if the general
consensus is that it is not required, no problem...
Thanx, Paul
-
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