summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/cxgb3i/cxgb3i_offload.c
diff options
context:
space:
mode:
authorMike Christie2009-04-21 22:32:34 +0200
committerJames Bottomley2009-04-27 17:10:06 +0200
commit1393109f23f8ad753a60a3e461c6caa96d8524f3 (patch)
treebc9400d252da0470d0ae9fb210f9afbd5479764d /drivers/scsi/cxgb3i/cxgb3i_offload.c
parent[SCSI] cxgb3i: fix can_queue and cmd_per_lun initialization (diff)
downloadkernel-qcow2-linux-1393109f23f8ad753a60a3e461c6caa96d8524f3.tar.gz
kernel-qcow2-linux-1393109f23f8ad753a60a3e461c6caa96d8524f3.tar.xz
kernel-qcow2-linux-1393109f23f8ad753a60a3e461c6caa96d8524f3.zip
[SCSI] cxgb3i: fix cpu use abuse during writes
When doing a lot (128) of large writes (256K) we can hit the cxgb3_snd_win check pretty easily. The driver's xmit thread then takes 100% of the cpu. The driver should not be returning -EAGAIN for this problem. It should be returing -ENOBUFS, then when the window is opened again it should queue the xmit thread (it already wakes the xmit thread). Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/cxgb3i/cxgb3i_offload.c')
-rw-r--r--drivers/scsi/cxgb3i/cxgb3i_offload.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/scsi/cxgb3i/cxgb3i_offload.c b/drivers/scsi/cxgb3i/cxgb3i_offload.c
index 4d8654cdbdae..e11c9c180f39 100644
--- a/drivers/scsi/cxgb3i/cxgb3i_offload.c
+++ b/drivers/scsi/cxgb3i/cxgb3i_offload.c
@@ -1737,7 +1737,7 @@ int cxgb3i_c3cn_send_pdus(struct s3_conn *c3cn, struct sk_buff *skb)
c3cn_tx_debug("c3cn 0x%p, snd %u - %u > %u.\n",
c3cn, c3cn->write_seq, c3cn->snd_una,
cxgb3_snd_win);
- err = -EAGAIN;
+ err = -ENOBUFS;
goto out_err;
}
@@ -1775,6 +1775,8 @@ done:
out_err:
if (copied == 0 && err == -EPIPE)
copied = c3cn->err ? c3cn->err : -EPIPE;
+ else
+ copied = err;
goto done;
}