lkml.org 
[lkml]   [2006]   [Aug]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] memory ordering in __kfifo primitives
On Thu, Aug 10, 2006 at 05:47:22PM +0200, Stelian Pop wrote:
> Le jeudi 10 août 2006 à 08:39 -0700, Paul E. McKenney a écrit :
> > On Thu, Aug 10, 2006 at 04:26:53PM +0200, Stelian Pop wrote:
> > > Le jeudi 10 août 2006 à 06:41 -0700, Paul E. McKenney a écrit :
> > >
> > > > I am happy to go either way -- the patch with the memory barriers
> > > > (which does have the side-effect of slowing down kfifo_get() and
> > > > kfifo_put(), by the way), or a patch removing the comments saying
> > > > that it is OK to invoke __kfifo_get() and __kfifo_put() without
> > > > locking.
> > > >
> > > > Any other thoughts on which is better? (1) the memory barriers or
> > > > (2) requiring the caller hold appropriate locks across calls to
> > > > __kfifo_get() and __kfifo_put()?
> > >
> > > If someone wants to use explicit locking, he/she can go with kfifo_get()
> > > instead of the __ version.
> >
> > However, the kfifo_get()/kfifo_put() interfaces use the internal lock,
>
> ... and the internal lock can be supplied by the user at kfifo_alloc()
> time.

Would that really work for them? Looks to me like it would result
in self-deadlock if they passed in session->lock.

Or did you have something else in mind for them?

These are the __kfifo_get() and __kfifo_put() uses in:

drivers/scsi/iscsi_tcp.c
drivers/scsi/libiscsi.c
drivers/infiniband/ulp/iser/iser_initiator.c

Thanx, Paul
-
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-08-10 18:13    [W:0.049 / U:0.960 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site