public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Amir Vadai <amirv@mellanox.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Ben Hutchings <ben@decadent.org.uk>,
	"David S. Miller" <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Or Gerlitz <ogerlitz@mellanox.com>, <idos@mellanox.com>,
	Yevgeny Petrilin <yevgenyp@mellanox.com>
Subject: Re: Extend irq_set_affinity_notifier() to use a call chain
Date: Tue, 27 May 2014 11:15:06 +0300	[thread overview]
Message-ID: <5384498A.9080900@mellanox.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1405261412110.21720@ionos.tec.linutronix.de>

On 5/26/2014 3:39 PM, Thomas Gleixner wrote:

[...]

>
> The rmap _IS_ instantiated by the driver, and both the driver and the
> networking core know about it.
>
> So it's not completely different consumers. Just because it's a
> library does not mean it's disjunct from the code which uses it.
>
> Aside of the fact, that maintaining a per irq notifier chain is going
> to be ugly as hell due to life time and locking issues, it's just
> opening a can of worms. How do you make sure that the invocation order
> is correct? What are the dependency rules of the driver restarting the
> napi session versus updating the rmap?
>
> Even if you'd solve that and have a callback in the driver, then the
> callback never can restart the napi session directly. All it can do is
> set a flag which needs to be checked in the RX path, right?
>
> So what's the point of adding notifier call chain complexity, ordering
> problems etc., if you can simply note the fact that the affinity
> changed in the rmap itself and check that in the RX path?

I will try to find a solution in the spirit of what you suggested - to 
let the rmap library notify napi about affinity changes - without adding 
this complexity to the code.

Thanks,
Amir

>
> Thanks,
>
> 	tglx


  reply	other threads:[~2014-05-27  8:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-25 12:15 Extend irq_set_affinity_notifier() to use a call chain Amir Vadai
2014-05-25 13:05 ` Amir Vadai
2014-05-26 11:15 ` Thomas Gleixner
2014-05-26 11:24   ` Amir Vadai
2014-05-26 11:34     ` Thomas Gleixner
2014-05-26 12:01       ` Amir Vadai
2014-05-26 12:39         ` Thomas Gleixner
2014-05-27  8:15           ` Amir Vadai [this message]
2014-05-27 10:10             ` Thomas Gleixner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5384498A.9080900@mellanox.com \
    --to=amirv@mellanox.com \
    --cc=ben@decadent.org.uk \
    --cc=davem@davemloft.net \
    --cc=idos@mellanox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=ogerlitz@mellanox.com \
    --cc=tglx@linutronix.de \
    --cc=yevgenyp@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox