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

2017-05-01 Thread Nicholas A. Bellinger
On Mon, 2017-05-01 at 13:40 -0500, Mike Christie wrote: > On 04/30/2017 06:29 AM, Xiubo Li wrote: > > [...] > >> To avoid starvation, I think you want a second list/fifo that holds the > >> watiers. In tcmu_get_empty_block if the list is not empty, record how > >> many pages we needed and then

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

2017-05-01 Thread Mike Christie
On 04/30/2017 06:29 AM, Xiubo Li wrote: > [...] >>> +static struct page *tcmu_try_get_block_page(struct tcmu_dev *udev, >>> uint32_t dbi) >>> +{ >>> +struct page *page; >>> +int ret; >>> + >>> +mutex_lock(>cmdr_lock); >>> +page = tcmu_get_block_page(udev, dbi); >>> +if

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

2017-04-30 Thread Xiubo Li
[...] + +static bool tcmu_get_empty_blocks(struct tcmu_dev *udev, + struct tcmu_cmd *tcmu_cmd, + uint32_t blocks_needed) Can drop blocks_needed. Will fix it. [...] -static void *tcmu_get_block_addr(struct tcmu_dev *udev,

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

2017-04-30 Thread Mike Christie
On 04/26/2017 01:25 AM, lixi...@cmss.chinamobile.com wrote: > 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,

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

2017-04-26 Thread kbuild test robot
Hi Xiubo, [auto build test WARNING on next-20170424] [also build test WARNING on v4.11-rc8] [cannot apply to v4.9-rc8 v4.9-rc7 v4.9-rc6] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

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

2017-04-26 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