On 2024-12-04 08:42:23 [-0300], Wander Lairson Costa wrote:
This is the second attempt at fixing the behavior of igb_msix_other()
for PREEMPT_RT. The previous attempt [1] was reverted [2] following
concerns raised by Sebastian [3].
The initial approach proposed converting vfs_lock to a raw_spinlock,
a minor change intended to make it safe. However, it became evident
that igb_rcv_msg_from_vf() invokes kcalloc with GFP_ATOMIC,
which is unsafe in interrupt context on PREEMPT_RT systems.
To address this, the solution involves splitting igb_msg_task()
into two parts:
* One part invoked from the IRQ context.
* Another part called from the threaded interrupt handler.
To accommodate this, vfs_lock has been restructured into a double
lock: a spinlock_t and a raw_spinlock_t. In the revised design:
* igb_disable_sriov() locks both spinlocks.
* Each part of igb_msg_task() locks the appropriate spinlock for
its execution context.
- Is this limited to PREEMPT_RT or does it also occur on PREEMPT systems
with threadirqs? And if this is PREEMPT_RT only, why?
- What causes the failure? I see you reworked into two parts to behave
similar to what happens without threaded interrupts. There is still no
explanation for it. Is there a timing limit or was there another
register operation which removed the mailbox message?
Cheers,
Wander
Sebastian