Re: [PATCH 2/2] blk-mq: simplify queue mapping & schedule with each possisble CPU

2018-01-26 Thread Ming Lei
Hi Jianchao, On Fri, Jan 19, 2018 at 11:05:35AM +0800, jianchao.wang wrote: > Hi ming > > Sorry for delayed report this. > > On 01/17/2018 05:57 PM, Ming Lei wrote: > > 2) hctx->next_cpu can become offline from online before > > __blk_mq_run_hw_queue > > is run, there isn't warning, but once th

Re: [PATCH 2/2] blk-mq: simplify queue mapping & schedule with each possisble CPU

2018-01-18 Thread jianchao.wang
Hi ming Sorry for delayed report this. On 01/17/2018 05:57 PM, Ming Lei wrote: > 2) hctx->next_cpu can become offline from online before __blk_mq_run_hw_queue > is run, there isn't warning, but once the IO is submitted to hardware, > after it is completed, how does the HBA/hw queue notify CPU sin

Re: [PATCH 2/2] blk-mq: simplify queue mapping & schedule with each possisble CPU

2018-01-17 Thread Ming Lei
On Wed, Jan 17, 2018 at 11:07:48AM +0100, Christian Borntraeger wrote: > > > On 01/17/2018 10:57 AM, Ming Lei wrote: > > Hi Jianchao, > > > > On Wed, Jan 17, 2018 at 04:09:11PM +0800, jianchao.wang wrote: > >> Hi ming > >> > >> Thanks for your kindly response. > >> > >> On 01/17/2018 02:22 PM,

Re: [PATCH 2/2] blk-mq: simplify queue mapping & schedule with each possisble CPU

2018-01-17 Thread Christian Borntraeger
On 01/17/2018 11:07 AM, Christian Borntraeger wrote: > > > On 01/17/2018 10:57 AM, Ming Lei wrote: >> Hi Jianchao, >> >> On Wed, Jan 17, 2018 at 04:09:11PM +0800, jianchao.wang wrote: >>> Hi ming >>> >>> Thanks for your kindly response. >>> >>> On 01/17/2018 02:22 PM, Ming Lei wrote: This

Re: [PATCH 2/2] blk-mq: simplify queue mapping & schedule with each possisble CPU

2018-01-17 Thread Christian Borntraeger
On 01/17/2018 10:57 AM, Ming Lei wrote: > Hi Jianchao, > > On Wed, Jan 17, 2018 at 04:09:11PM +0800, jianchao.wang wrote: >> Hi ming >> >> Thanks for your kindly response. >> >> On 01/17/2018 02:22 PM, Ming Lei wrote: >>> This warning can't be removed completely, for example, the CPU figured >>

Re: [PATCH 2/2] blk-mq: simplify queue mapping & schedule with each possisble CPU

2018-01-17 Thread Ming Lei
Hi Jianchao, On Wed, Jan 17, 2018 at 04:09:11PM +0800, jianchao.wang wrote: > Hi ming > > Thanks for your kindly response. > > On 01/17/2018 02:22 PM, Ming Lei wrote: > > This warning can't be removed completely, for example, the CPU figured > > in blk_mq_hctx_next_cpu(hctx) can be put on again

Re: [PATCH 2/2] blk-mq: simplify queue mapping & schedule with each possisble CPU

2018-01-17 Thread jianchao.wang
Hi ming Thanks for your kindly response. On 01/17/2018 02:22 PM, Ming Lei wrote: > This warning can't be removed completely, for example, the CPU figured > in blk_mq_hctx_next_cpu(hctx) can be put on again just after the > following call returns and before __blk_mq_run_hw_queue() is scheduled >

Re: [PATCH 2/2] blk-mq: simplify queue mapping & schedule with each possisble CPU

