diff options
author | Mike Christie <michaelc@cs.wisc.edu> | 2006-07-24 20:47:39 (GMT) |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-07-28 16:49:34 (GMT) |
commit | c8dc1e523b0f1e6dd71cdabd8c7d7587c6dc27f9 (patch) | |
tree | 466efa148c152f4330c92f02f81bc72e8f395114 /include/scsi | |
parent | 9aaa2b4621280b6de1ecfb6dd7cd5cbe59fd1264 (diff) | |
download | linux-fsl-qoriq-c8dc1e523b0f1e6dd71cdabd8c7d7587c6dc27f9.tar.xz |
[SCSI] iscsi bugfixes: reduce memory allocations
We currently try to allocate a max_recv_data_segment_length
which can be very large (default is 64K), and common uses
are up to 1MB. It is very very difficult to allocte this
much contiguous memory and it turns out we never even use it.
We really only need a couple of pages, so this patch has us
allocates just what we know what we need today.
Later if vendors start adding vendor specific data and
we need to handle large buffers we can do this, but for
the last 4 years we have not seen anyone do this or request
it.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'include/scsi')
-rw-r--r-- | include/scsi/libiscsi.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/scsi/libiscsi.h b/include/scsi/libiscsi.h index 3f69f7e..41904f6 100644 --- a/include/scsi/libiscsi.h +++ b/include/scsi/libiscsi.h @@ -135,6 +135,14 @@ struct iscsi_conn { int id; /* CID */ struct list_head item; /* maintains list of conns */ int c_stage; /* connection state */ + /* + * Preallocated buffer for pdus that have data but do not + * originate from scsi-ml. We never have two pdus using the + * buffer at the same time. It is only allocated to + * the default max recv size because the pdus we support + * should always fit in this buffer + */ + char *data; struct iscsi_mgmt_task *login_mtask; /* mtask used for login/text */ struct iscsi_mgmt_task *mtask; /* xmit mtask in progress */ struct iscsi_cmd_task *ctask; /* xmit ctask in progress */ |