From: Glenn Washburn <development@efficientek.com>
To: Daniel Kiper <dkiper@net-space.pl>, grub-devel@gnu.org
Cc: Glenn Washburn <development@efficientek.com>
Subject: [PATCH 0/3] Net fix and improvements
Date: Tue, 8 Mar 2022 15:20:17 -0600 [thread overview]
Message-ID: <cover.1646679955.git.development@efficientek.com> (raw)
The first patch looks like it was a copy/paste error. If the net module is
unloaded, grub_net_poll_cards_idle should be NULL so that a function in the
net module which now doesn't exist.
The second and third patches are for performance and were helpful when
debugging GRUB. When the net module is loaded, even if there are no net
cards found, grub_net_poll_cards_idle will call grub_net_tcp_retransmit()
unconditionally. But there's no need to go through tcp retransmit logic if
there aren't any cards that we could be retransmitting on.
As for the third patch, if the machine has network cards found, but there are
no tcp open sockets (because the user doesn't use the network to boot), then
grub_net_tcp_retransmit() should be a noop. Thus is doesn't need to call
grub_get_time_ms(), which does a call into firmware on powerpc-ieee1275. So
only call grub_get_time_ms() if there are tcp sockets.
Calls to grub_net_poll_cards_idle can happen a lot when GRUB is waiting for a
keypress (grub_getkey_noblock calls grub_net_poll_cards_idle). I found this
annoying when debugging an issue in GRUB with GDB and I found that nearly
every time I interrupted GRUB with the GDB I was landing in OpenBIOS's
milliseconds call and then I had to step out back into GRUB which could be
a hundred or more instructions. This reduces the probability that interrupting
GRUB lands in the firmware when GRUB is blocked waiting on a keypress.
Glenn
Glenn Washburn (3):
net: Unset grub_net_poll_cards_idle when net module has been unloaded
net: Avoid unnecessary calls to grub_net_tcp_retransmit
net/tcp: Only call grub_get_time_ms when there are sockets to
potentially retransmit for
grub-core/net/net.c | 5 +++--
grub-core/net/tcp.c | 9 +++++++--
2 files changed, 10 insertions(+), 4 deletions(-)
--
2.27.0
next reply other threads:[~2022-03-08 21:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-08 21:20 Glenn Washburn [this message]
2022-03-08 21:20 ` [PATCH 1/3] net: Unset grub_net_poll_cards_idle when net module has been unloaded Glenn Washburn
2022-03-08 21:20 ` [PATCH 2/3] net: Avoid unnecessary calls to grub_net_tcp_retransmit Glenn Washburn
2022-03-08 21:20 ` [PATCH 3/3] net/tcp: Only call grub_get_time_ms when there are sockets to potentially retransmit for Glenn Washburn
2022-03-17 22:21 ` [PATCH 0/3] Net fix and improvements Daniel Kiper
-- strict thread matches above, loose matches on Subject: below --
2022-03-18 6:51 Glenn Washburn
2022-03-22 16:52 ` Daniel Kiper
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1646679955.git.development@efficientek.com \
--to=development@efficientek.com \
--cc=dkiper@net-space.pl \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.