Re: [PATCH 1/3] blk-mq: use list_splice_tail() to insert requests

2018-06-28 Thread Jens Axboe
On 6/28/18 1:52 PM, Steven Rostedt wrote: > On Thu, 28 Jun 2018 09:27:08 +0200 > Johannes Thumshirn wrote: > >> Hi Ming, >> >> On Thu, Jun 28, 2018 at 11:19:16AM +0800, Ming Lei wrote: >>> + list_for_each_entry(rq, list, queuelist) { >>> BUG_ON(rq->mq_ctx != ctx); >>> -

Re: [PATCH 1/3] blk-mq: use list_splice_tail() to insert requests

2018-06-28 Thread Steven Rostedt
On Thu, 28 Jun 2018 09:27:08 +0200 Johannes Thumshirn wrote: > Hi Ming, > > On Thu, Jun 28, 2018 at 11:19:16AM +0800, Ming Lei wrote: > > + list_for_each_entry(rq, list, queuelist) { > > BUG_ON(rq->mq_ctx != ctx); > > - list_del_init(>queuelist); > > -

Re: [PATCH 1/3] blk-mq: use list_splice_tail() to insert requests

2018-06-28 Thread Jens Axboe
On 6/28/18 1:27 AM, Johannes Thumshirn wrote: > Hi Ming, > > On Thu, Jun 28, 2018 at 11:19:16AM +0800, Ming Lei wrote: >> +list_for_each_entry(rq, list, queuelist) { >> BUG_ON(rq->mq_ctx != ctx); >> -list_del_init(>queuelist); >> -

Re: [PATCH 1/3] blk-mq: use list_splice_tail() to insert requests

2018-06-28 Thread Johannes Thumshirn
Hi Ming, On Thu, Jun 28, 2018 at 11:19:16AM +0800, Ming Lei wrote: > + list_for_each_entry(rq, list, queuelist) { > BUG_ON(rq->mq_ctx != ctx); > - list_del_init(>queuelist); > - __blk_mq_insert_req_list(hctx, rq, false); > +

[PATCH 1/3] blk-mq: use list_splice_tail() to insert requests

2018-06-27 Thread Ming Lei
list_splice_tail() is much more faster than inserting each request one by one, given all requets in 'list' belong to same sw queue and ctx->lock is required to insert requests. Cc: Kashyap Desai Cc: Laurence Oberman Cc: Omar Sandoval Cc: Christoph Hellwig Cc: Bart Van Assche Reported-by: