linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Andy Grover <agrover@redhat.com>
Cc: target-devel@vger.kernel.org, linux-scsi@vger.kernel.org,
	hch@lst.de, nab@linux-iscsi.org
Subject: Re: [PATCHv2 RESENDv2 3/9] target: Allocate se_dev_entrys in device list only when used
Date: Tue, 24 Jun 2014 16:48:05 +0200	[thread overview]
Message-ID: <20140624144805.GA18450@lst.de> (raw)
In-Reply-To: <1403567738-13310-4-git-send-email-agrover@redhat.com>

> +	/*
> +	 * Wait for any in process SPEC_I_PT=1 or REGISTER_AND_MOVE
> +	 * PR operation to complete.
> +	 */
> +	while (atomic_read(&deve->pr_ref_count) != 0)
> +		cpu_relax();

A busy loop under an irq disabling spinlock is fairly nasty.  Can we just
remove the pointer to the entry from the device list array, then unlock
and then have the busy loop?

>  enum transport_lunflags_table {
>  	TRANSPORT_LUNFLAGS_NO_ACCESS		= 0x00,
> -	TRANSPORT_LUNFLAGS_INITIATOR_ACCESS	= 0x01,
> -	TRANSPORT_LUNFLAGS_READ_ONLY		= 0x02,
> -	TRANSPORT_LUNFLAGS_READ_WRITE		= 0x04,
> +	TRANSPORT_LUNFLAGS_READ_ONLY		= 0x01,
> +	TRANSPORT_LUNFLAGS_READ_WRITE		= 0x02,

Not something for this patch, but having the read only and read/write
flags is silly.  Having one of them should be enough, either a rdonly
or a writeable one would do it.

  reply	other threads:[~2014-06-24 14:48 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-23 23:55 [PATCHv2 RESENDv2 0/9] target: Save memory on unused se_dev_entrys and se_luns Andy Grover
2014-06-23 23:55 ` [PATCHv2 RESENDv2 1/9] target: Add locking to some accesses to nacl.device_list Andy Grover
2014-06-23 23:55 ` [PATCHv2 RESENDv2 2/9] target: Don't unlock/relock tpg_lun_lock in loop in add_node_to_devs Andy Grover
2014-06-24 12:24   ` Christoph Hellwig
2014-06-23 23:55 ` [PATCHv2 RESENDv2 3/9] target: Allocate se_dev_entrys in device list only when used Andy Grover
2014-06-24 14:48   ` Christoph Hellwig [this message]
2014-06-23 23:55 ` [PATCHv2 RESENDv2 4/9] target: core_tpg_post_dellun can return void Andy Grover
2014-06-24 12:25   ` Christoph Hellwig
2014-06-23 23:55 ` [PATCHv2 RESENDv2 5/9] target: Change core_dev_del_lun to take a se_lun instead of unpacked_lun Andy Grover
2014-06-24 12:26   ` Christoph Hellwig
2014-06-23 23:55 ` [PATCHv2 RESENDv2 6/9] target: Rename core_tpg_post_dellun to remove_lun Andy Grover
2014-06-24 12:27   ` Christoph Hellwig
2014-06-23 23:55 ` [PATCHv2 RESENDv2 7/9] target: Allocate se_luns only when used Andy Grover
2014-06-24 14:52   ` Christoph Hellwig
2014-06-23 23:55 ` [PATCHv2 RESENDv2 8/9] target: Remove core_tpg_release_virtual_lun0 function Andy Grover
2014-06-24 12:27   ` Christoph Hellwig
2014-06-23 23:55 ` [PATCHv2 RESENDv2 9/9] target: Refactor core_enable_device_list_for_node Andy Grover

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=20140624144805.GA18450@lst.de \
    --to=hch@lst.de \
    --cc=agrover@redhat.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=nab@linux-iscsi.org \
    --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;
as well as URLs for NNTP newsgroup(s).