From: Mike Christie <michaelc@cs.wisc.edu>
To: linux-scsi@vger.kernel.org
Subject: [PATCH 8/10] iscsi: fix 4k stack iscsi setups
Date: Thu, 12 Jan 2006 23:08:44 -0600 [thread overview]
Message-ID: <1137128924.9508.41.camel@max> (raw)
>From Mike Christie <michaelc@cs.wisc.edu>:
When we run the xmit code from queuecomand the stack usage
gets too high. The patch runs the xmit code from the scsi_host
work queue. This fixes 4k stack and xfs support and should
fix the st and sg stack usage bugs.
Signed-off-by: Alex Aizman <itn780@yahoo.com>
Signed-off-by: Dmitry Yusupov <dmitry_yus@yahoo.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
diff --git a/drivers/scsi/iscsi_if.c b/drivers/scsi/iscsi_if.c
index 5fb6457..615bf56 100644
--- a/drivers/scsi/iscsi_if.c
+++ b/drivers/scsi/iscsi_if.c
@@ -442,6 +442,7 @@ iscsi_if_create_session(struct iscsi_int
shost->max_lun = transport->max_lun;
shost->max_cmd_len = transport->max_cmd_len;
shost->transportt = &priv->t;
+ shost->transportt->create_work_queue = 1;
err = scsi_add_host(shost, NULL);
if (err)
diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c
index ccffd98..b17c121 100644
--- a/drivers/scsi/iscsi_tcp.c
+++ b/drivers/scsi/iscsi_tcp.c
@@ -525,7 +525,7 @@ iscsi_r2t_rsp(struct iscsi_conn *conn, s
__kfifo_put(ctask->r2tqueue, (void*)&r2t, sizeof(void*));
__kfifo_put(conn->writequeue, (void*)&ctask, sizeof(void*));
- schedule_work(&conn->xmitwork);
+ scsi_queue_work(session->host, &conn->xmitwork);
conn->r2t_pdus_cnt++;
spin_unlock(&session->lock);
@@ -1267,7 +1267,7 @@ iscsi_write_space(struct sock *sk)
conn->old_write_space(sk);
debug_tcp("iscsi_write_space: cid %d\n", conn->id);
clear_bit(SUSPEND_BIT, &conn->suspend_tx);
- schedule_work(&conn->xmitwork);
+ scsi_queue_work(conn->session->host, &conn->xmitwork);
}
static void
@@ -2275,7 +2275,7 @@ iscsi_xmitworker(void *data)
*/
mutex_lock(&conn->xmitmutex);
if (iscsi_data_xmit(conn))
- schedule_work(&conn->xmitwork);
+ scsi_queue_work(conn->session->host, &conn->xmitwork);
mutex_unlock(&conn->xmitmutex);
}
@@ -2340,15 +2340,7 @@ iscsi_queuecommand(struct scsi_cmnd *sc,
session->cmdsn, session->max_cmdsn - session->exp_cmdsn + 1);
spin_unlock(&session->lock);
- if (!in_interrupt() && mutex_trylock(&conn->xmitmutex)) {
- spin_unlock_irq(host->host_lock);
- if (iscsi_data_xmit(conn))
- schedule_work(&conn->xmitwork);
- mutex_unlock(&conn->xmitmutex);
- spin_lock_irq(host->host_lock);
- } else
- schedule_work(&conn->xmitwork);
-
+ scsi_queue_work(host, &conn->xmitwork);
return 0;
reject:
@@ -2932,8 +2924,7 @@ iscsi_conn_send_generic(struct iscsi_con
else
__kfifo_put(conn->mgmtqueue, (void*)&mtask, sizeof(void*));
- schedule_work(&conn->xmitwork);
-
+ scsi_queue_work(session->host, &conn->xmitwork);
return 0;
}
reply other threads:[~2006-01-13 5:09 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1137128924.9508.41.camel@max \
--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