From ffbfe92533810bf1bb76fd275400825ef8898ed9 Mon Sep 17 00:00:00 2001 From: Mike Christie Date: Thu, 18 May 2006 20:31:36 -0500 Subject: [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 Signed-off-by: James Bottomley --- drivers/scsi/iscsi_tcp.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'drivers/scsi/iscsi_tcp.h') diff --git a/drivers/scsi/iscsi_tcp.h b/drivers/scsi/iscsi_tcp.h index c5918854d59..808302832e6 100644 --- a/drivers/scsi/iscsi_tcp.h +++ b/drivers/scsi/iscsi_tcp.h @@ -118,11 +118,9 @@ struct iscsi_buf { struct iscsi_data_task { struct iscsi_data hdr; /* PDU */ char hdrext[sizeof(__u32)]; /* Header-Digest */ - struct list_head item; /* data queue item */ struct iscsi_buf digestbuf; /* digest buffer */ uint32_t digest; /* data digest */ }; -#define ISCSI_DTASK_DEFAULT_MAX ISCSI_SG_TABLESIZE * PAGE_SIZE / 512 struct iscsi_tcp_mgmt_task { struct iscsi_hdr hdr; @@ -144,7 +142,7 @@ struct iscsi_r2t_info { int data_count; /* DATA-Out payload progress */ struct scatterlist *sg; /* per-R2T SG list */ int solicit_datasn; - struct iscsi_data_task *dtask; /* which data task */ + struct iscsi_data_task dtask; /* which data task */ }; struct iscsi_tcp_cmd_task { @@ -167,14 +165,13 @@ struct iscsi_tcp_cmd_task { struct iscsi_queue r2tpool; struct kfifo *r2tqueue; struct iscsi_r2t_info **r2ts; - struct list_head dataqueue; /* Data-Out dataqueue */ - mempool_t *datapool; uint32_t datadigest; /* for recover digest */ int digest_count; uint32_t immdigest; /* for imm data */ struct iscsi_buf immbuf; /* for imm data digest */ - struct iscsi_data_task *dtask; /* data task in progress*/ - int digest_offset; /* for partial buff digest */ + struct iscsi_data_task *dtask; /* data task in progress*/ + struct iscsi_data_task unsol_dtask; /* unsol data task */ + int digest_offset; /* for partial buff digest */ }; #endif /* ISCSI_H */ -- cgit v1.2.3-70-g09d2