linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 4/5] genirq/affinity: allow driver's discontigous affinity set
       [not found] <cover.1561385989.git.zhangweiping@didiglobal.com>
@ 2019-06-24 14:29 ` Weiping Zhang
  2019-06-24 15:42   ` Thomas Gleixner
  0 siblings, 1 reply; 5+ messages in thread
From: Weiping Zhang @ 2019-06-24 14:29 UTC (permalink / raw)
  To: tglx, axboe, tj, hch, bvanassche, keith.busch, minwoo.im.dev
  Cc: linux-block, cgroups, linux-nvme, linux-kernel

The driver may implement multiple affinity set, and some of
are empty, for this case we just skip them.

Signed-off-by: Weiping Zhang <zhangweiping@didiglobal.com>
---
 kernel/irq/affinity.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/kernel/irq/affinity.c b/kernel/irq/affinity.c
index f18cd5aa33e8..6d964fe0fbd8 100644
--- a/kernel/irq/affinity.c
+++ b/kernel/irq/affinity.c
@@ -295,6 +295,10 @@ irq_create_affinity_masks(unsigned int nvecs, struct irq_affinity *affd)
 		unsigned int this_vecs = affd->set_size[i];
 		int ret;
 
+		/* skip empty affinity set */
+		if (this_vecs == 0)
+			continue;
+
 		ret = irq_build_affinity_masks(affd, curvec, this_vecs,
 					       curvec, masks);
 		if (ret) {
-- 
2.14.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v3 4/5] genirq/affinity: allow driver's discontigous affinity set
  2019-06-24 14:29 ` [PATCH v3 4/5] genirq/affinity: allow driver's discontigous affinity set Weiping Zhang
@ 2019-06-24 15:42   ` Thomas Gleixner
  2019-06-25  2:14     ` Ming Lei
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Gleixner @ 2019-06-24 15:42 UTC (permalink / raw)
  To: Weiping Zhang
  Cc: axboe, Tejun Heo, Christoph Hellwig, bvanassche, keith.busch,
	minwoo.im.dev, linux-block, cgroups, linux-nvme, LKML, Ming Lei

On Mon, 24 Jun 2019, Weiping Zhang wrote:

> The driver may implement multiple affinity set, and some of
> are empty, for this case we just skip them.

Why? What's the point of creating empty sets? Just because is not a real
good justification.

Leaving the patch for Ming.

Thanks,

	tglx

> Signed-off-by: Weiping Zhang <zhangweiping@didiglobal.com>
> ---
>  kernel/irq/affinity.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/kernel/irq/affinity.c b/kernel/irq/affinity.c
> index f18cd5aa33e8..6d964fe0fbd8 100644
> --- a/kernel/irq/affinity.c
> +++ b/kernel/irq/affinity.c
> @@ -295,6 +295,10 @@ irq_create_affinity_masks(unsigned int nvecs, struct irq_affinity *affd)
>  		unsigned int this_vecs = affd->set_size[i];
>  		int ret;
>  
> +		/* skip empty affinity set */
> +		if (this_vecs == 0)
> +			continue;
> +
>  		ret = irq_build_affinity_masks(affd, curvec, this_vecs,
>  					       curvec, masks);
>  		if (ret) {
> -- 
> 2.14.1
> 
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v3 4/5] genirq/affinity: allow driver's discontigous affinity set
  2019-06-24 15:42   ` Thomas Gleixner
@ 2019-06-25  2:14     ` Ming Lei
  2019-06-25  6:13       ` Thomas Gleixner
  0 siblings, 1 reply; 5+ messages in thread
From: Ming Lei @ 2019-06-25  2:14 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: Weiping Zhang, axboe, Tejun Heo, Christoph Hellwig, bvanassche,
	keith.busch, minwoo.im.dev, linux-block, cgroups, linux-nvme,
	LKML

Hi Thomas,

On Mon, Jun 24, 2019 at 05:42:39PM +0200, Thomas Gleixner wrote:
> On Mon, 24 Jun 2019, Weiping Zhang wrote:
> 
> > The driver may implement multiple affinity set, and some of
> > are empty, for this case we just skip them.
> 
> Why? What's the point of creating empty sets? Just because is not a real
> good justification.

