netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] net: atlantic: use irq_update_affinity_hint()
@ 2024-11-07 12:07 Mohammad Heib
  2024-11-07 16:14 ` Jakub Kicinski
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Mohammad Heib @ 2024-11-07 12:07 UTC (permalink / raw)
  To: netdev, irusskikh; +Cc: Mohammad Heib

irq_set_affinity_hint() is deprecated, Use irq_update_affinity_hint()
instead. This removes the side-effect of actually applying the affinity.

The driver does not really need to worry about spreading its IRQs across
CPUs. The core code already takes care of that. when the driver applies the
affinities by itself, it breaks the users' expectations:

1. The user configures irqbalance with IRQBALANCE_BANNED_CPULIST in
   order to prevent IRQs from being moved to certain CPUs that run a
   real-time workload.

2. atlantic device reopening will resets the affinity
   in aq_ndev_open().

3. atlantic has no idea about irqbalance's config, so it may move an IRQ to
   a banned CPU. The real-time workload suffers unacceptable latency.

Signed-off-by: Mohammad Heib <mheib@redhat.com>
---
 drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c b/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c
index 43c71f6b314f..08630ee94251 100644
--- a/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c
+++ b/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c
@@ -162,8 +162,8 @@ int aq_pci_func_alloc_irq(struct aq_nic_s *self, unsigned int i,
 		self->msix_entry_mask |= (1 << i);
 
 		if (pdev->msix_enabled && affinity_mask)
-			irq_set_affinity_hint(pci_irq_vector(pdev, i),
-					      affinity_mask);
+			irq_update_affinity_hint(pci_irq_vector(pdev, i),
+						 affinity_mask);
 	}
 
 	return err;
@@ -187,7 +187,7 @@ void aq_pci_func_free_irqs(struct aq_nic_s *self)
 			continue;
 
 		if (pdev->msix_enabled)
-			irq_set_affinity_hint(pci_irq_vector(pdev, i), NULL);
+			irq_update_affinity_hint(pci_irq_vector(pdev, i), NULL);
 		free_irq(pci_irq_vector(pdev, i), irq_data);
 		self->msix_entry_mask &= ~(1U << i);
 	}
-- 
2.34.3


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

* Re: [PATCH net] net: atlantic: use irq_update_affinity_hint()
  2024-11-07 12:07 [PATCH net] net: atlantic: use irq_update_affinity_hint() Mohammad Heib
@ 2024-11-07 16:14 ` Jakub Kicinski
  2024-11-10 13:31 ` Simon Horman
  2024-11-12  0:10 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Jakub Kicinski @ 2024-11-07 16:14 UTC (permalink / raw)
  To: Mohammad Heib; +Cc: netdev, irusskikh

On Thu,  7 Nov 2024 14:07:39 +0200 Mohammad Heib wrote:
> Subject: [PATCH net] net: atlantic: use irq_update_affinity_hint()

Hi Mohammad, I see you're sending more off these. For future postings
please make sure you use net-next as subject tag (instead of just net).
We use net as a tag for fixes, and this is not a fix AFAIU.
No need to repost the 3 patches you already posted just for this.

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

* Re: [PATCH net] net: atlantic: use irq_update_affinity_hint()
  2024-11-07 12:07 [PATCH net] net: atlantic: use irq_update_affinity_hint() Mohammad Heib
  2024-11-07 16:14 ` Jakub Kicinski
@ 2024-11-10 13:31 ` Simon Horman
  2024-11-12  0:10 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2024-11-10 13:31 UTC (permalink / raw)
  To: Mohammad Heib; +Cc: netdev, irusskikh

On Thu, Nov 07, 2024 at 02:07:39PM +0200, Mohammad Heib wrote:
> irq_set_affinity_hint() is deprecated, Use irq_update_affinity_hint()
> instead. This removes the side-effect of actually applying the affinity.
> 
> The driver does not really need to worry about spreading its IRQs across
> CPUs. The core code already takes care of that. when the driver applies the
> affinities by itself, it breaks the users' expectations:
> 
> 1. The user configures irqbalance with IRQBALANCE_BANNED_CPULIST in
>    order to prevent IRQs from being moved to certain CPUs that run a
>    real-time workload.
> 
> 2. atlantic device reopening will resets the affinity
>    in aq_ndev_open().
> 
> 3. atlantic has no idea about irqbalance's config, so it may move an IRQ to
>    a banned CPU. The real-time workload suffers unacceptable latency.
> 
> Signed-off-by: Mohammad Heib <mheib@redhat.com>

Reviewed-by: Simon Horman <horms@kernel.org>


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

* Re: [PATCH net] net: atlantic: use irq_update_affinity_hint()
  2024-11-07 12:07 [PATCH net] net: atlantic: use irq_update_affinity_hint() Mohammad Heib
  2024-11-07 16:14 ` Jakub Kicinski
  2024-11-10 13:31 ` Simon Horman
@ 2024-11-12  0:10 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-11-12  0:10 UTC (permalink / raw)
  To: Mohammad Heib; +Cc: netdev, irusskikh

Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Thu,  7 Nov 2024 14:07:39 +0200 you wrote:
> irq_set_affinity_hint() is deprecated, Use irq_update_affinity_hint()
> instead. This removes the side-effect of actually applying the affinity.
> 
> The driver does not really need to worry about spreading its IRQs across
> CPUs. The core code already takes care of that. when the driver applies the
> affinities by itself, it breaks the users' expectations:
> 
> [...]

Here is the summary with links:
  - [net] net: atlantic: use irq_update_affinity_hint()
    https://git.kernel.org/netdev/net-next/c/2cd78740effc

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2024-11-12  0:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-07 12:07 [PATCH net] net: atlantic: use irq_update_affinity_hint() Mohammad Heib
2024-11-07 16:14 ` Jakub Kicinski
2024-11-10 13:31 ` Simon Horman
2024-11-12  0:10 ` patchwork-bot+netdevbpf

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).