From: michaelc@cs.wisc.edu
To: linux-scsi@vger.kernel.org
Subject: [PATCH 3/6] libiscsi: remove unneeded queue work when max_cmdsn is increased
Date: Fri, 7 Feb 2014 00:41:39 -0600 [thread overview]
Message-ID: <1391755302-57206-4-git-send-email-michaelc@cs.wisc.edu> (raw)
In-Reply-To: <1391755302-57206-1-git-send-email-michaelc@cs.wisc.edu>
From: Mike Christie <michaelc@cs.wisc.edu>
iscsi_queuecommand will only take in commands that can fit in the
current window. So, if a command is on the cmdqueue then it can
fit in the current window. If a command is on the mgmtqueue, then
we are setting the immediate bit so they will also fit in the
window. As a result, we never need to to do a iscsi_conn_queue_work
when the maxCmdSn is increased.
What should happen is that a command will complete the window will
be increased, then the scsi layer will send us more commands by
running the scsi_device queues.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
---
drivers/scsi/libiscsi.c | 10 +---------
1 files changed, 1 insertions(+), 9 deletions(-)
diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c
index 6afb6fc..9ca42a2 100644
--- a/drivers/scsi/libiscsi.c
+++ b/drivers/scsi/libiscsi.c
@@ -110,16 +110,8 @@ static void __iscsi_update_cmdsn(struct iscsi_session *session,
session->exp_cmdsn = exp_cmdsn;
if (max_cmdsn != session->max_cmdsn &&
- !iscsi_sna_lt(max_cmdsn, session->max_cmdsn)) {
+ !iscsi_sna_lt(max_cmdsn, session->max_cmdsn))
session->max_cmdsn = max_cmdsn;
- /*
- * if the window closed with IO queued, then kick the
- * xmit thread
- */
- if (!list_empty(&session->leadconn->cmdqueue) ||
- !list_empty(&session->leadconn->mgmtqueue))
- iscsi_conn_queue_work(session->leadconn);
- }
}
void iscsi_update_cmdsn(struct iscsi_session *session, struct iscsi_nopin *hdr)
--
1.7.1
next prev parent reply other threads:[~2014-02-07 6:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-07 6:41 [PATCH 0/6]: iscsi changes for scsi-misc (v2) michaelc
2014-02-07 6:41 ` [PATCH 1/6] SCSI/libiscsi: Restructure iscsi_tcp r2t response logic michaelc
2014-02-07 6:41 ` [PATCH 2/6] SCSI/libiscsi: Reduce locking contention in fast path (v2) michaelc
2014-02-07 6:41 ` michaelc [this message]
2014-02-07 6:41 ` [PATCH 4/6] be2iscsi: fix lun test in device reset callout michaelc
2014-02-07 6:41 ` [PATCH 5/6] iscsi_boot_sysfs: Fix a memory leak in iscsi_boot_destroy_kset() michaelc
2014-02-07 6:41 ` [PATCH 6/6] iscsi_tcp: check for valid session before accessing michaelc
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=1391755302-57206-4-git-send-email-michaelc@cs.wisc.edu \
--to=michaelc@cs.wisc.edu \
--cc=linux-scsi@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).