Re: [PATCH 2/2] IB/hfi1: Handle packets in the theaded handler only

From: Sebastian Andrzej Siewior
Date: Thu Oct 05 2017 - 12:27:44 EST

On 2017-10-03 12:49:20 [-0300], Arnaldo Carvalho de Melo wrote:
> From: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
> The hfi1 driver calls request_threaded_irq with two parameters:
> handler = receive_context_interrupt;
> thread = receive_context_thread;
> request_threaded_irq(me->msix.vector, handler, thread, 0, me->name, arg);
> And tries to process packets on the hard irq one, receive_context_interrupt(),
> only waking up the thread (returning IRQ_WAKE_THREAD) when some threshold is
> crossed in the number of packets available in the NIC, trying to balance
> latency and bandwidth.
> But in a CONFIG_PREEMPT_RT_FULL kernel it ends up calling spin locks from the
> hard irq handler (receive_context_interrupt) which causes BUGs like this:

If I am not mistaken current devel-tree of RT (and a few releases before
that) handle that case correctly and force-thread both threads.