diff options
author | Mike Christie <michaelc@cs.wisc.edu> | 2006-05-18 21:31:36 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-05-20 10:35:20 -0400 |
commit | ffbfe92533810bf1bb76fd275400825ef8898ed9 (patch) | |
tree | dbb251eaf0196df7b69d8af76a03cba0e1d9ad18 /drivers/scsi/iscsi_tcp.h | |
parent | d36ab6f3212053b260214bc915687765e2fd1178 (diff) |
[SCSI] iscsi: kill dtask mempools
Discovered by steven@hayter.me.uk and patch by michaelc@cs.wisc.edu
The dtask mempool is reserving 261120 items per session! Since we are now
sending headers with sendmsg there is no reason for the mempool and that
was causing us to us carzy amounts of mem. We can preallicate a header in
the r2t and task struct and reuse them
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/iscsi_tcp.h')
-rw-r--r-- | drivers/scsi/iscsi_tcp.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/scsi/iscsi_tcp.h b/drivers/scsi/iscsi_tcp.h index c5918854d595..808302832e68 100644 --- a/drivers/scsi/iscsi_tcp.h +++ b/drivers/scsi/iscsi_tcp.h | |||
@@ -118,11 +118,9 @@ struct iscsi_buf { | |||
118 | struct iscsi_data_task { | 118 | struct iscsi_data_task { |
119 | struct iscsi_data hdr; /* PDU */ | 119 | struct iscsi_data hdr; /* PDU */ |
120 | char hdrext[sizeof(__u32)]; /* Header-Digest */ | 120 | char hdrext[sizeof(__u32)]; /* Header-Digest */ |
121 | struct list_head item; /* data queue item */ | ||
122 | struct iscsi_buf digestbuf; /* digest buffer */ | 121 | struct iscsi_buf digestbuf; /* digest buffer */ |
123 | uint32_t digest; /* data digest */ | 122 | uint32_t digest; /* data digest */ |
124 | }; | 123 | }; |
125 | #define ISCSI_DTASK_DEFAULT_MAX ISCSI_SG_TABLESIZE * PAGE_SIZE / 512 | ||
126 | 124 | ||
127 | struct iscsi_tcp_mgmt_task { | 125 | struct iscsi_tcp_mgmt_task { |
128 | struct iscsi_hdr hdr; | 126 | struct iscsi_hdr hdr; |
@@ -144,7 +142,7 @@ struct iscsi_r2t_info { | |||
144 | int data_count; /* DATA-Out payload progress */ | 142 | int data_count; /* DATA-Out payload progress */ |
145 | struct scatterlist *sg; /* per-R2T SG list */ | 143 | struct scatterlist *sg; /* per-R2T SG list */ |
146 | int solicit_datasn; | 144 | int solicit_datasn; |
147 | struct iscsi_data_task *dtask; /* which data task */ | 145 | struct iscsi_data_task dtask; /* which data task */ |
148 | }; | 146 | }; |
149 | 147 | ||
150 | struct iscsi_tcp_cmd_task { | 148 | struct iscsi_tcp_cmd_task { |
@@ -167,14 +165,13 @@ struct iscsi_tcp_cmd_task { | |||
167 | struct iscsi_queue r2tpool; | 165 | struct iscsi_queue r2tpool; |
168 | struct kfifo *r2tqueue; | 166 | struct kfifo *r2tqueue; |
169 | struct iscsi_r2t_info **r2ts; | 167 | struct iscsi_r2t_info **r2ts; |
170 | struct list_head dataqueue; /* Data-Out dataqueue */ | ||
171 | mempool_t *datapool; | ||
172 | uint32_t datadigest; /* for recover digest */ | 168 | uint32_t datadigest; /* for recover digest */ |
173 | int digest_count; | 169 | int digest_count; |
174 | uint32_t immdigest; /* for imm data */ | 170 | uint32_t immdigest; /* for imm data */ |
175 | struct iscsi_buf immbuf; /* for imm data digest */ | 171 | struct iscsi_buf immbuf; /* for imm data digest */ |
176 | struct iscsi_data_task *dtask; /* data task in progress*/ | 172 | struct iscsi_data_task *dtask; /* data task in progress*/ |
177 | int digest_offset; /* for partial buff digest */ | 173 | struct iscsi_data_task unsol_dtask; /* unsol data task */ |
174 | int digest_offset; /* for partial buff digest */ | ||
178 | }; | 175 | }; |
179 | 176 | ||
180 | #endif /* ISCSI_H */ | 177 | #endif /* ISCSI_H */ |