Re: [PATCH] tcmu: Recalculate the tcmu_cmd size to save cmd area memories

2017-05-02 Thread Nicholas A. Bellinger
On Tue, 2017-05-02 at 21:06 -0500, Mike Christie wrote: > On 05/02/2017 02:54 AM, lixi...@cmss.chinamobile.com wrote: > > From: Xiubo Li > > > > For the "struct tcmu_cmd_entry" in cmd area, the minimum size > > will be sizeof(struct tcmu_cmd_entry) == 112 Bytes. And it could > > fill about (sizeo

Re: [PATCH] tcmu: Recalculate the tcmu_cmd size to save cmd area memories

2017-05-02 Thread Mike Christie
On 05/02/2017 02:54 AM, lixi...@cmss.chinamobile.com wrote: > From: Xiubo Li > > For the "struct tcmu_cmd_entry" in cmd area, the minimum size > will be sizeof(struct tcmu_cmd_entry) == 112 Bytes. And it could > fill about (sizeof(struct rsp) - sizeof(struct req)) / > sizeof(struct iovec) == 68 /

[PATCH] tcmu: Recalculate the tcmu_cmd size to save cmd area memories

2017-05-02 Thread lixiubo
From: Xiubo Li For the "struct tcmu_cmd_entry" in cmd area, the minimum size will be sizeof(struct tcmu_cmd_entry) == 112 Bytes. And it could fill about (sizeof(struct rsp) - sizeof(struct req)) / sizeof(struct iovec) == 68 / 16 ~= 4 data regions(iov[4]) by default. For most tcmu_cmds, the data