public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@us.ibm.com>
To: Stelian Pop <stelian@popies.net>
Cc: Mike Christie <michaelc@cs.wisc.edu>,
	linux-kernel@vger.kernel.org, akpm@osdl.org, paulus@au1.ibm.com,
	anton@au1.ibm.com, open-iscsi@googlegroups.com,
	pradeep@us.ibm.com, mashirle@us.ibm.com
Subject: Re: [PATCH] memory ordering in __kfifo primitives
Date: Thu, 10 Aug 2006 09:11:29 -0700	[thread overview]
Message-ID: <20060810161129.GF1298@us.ibm.com> (raw)
In-Reply-To: <1155224842.5393.13.camel@localhost.localdomain>

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

  reply	other threads:[~2006-08-10 16:10 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-10  0:18 [PATCH] memory ordering in __kfifo primitives Paul E. McKenney
2006-08-10  0:29 ` Andrew Morton
2006-08-10  1:01   ` Paul E. McKenney
2006-08-10  0:33 ` Paul E. McKenney
2006-08-10  5:48   ` Mike Christie
2006-08-10 13:41     ` Paul E. McKenney
2006-08-10 14:26       ` Stelian Pop
2006-08-10 15:39         ` Paul E. McKenney
2006-08-10 15:47           ` Stelian Pop
2006-08-10 16:11             ` Paul E. McKenney [this message]
2006-08-10 16:23               ` Stelian Pop
2006-08-10 16:47                 ` Paul E. McKenney
2006-08-10 20:27                   ` Stelian Pop
2006-08-10 20:54                     ` Paul E. McKenney

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=20060810161129.GF1298@us.ibm.com \
    --to=paulmck@us.ibm.com \
    --cc=akpm@osdl.org \
    --cc=anton@au1.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mashirle@us.ibm.com \
    --cc=michaelc@cs.wisc.edu \
    --cc=open-iscsi@googlegroups.com \
    --cc=paulus@au1.ibm.com \
    --cc=pradeep@us.ibm.com \
    --cc=stelian@popies.net \
    /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