mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
To: Christoph Hellwig <hch@lst.de>
Cc: "Nicholas A. Bellinger" <nab@daterainc.com>,
	target-devel <target-devel@vger.kernel.org>,
	linux-scsi <linux-scsi@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Hannes Reinecke <hare@suse.de>,
	Sagi Grimberg <sagig@mellanox.com>
Subject: Re: [PATCH 01/12] target: Convert se_node_acl->device_list[] to RCU hlist
Date: Mon, 18 May 2015 23:05:47 -0700	[thread overview]
Message-ID: <1432015547.9093.76.camel@haakon3.risingtidesystems.com> (raw)
In-Reply-To: <20150518080155.GA6451@lst.de>

(resending)

On Mon, 2015-05-18 at 10:01 +0200, Christoph Hellwig wrote:
> On Mon, May 18, 2015 at 09:41:02AM +0200, Christoph Hellwig wrote:
> > > Here's a first pass at this along with kref + completion conversion for
> > > the special case PR ALL_TGT_PT=1 pointer dereference.
> > 
> > Btw, I started hacking up a patch to merge se_port and t10_alua_tg_pt_gp_member
> > in se_lun, which seems even better as it closes all kinds of other
> > races.  Can you keep this one back for now, I'll send out that patch
> > ASAP after finishing some testing.
> 
> Ok, testing showed that the baseline (your for-next tree from yesterday)
> already doesn't work for tcm_loop and probably any generated nodeacl case,
> and gets a:
> 
> [   12.830576] kernel BUG at ../drivers/target/target_core_device.c:337!
> 

How did you hit this..?

I'm not triggering this with normal tcm_loop LUN creation, nor generated
node_acls for iscsi-target.

This particular BUG_ON() should only be triggered when the generated ->
explicit conversion happens, when the generated LUN does not match the
explicit one created in configfs.

In practice, this should fail with -EINVAL instead and not trigger a
BUG_ON().

> I've also looked over your patch and found at least two issues with it:
> 
>  - given that core_dev_unexport clears ->lun_se_dev all the callers
>    in the stats code still need to check for it being zero
>  - the 64-bit stats still need a lock protecting them, or made atomics.
>    The same issue already applies with the base RCU patches for the counters
>    in the se_dev_entry, btw.
> 

Fixing this up.

> Anyway, below is my patch, which I think will be very useful as it
> closes all kinds of races by merging the structures.  Applying rcu
> lookups for ->lun_se_dev and removign the busy loop for the refcount
> would be a good next step on top of that.
> 

This is obviously another huge change, and as a single patch is going to
take a while to understand and review.

That said, I'll take it for now and put the ALL_TGT_PT=1 changes on top.

--nab


  reply	other threads:[~2015-05-19  6:05 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-12  9:25 [PATCH 00/12] target: TPG/NodeACL LUN table conversion " Nicholas A. Bellinger
2015-05-12  9:25 ` [PATCH 01/12] target: Convert se_node_acl->device_list[] " Nicholas A. Bellinger
2015-05-12 20:58   ` Andy Grover
2015-05-13  5:08     ` Nicholas A. Bellinger
2015-05-13  5:32       ` Christoph Hellwig
2015-05-13  5:41         ` Nicholas A. Bellinger
2015-05-13  5:46   ` Christoph Hellwig
2015-05-13  6:20     ` Nicholas A. Bellinger
2015-05-13  6:48       ` Christoph Hellwig
2015-05-13  6:35   ` Christoph Hellwig
2015-05-13  8:46     ` Nicholas A. Bellinger
2015-05-17 16:51       ` Christoph Hellwig
2015-05-18  7:17         ` Nicholas A. Bellinger
2015-05-18  7:41           ` Christoph Hellwig
2015-05-18  8:01             ` Christoph Hellwig
2015-05-19  6:05               ` Nicholas A. Bellinger [this message]
2015-05-19  6:22                 ` Christoph Hellwig
2015-05-21 17:03                   ` Christoph Hellwig
2015-05-21 18:10                     ` Nicholas A. Bellinger
2015-05-12  9:25 ` [PATCH 02/12] target: Convert REPORT_LUN + MODE_SENSE to RCU reader Nicholas A. Bellinger
2015-05-13  5:47   ` Christoph Hellwig
2015-05-13  8:10     ` Nicholas A. Bellinger
2015-05-12  9:25 ` [PATCH 03/12] target/configfs: Convert mappedlun + SCSI MIBs " Nicholas A. Bellinger
2015-05-12 20:58   ` Andy Grover
2015-05-13  5:09     ` Nicholas A. Bellinger
2015-05-13  5:49       ` Christoph Hellwig
2015-05-12  9:25 ` [PATCH 04/12] target: Convert UNIT_ATTENTION logic " Nicholas A. Bellinger
2015-05-12  9:25 ` [PATCH 05/12] target: Convert transport_lookup_*_lun " Nicholas A. Bellinger
2015-05-13  5:55   ` Christoph Hellwig
2015-05-13  7:42     ` Nicholas A. Bellinger
2015-05-12  9:25 ` [PATCH 06/12] target/pr: Convert se_dev_entry to kref for RCU Nicholas A. Bellinger
2015-05-13  5:59   ` Christoph Hellwig
2015-05-12  9:25 ` [PATCH 07/12] target/pr: Convert registration check to RCU pointer Nicholas A. Bellinger
2015-05-13  6:13   ` Christoph Hellwig
2015-05-12  9:25 ` [PATCH 08/12] target/pr: Change alloc_registration to avoid pr_reg_tg_pt_lun Nicholas A. Bellinger
2015-05-12  9:25 ` [PATCH 09/12] target: Convert se_portal_group->tpg_lun_list[] to RCU hlist Nicholas A. Bellinger
2015-05-13  6:24   ` Christoph Hellwig
2015-05-13  7:22     ` Juergen Gross
2015-05-13  7:53       ` Christoph Hellwig
2015-05-19  6:46   ` Christoph Hellwig
2015-05-12  9:25 ` [PATCH 10/12] target: Convert se_tpg->acl_node_lock to ->acl_node_mutex Nicholas A. Bellinger
2015-05-12  9:25 ` [PATCH 11/12] target: Convert core_tpg_deregister to use list splice Nicholas A. Bellinger
2015-05-12  9:25 ` [PATCH 12/12] target: Drop unused se_lun->lun_acl_list Nicholas A. Bellinger
2015-05-13  6:29 ` [PATCH 00/12] target: TPG/NodeACL LUN table conversion to RCU hlist Christoph Hellwig

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=1432015547.9093.76.camel@haakon3.risingtidesystems.com \
    --to=nab@linux-iscsi.org \
    --cc=hare@suse.de \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=nab@daterainc.com \
    --cc=sagig@mellanox.com \
    --cc=target-devel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®