From: Andy Grover <agrover@redhat.com>
To: Christoph Hellwig <hch@lst.de>
Cc: "Nicholas A. Bellinger" <nab@linux-iscsi.org>,
target-devel <target-devel@vger.kernel.org>,
linux-scsi <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH 1/2] target: Add transport_handle_cdb_direct optimization
Date: Thu, 16 Jun 2011 12:13:26 -0700 [thread overview]
Message-ID: <4DFA55D6.8090101@redhat.com> (raw)
In-Reply-To: <20110604140308.GB13359@lst.de>
On 06/04/2011 07:03 AM, Christoph Hellwig wrote:
>> + */
>> +int transport_handle_cdb_direct(
>> + struct se_cmd *cmd)
>> +{
>> + if (!cmd->se_lun) {
>> + dump_stack();
>> + printk(KERN_ERR "cmd->se_lun is NULL\n");
>> + return -EINVAL;
>> + }
>> + if (in_interrupt()) {
>> + dump_stack();
>> + printk(KERN_ERR "transport_generic_handle_cdb cannot be called"
>> + " from interrupt context\n");
>> + return -EINVAL;
>> + }
>> +
>> + return transport_generic_new_cmd(cmd);
>
> I can't really see any reason to add this helper. It just adds rather
> pointless debug checks for cases that already will blow up "properly" with
> the current code. Let's keep the callchain lean and just leave it out.
I agree. Also, I don't think there should be a handle_cdb_direct because
I think handle_cdb should call transport_generic_new_cmd, we don't need
a "direct" version. transport_generic_new_cmd should be safe (or made
safe) for calling from interrupt context. There's nothing in it that
demands it be executed in the backstore thread's context, and doing so
just incurs a two context switch latency penalty.
Regards -- Andy
next prev parent reply other threads:[~2011-06-16 19:13 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-04 6:01 [PATCH 0/2] target/iscsi: Convert to RX context task mapping+queueing Nicholas A. Bellinger
2011-06-04 6:01 ` [PATCH 1/2] target: Add transport_handle_cdb_direct optimization Nicholas A. Bellinger
2011-06-04 14:03 ` Christoph Hellwig
2011-06-16 19:13 ` Andy Grover [this message]
2011-06-16 19:22 ` Christoph Hellwig
2011-06-16 22:29 ` Andy Grover
2011-06-17 12:01 ` Christoph Hellwig
2011-06-17 14:41 ` Christoph Hellwig
2011-06-04 6:01 ` [PATCH 2/2] iscsi-target: Convert to cmdsn_mutex and transport_handle_cdb_direct usage Nicholas A. Bellinger
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=4DFA55D6.8090101@redhat.com \
--to=agrover@redhat.com \
--cc=hch@lst.de \
--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