Patch 5 will add 4 new sets for supporting NVMe's weighted round robin
arbitration. It can be a headache to manage so many irq sets(now the total
sets can become 6) dynamically since size of anyone in the new 4 sets can
be zero, so each particular set is assigned one static index for avoiding
the management trouble, then empty set will be seen by
irq_create_affinity_masks().

So looks skipping the empty set makes sense because the API will become
easier to use than before.

Thanks,
Ming

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v3 4/5] genirq/affinity: allow driver's discontigous affinity set
  2019-06-25  2:14     ` Ming Lei
@ 2019-06-25  6:13       ` Thomas Gleixner
  2019-06-25 14:55         ` Weiping Zhang
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Gleixner @ 2019-06-25  6:13 UTC (permalink / raw)
  To: Ming Lei
  Cc: Weiping Zhang, axboe, Tejun Heo, Christoph Hellwig, bvanassche,
	keith.busch, minwoo.im.dev, linux-block, cgroups, linux-nvme,
	LKML

MIng,

On Tue, 25 Jun 2019, Ming Lei wrote:
> On Mon, Jun 24, 2019 at 05:42:39PM +0200, Thomas Gleixner wrote:
> > On Mon, 24 Jun 2019, Weiping Zhang wrote:
> > 
> > > The driver may implement multiple affinity set, and some of
> > > are empty, for this case we just skip them.
> > 
> > Why? What's the point of creating empty sets? Just because is not a real
> > good justification.
> 
> Patch 5 will add 4 new sets for supporting NVMe's weighted round robin
> arbitration. It can be a headache to manage so many irq sets(now the total
> sets can become 6) dynamically since size of anyone in the new 4 sets can
> be zero, so each particular set is assigned one static index for avoiding
> the management trouble, then empty set will be seen by
> irq_create_affinity_masks().
> 
> So looks skipping the empty set makes sense because the API will become
> easier to use than before.

That makes sense, but at least some of that information wants to be in the
change log and not some uninformative description of what the patch does.

I was not Cc'ed on the rest of the patches so I had exactly zero context.

Thanks,

	tglx

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v3 4/5] genirq/affinity: allow driver's discontigous affinity set
  2019-06-25  6:13       ` Thomas Gleixner
@ 2019-06-25 14:55         ` Weiping Zhang
  0 siblings, 0 replies; 5+ messages in thread
From: Weiping Zhang @ 2019-06-25 14:55 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: Ming Lei, Weiping Zhang, Jens Axboe, Tejun Heo,
	Christoph Hellwig, Bart Van Assche, keith.busch, Minwoo Im,
	linux-block, cgroups, linux-nvme, LKML

Thomas Gleixner <tglx@linutronix.de> 于2019年6月25日周二 下午3:36写道:
>
> MIng,
>
> On Tue, 25 Jun 2019, Ming Lei wrote:
> > On Mon, Jun 24, 2019 at 05:42:39PM +0200, Thomas Gleixner wrote:
> > > On Mon, 24 Jun 2019, Weiping Zhang wrote:
> > >
> > > > The driver may implement multiple affinity set, and some of
> > > > are empty, for this case we just skip them.
> > >
> > > Why? What's the point of creating empty sets? Just because is not a real
> > > good justification.
> >
> > Patch 5 will add 4 new sets for supporting NVMe's weighted round robin
> > arbitration. It can be a headache to manage so many irq sets(now the total
> > sets can become 6) dynamically since size of anyone in the new 4 sets can
> > be zero, so each particular set is assigned one static index for avoiding
> > the management trouble, then empty set will be seen by
> > irq_create_affinity_masks().
> >
> > So looks skipping the empty set makes sense because the API will become
> > easier to use than before.
>
Hello Ming,
Thanks your detail explanation.

> That makes sense, but at least some of that information wants to be in the
> change log and not some uninformative description of what the patch does.
>
> I was not Cc'ed on the rest of the patches so I had exactly zero context.
>
Hello Thomas,

I am sorry I didn't cc you the full patchset, I will add more detail
description in
commit message at V4.

> Thanks,
>
>         tglx

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-06-25 14:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <cover.1561385989.git.zhangweiping@didiglobal.com>
2019-06-24 14:29 ` [PATCH v3 4/5] genirq/affinity: allow driver's discontigous affinity set Weiping Zhang
2019-06-24 15:42   ` Thomas Gleixner
2019-06-25  2:14     ` Ming Lei
2019-06-25  6:13       ` Thomas Gleixner
2019-06-25 14:55         ` Weiping Zhang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).