Main-line Linux kernel tree http://www.kernel.org
Go to file
Michal Schmidt f86d6f9c49 ice: sleep, don't busy-wait, for ICE_CTL_Q_SQ_CMD_TIMEOUT
The driver polls for ice_sq_done() with a 100 µs period for up to 1 s
and it uses udelay to do that.

Let's use usleep_range instead. We know sleeping is allowed here,
because we're holding a mutex (cq->sq_lock). To preserve the total
max waiting time, measure the timeout in jiffies.

ICE_CTL_Q_SQ_CMD_TIMEOUT is used also in ice_release_res(), but there
the polling period is 1 ms (i.e. 10 times longer). Since the timeout was
expressed in terms of the number of loops, the total timeout in this
function is 10 s. I do not know if this is intentional. This patch keeps
it.

The patch lowers the CPU usage of the ice-gnss-<dev_name> kernel thread
on my system from ~8 % to less than 1 %.

I received a report of high CPU usage with ptp4l where the busy-waiting
in ice_sq_send_cmd dominated the profile. This patch has been tested in
that usecase too and it made a huge improvement there.

Tested-by: Brent Rowsell <browsell@redhat.com>
Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Reviewed-by: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Tested-by: Sunitha Mekala <sunithax.d.mekala@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
2023-04-20 16:33:14 -07:00
arch arm: mvebu: dt: Add PHY LED support for 370-rd WAN port 2023-04-19 12:59:16 +01:00
block
certs
crypto
Documentation net/handshake: Add a kernel API for requesting a TLSv1.3 handshake 2023-04-19 18:48:48 -07:00
drivers ice: sleep, don't busy-wait, for ICE_CTL_Q_SQ_CMD_TIMEOUT 2023-04-20 16:33:14 -07:00
fs
include net/handshake: Add a kernel API for requesting a TLSv1.3 handshake 2023-04-19 18:48:48 -07:00
init
io_uring
ipc
kernel
lib
LICENSES
mm
net net/handshake: Add Kunit tests for the handshake consumer API 2023-04-19 18:48:48 -07:00
rust
samples
scripts
security
sound
tools
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore .gitignore: Do not ignore .kunitconfig files 2023-04-19 18:48:48 -07:00
.mailmap
.rustfmt.toml
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS net/handshake: Add a kernel API for requesting a TLSv1.3 handshake 2023-04-19 18:48:48 -07:00
Makefile
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.