Re: [PATCH 8/8] blk-mq: support per-distpatch_queue flush machinery

2014-09-10 Thread Ming Lei
On Thu, Sep 11, 2014 at 3:02 AM, Christoph Hellwig wrote: > On Wed, Sep 10, 2014 at 09:40:11AM +0800, Ming Lei wrote: >> I am wondering we can do that because lifetime is totally different >> between flush requests and tag_set requests which are initialized >> before request queue is created. > >

Re: [PATCH 8/8] blk-mq: support per-distpatch_queue flush machinery

2014-09-10 Thread Christoph Hellwig
On Wed, Sep 10, 2014 at 09:40:11AM +0800, Ming Lei wrote: > I am wondering we can do that because lifetime is totally different > between flush requests and tag_set requests which are initialized > before request queue is created. We shouldn't do it in the tag sets, but where we allocate and free

Re: [PATCH 8/8] blk-mq: support per-distpatch_queue flush machinery

2014-09-09 Thread Ming Lei
On Wed, Sep 10, 2014 at 2:48 AM, Christoph Hellwig wrote: >> + if (hctx) { >> + int cmd_sz = q->tag_set->cmd_size; >> + int node = hctx->numa_node; >> + >> + fq = kzalloc_node(sizeof(*fq), GFP_KERNEL, node); >> + if (!fq) >> +

Re: [PATCH 8/8] blk-mq: support per-distpatch_queue flush machinery

2014-09-09 Thread Christoph Hellwig
> + if (hctx) { > + int cmd_sz = q->tag_set->cmd_size; > + int node = hctx->numa_node; > + > + fq = kzalloc_node(sizeof(*fq), GFP_KERNEL, node); > + if (!fq) > + goto failed; > + > + rq_sz = round_up(rq_sz + cmd_sz,

[PATCH 8/8] blk-mq: support per-distpatch_queue flush machinery

2014-09-09 Thread Ming Lei
This patch supports to run one single lush machinery for each blk-mq dispatch queue, so that: - current init_request and exit_request callbacks can cover flush request too, then the ugly and buggy way of initializing flush request's pdu can be fixed - flushing performance gets improved in case of