Re: [dm-devel] [PATCH V3 03/13] block: add helper of blk_create_io_context

2021-03-25 Thread Keith Busch
On Wed, Mar 24, 2021 at 08:19:17PM +0800, Ming Lei wrote: > +static inline void blk_create_io_context(struct request_queue *q) > +{ > + /* > + * Various block parts want %current->io_context, so allocate it up > + * front rather than dealing with lots of pain to allocate it only > +

Re: [dm-devel] [PATCH V3 03/13] block: add helper of blk_create_io_context

2021-03-24 Thread Ming Lei
On Wed, Mar 24, 2021 at 07:17:02PM +0100, Christoph Hellwig wrote: > On Wed, Mar 24, 2021 at 08:19:17PM +0800, Ming Lei wrote: > > Add one helper for creating io context and prepare for supporting > > efficient bio based io poll. > > Looking at what gets added later here I do not think this helper

Re: [dm-devel] [PATCH V3 03/13] block: add helper of blk_create_io_context

2021-03-24 Thread Christoph Hellwig
On Wed, Mar 24, 2021 at 08:19:17PM +0800, Ming Lei wrote: > Add one helper for creating io context and prepare for supporting > efficient bio based io poll. Looking at what gets added later here I do not think this helper is a good idea. Having a separate one for creating any needed poll-only con

Re: [dm-devel] [PATCH V3 03/13] block: add helper of blk_create_io_context

2021-03-24 Thread Hannes Reinecke
On 3/24/21 1:19 PM, Ming Lei wrote: Add one helper for creating io context and prepare for supporting efficient bio based io poll. Meantime move the code of creating io_context before checking bio's REQ_HIPRI flag because the following patch may change to clear REQ_HIPRI if io_context can't be c

[dm-devel] [PATCH V3 03/13] block: add helper of blk_create_io_context

2021-03-24 Thread Ming Lei
Add one helper for creating io context and prepare for supporting efficient bio based io poll. Meantime move the code of creating io_context before checking bio's REQ_HIPRI flag because the following patch may change to clear REQ_HIPRI if io_context can't be created. Signed-off-by: Ming Lei ---