[PATCH] tcmu: Add fifo type waiter list support to avoid starvation

2017-05-04 Thread lixiubo
From: Xiubo Li The fifo type waiter list will hold the udevs who are waiting for the blocks from the data global pool. The unmap thread will try to feed the first udevs in waiter list, if the global free blocks available are not enough, it will stop traversing the list and abort waking up the oth

答复: [PATCH v6 0/2] tcmu: Dynamic growing data area support

2017-05-02 Thread lixiubo
> > Xiubo Li (2): > > tcmu: Add dynamic growing data area feature support > > tcmu: Add global data block pool support > > > > drivers/target/target_core_user.c | 598 > > ++ > > 1 file changed, 469 insertions(+), 129 deletions(-) > > > > So based upon the

[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

[PATCH v7 1/2] tcmu: Add dynamic growing data area feature support

2017-05-01 Thread lixiubo
From: Xiubo Li Currently for the TCMU, the ring buffer size is fixed to 64K cmd area + 1M data area, and this will be bottlenecks for high iops. The struct tcmu_cmd_entry {} size is fixed about 112 bytes with iovec[N] & N <= 4, and the size of struct iovec is about 16 bytes. If N == 0, the rati

[PATCH v7 2/2] tcmu: Add global data block pool support

2017-05-01 Thread lixiubo
From: Xiubo Li For each target there will be one ring, when the target number grows larger and larger, it could eventually runs out of the system memories. In this patch for each target ring, currently for the cmd area the size will be fixed to 8MB and for the data area the size will grow from 0

[PATCH v7 0/2] tcmu: Dynamic growing data area support

2017-05-01 Thread lixiubo
From: Xiubo Li Changed for V7: - #1 fix two issues. - #2 fix kbuild warning and some issues. Changed for V6: - Remove the tcmu_vma_close(). Since the unmap thread will do the same for it - The unmap thread will skip the busy devices. - Using and testing the V5 version 3 weeks and the V6 for abo

[PATCH v6 1/2] tcmu: Add dynamic growing data area feature support

2017-04-25 Thread lixiubo
From: Xiubo Li Currently for the TCMU, the ring buffer size is fixed to 64K cmd area + 1M data area, and this will be bottlenecks for high iops. The struct tcmu_cmd_entry {} size is fixed about 112 bytes with iovec[N] & N <= 4, and the size of struct iovec is about 16 bytes. If N == 0, the rati

[PATCH v6 2/2] tcmu: Add global data block pool support

2017-04-25 Thread lixiubo
From: Xiubo Li For each target there will be one ring, when the target number grows larger and larger, it could eventually runs out of the system memories. In this patch for each target ring, currently for the cmd area the size will be fixed to 8MB and for the data area the size will grow from 0

[PATCH v6 0/2] tcmu: Dynamic growing data area support

2017-04-25 Thread lixiubo
From: Xiubo Li Changed for V6: - Remove the tcmu_vma_close(). Since the unmap thread will do the same for it - The unmap thread will skip the busy devices. - Using and testing the V5 version 3 weeks and the V6 for about 1 week, all in a higher IOPS environment: * using fio and dd commands *

[PATCH] bcache: Keep the labels the same in cache dev and cache set.

2017-04-06 Thread lixiubo
From: Xiubo Li Since the unusual characters from sysfs attributes have been stript for dc superblock label, so should here. Signed-off-by: Xiubo Li --- drivers/md/bcache/sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/md/bcache/sysfs.c b/drivers/md/bcache/sy

[PATCH v5 1/2] tcmu: Add dynamic growing data area feature support

2017-04-04 Thread lixiubo
From: Xiubo Li Currently for the TCMU, the ring buffer size is fixed to 64K cmd area + 1M data area, and this will be bottlenecks for high iops. The struct tcmu_cmd_entry {} size is fixed about 112 bytes with iovec[N] & N <= 4, and the size of struct iovec is about 16 bytes. If N == 0, the rati

[PATCH v5 2/2] tcmu: Add global data block pool support

2017-04-04 Thread lixiubo
From: Xiubo Li For each target there will be one ring, when the target number grows larger and larger, it could eventually runs out of the system memories. In this patch for each target ring, currently for the cmd area the size will be fixed to 8MB and for the data area the size will grow from 0

[PATCH v5 0/2] tcmu: Dynamic growing data area support

2017-04-04 Thread lixiubo
From: Xiubo Li Changed for V5: - Rebase to the newest target-pending repository. - Add as many comments as possbile to make the patch more readable. - Move tcmu_handle_completions() in timeout handler to unmap thread and then replace the spin lock with mutex lock(because the unmap_* or zap_*

[PATCH] tcmu: Skip Data-Out blocks before gathering Data-In buffer for BIDI case

2017-03-30 Thread lixiubo
From: Xiubo Li For the bidirectional case, the Data-Out buffer blocks will always at the head of the tcmu_cmd's bitmap, and before gathering the Data-In buffer, first of all it should skip the Data-Out ones, or the device supporting BIDI commands won't work. Fixed: 26418649eead ("target/user: In

[PATCH] target/user: Add daynmic growing data area feature support

2017-02-17 Thread lixiubo
From: Xiubo Li Currently for the TCMU, the ring buffer size is fixed to 64K cmd area + 1M data area, and this will be bottlenecks for high iops. The struct tcmu_cmd_entry {} size is fixed about 44 bytes without iovec[N], and the size of struct iovec[N] is about (16 * N) bytes. The sizeof(cmd en