Thread (61 messages) 61 messages, 8 authors, 2021-07-16

Re: Realtek 8139 problem on 486.

From: Arnd Bergmann <arnd@kernel.org>
Date: 2021-06-08 07:45:54

On Tue, Jun 8, 2021 at 1:07 AM Nikolai Zhubr [off-list ref] wrote:
02.06.2021 12:12, Arnd Bergmann:
[...]
quoted
I think the easiest workaround to address this reliably would be to move all
the irq processing into the poll function. This way the interrupt is completely
masked in the device until the poll handler finishes, and unmasking it
while there
are pending events would reliably trigger a new irq regardless of level or edge
mode. Something like the untested change at https://pastebin.com/MhBJDt6Z .
I don't know of other drivers that do it like this though, so I'm not
sure if this causes a different set of problems.
I started applying your patch (trying to morph it a little bit so as to
shove in a minimally invasive manner into 4.14) and then noticed that it
probably won't work as intended. If I'm not mistaken this rx poll thing
is only active within kind of "rx bursts", so it is not guaranteed to be
continually running all the time when there is no or little rx input.
I'd suppose some new additional work/thread would have to be introduced
in order for such approach to be reliably implemented.
The basic idea of the napi poll function is to do batch processing as much
as possible and avoid excessive interrupts when the system is already
busy processing the received data.

However, it should not lead to any missed interrupts with my patch:
at any point in time, you have either all hardware interrupts enabled,
or you are in napi polling mode and are guaranteed to call the poll
function within a relatively short timespan. If you have no pending
rx events, processing should be pretty much instantaneous, it just
gets pushed from the irq handler to immediately following the irq
handler. If there is a constant stream of incoming data, it gets
moved into softirqd context, which may be delayed when there is
another thread running.

        Arnd
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help