> -----Original Message-----
> From: Intel-wired-lan <[email protected]> On Behalf Of
> Wander Lairson Costa
> Sent: Wednesday, December 4, 2024 12:42 PM
> To: Nguyen, Anthony L <[email protected]>; Kitszel, Przemyslaw
> <[email protected]>; Andrew Lunn <[email protected]>;
> David S. Miller <[email protected]>; Eric Dumazet
> <[email protected]>; Jakub Kicinski <[email protected]>; Paolo Abeni
> <[email protected]>; Sebastian Andrzej Siewior <[email protected]>; Clark
> Williams <[email protected]>; Steven Rostedt <[email protected]>; Jeff
> Garzik <[email protected]>; Auke Kok <[email protected]>; moderated
> list:INTEL ETHERNET DRIVERS <[email protected]>; open
> list:NETWORKING DRIVERS <[email protected]>; open list <linux-
> [email protected]>; open list:Real-time Linux
> (PREEMPT_RT):Keyword:PREEMPT_RT <[email protected]>
> Cc: Wander Lairson Costa <[email protected]>; Clark Williams
> <[email protected]>
> Subject: [Intel-wired-lan] [PATCH iwl-net 2/4] igb: introduce raw vfs_lock to
> igb_adapter
> 
> This change adds a raw_spinlock for the vfs_lock to the igb_adapter structure,
> enabling its use in both interrupt and preemptible contexts. This is 
> essential for
> upcoming modifications to split igb_msg_task() into interrupt-safe and
> preemptible-safe parts.
> 
> The motivation for this change stems from the need to modify
> igb_msix_other() to run in interrupt context under PREEMPT_RT.
> Currently, igb_msg_task() contains a code path that invokes
> kcalloc() with the GFP_ATOMIC flag. However, on PREEMPT_RT, GFP_ATOMIC is
> not honored, making it unsafe to call allocation functions in interrupt 
> context. By
> introducing this raw spinlock, we can safely acquire the lock in both 
> contexts,
> paving the way for the necessary restructuring of igb_msg_task().
> 
> Signed-off-by: Wander Lairson Costa <[email protected]>
> Suggested-by: Clark Williams <[email protected]>
> ---
>  drivers/net/ethernet/intel/igb/igb.h      |  4 ++
>  drivers/net/ethernet/intel/igb/igb_main.c | 51 ++++++++++++++++++++---
>  2 files changed, 50 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/igb/igb.h
> b/drivers/net/ethernet/intel/igb/igb.h
> index 3c2dc7bdebb50..d50c22f09d0f8 100644
> --- a/drivers/net/ethernet/intel/igb/igb.h
> +++ b/drivers/net/ethernet/intel/igb/igb.h
> @@ -666,6 +666,10 @@ struct igb_adapter {


Tested-by: Rafal Romanowski <[email protected]>


Reply via email to