2018-01-16 Thread Ming Lei
Hi Jianchao, On Wed, Jan 17, 2018 at 01:24:23PM +0800, jianchao.wang wrote: > Hi ming > > Thanks for your kindly response. > > On 01/17/2018 11:52 AM, Ming Lei wrote: > >> It is here. > >> __blk_mq_run_hw_queue() > >> > >> WARN_ON(!cpumask_test_cpu(raw_smp_processor_id(), hctx->cpumask)

Re: [PATCH 2/2] blk-mq: simplify queue mapping & schedule with each possisble CPU

2018-01-16 Thread jianchao.wang
Hi ming Thanks for your kindly response. On 01/17/2018 11:52 AM, Ming Lei wrote: >> It is here. >> __blk_mq_run_hw_queue() >> >> WARN_ON(!cpumask_test_cpu(raw_smp_processor_id(), hctx->cpumask) && >> cpu_online(hctx->next_cpu)); > I think this warning is triggered after the CPU o

Re: [PATCH 2/2] blk-mq: simplify queue mapping & schedule with each possisble CPU

2018-01-16 Thread Ming Lei
Hi Jianchao, On Wed, Jan 17, 2018 at 10:56:13AM +0800, jianchao.wang wrote: > Hi ming > > Thanks for your patch and kindly response. You are welcome! > > On 01/16/2018 11:32 PM, Ming Lei wrote: > > OK, I got it, and it should have been the only corner case in which > > all CPUs mapped to this

Re: [PATCH 2/2] blk-mq: simplify queue mapping & schedule with each possisble CPU

2018-01-16 Thread jianchao.wang
Hi ming Thanks for your patch and kindly response. On 01/16/2018 11:32 PM, Ming Lei wrote: > OK, I got it, and it should have been the only corner case in which > all CPUs mapped to this hctx become offline, and I believe the following > patch should address this case, could you give a test? > >

Re: [PATCH 2/2] blk-mq: simplify queue mapping & schedule with each possisble CPU

2018-01-16 Thread Ming Lei
On Tue, Jan 16, 2018 at 10:31:42PM +0800, jianchao.wang wrote: > Hi minglei > > On 01/16/2018 08:10 PM, Ming Lei wrote: > >>> - next_cpu = cpumask_next(hctx->next_cpu, hctx->cpumask); > >>> + next_cpu = cpumask_next_and(hctx->next_cpu, hctx->cpumask, > >>> +

Re: [PATCH 2/2] blk-mq: simplify queue mapping & schedule with each possisble CPU

2018-01-16 Thread jianchao.wang
Hi minglei On 01/16/2018 08:10 PM, Ming Lei wrote: >>> - next_cpu = cpumask_next(hctx->next_cpu, hctx->cpumask); >>> + next_cpu = cpumask_next_and(hctx->next_cpu, hctx->cpumask, >>> + cpu_online_mask); >>> if (next_cpu >= nr_cpu_ids) >>> -

Re: [PATCH 2/2] blk-mq: simplify queue mapping & schedule with each possisble CPU

2018-01-16 Thread Ming Lei
Hi Jianchao, On Tue, Jan 16, 2018 at 06:12:09PM +0800, jianchao.wang wrote: > Hi Ming > > On 01/12/2018 10:53 AM, Ming Lei wrote: > > From: Christoph Hellwig > > > > The previous patch assigns interrupt vectors to all possible CPUs, so > > now hctx can be mapped to possible CPUs, this patch app

Re: [PATCH 2/2] blk-mq: simplify queue mapping & schedule with each possisble CPU

2018-01-16 Thread jianchao.wang
Hi Ming On 01/12/2018 10:53 AM, Ming Lei wrote: > From: Christoph Hellwig > > The previous patch assigns interrupt vectors to all possible CPUs, so > now hctx can be mapped to possible CPUs, this patch applies this fact > to simplify queue mapping & schedule so that we don't need to handle > CPU

Re: [PATCH 2/2] blk-mq: simplify queue mapping & schedule with each possisble CPU

2018-01-16 Thread Stefan Haberland
Ming or Christoph, would you mind to send this patch to stable #4.12? Or is the fixes tag enough to get this fixed in all related releases? Regards, Stefan

[PATCH 2/2] blk-mq: simplify queue mapping & schedule with each possisble CPU

2018-01-11 Thread Ming Lei
From: Christoph Hellwig The previous patch assigns interrupt vectors to all possible CPUs, so now hctx can be mapped to possible CPUs, this patch applies this fact to simplify queue mapping & schedule so that we don't need to handle CPU hotplug for dealing with physical CPU plug & unplug. With th