]> git.ipfire.org Git - thirdparty/grub.git/commit
net/drivers/ieee1275/ofnet: Remove 200 ms timeout in get_card_packet() to reduce...
authorMichael Chang <mchang@suse.com>
Mon, 6 May 2024 02:34:22 +0000 (10:34 +0800)
committerDaniel Kiper <daniel.kiper@oracle.com>
Thu, 20 Jun 2024 12:44:10 +0000 (14:44 +0200)
commitd35ff22516b161f6d472f7f5371a89597b072d04
treee97a0da771819bbb38f19309588bb360c4b6d6a2
parent86df79275d065d87f4de5c97e456973e8b4a649c
net/drivers/ieee1275/ofnet: Remove 200 ms timeout in get_card_packet() to reduce input latency

When GRUB image is netbooted on ppc64le, the keyboard input exhibits
significant latency, reports even say that characters are processed
about once per second. This issue makes interactively trying to debug
a ppc64le config very difficult.

It seems that the latency is largely caused by a 200 ms timeout in the
idle event loop, during which the network card interface is consistently
polled for incoming packets. Often, no packets arrive during this
period, so the timeout nearly always expires, which blocks the response
to key inputs.

Furthermore, this 200 ms timeout might not need to be enforced at this
basic layer, considering that GRUB performs synchronous reads and its
timeout management is actually handled by higher layers, not directly in
the card instance. Additionally, the idle polling, which reacts to
unsolicited packets like ICMP and SLAAC, would be fine at a less frequent
polling interval, rather than needing a timeout for receiving a response.

For these reasons, we believe the timeout in get_card_packet() should be
effectively removed. According to test results, the delay has disappeared,
and it is now much easier to use interactively.

Signed-Off-by: Michael Chang <mchang@suse.com>
Tested-by: Tony Jones <tonyj@suse.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/net/drivers/ieee1275/ofnet.c