lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CO1PR11MB50285AE9636CAAD36AE695C4A0639@CO1PR11MB5028.namprd11.prod.outlook.com>
Date:   Thu, 20 Apr 2023 21:07:05 +0000
From:   "Mekala, SunithaX D" <sunithax.d.mekala@...el.com>
To:     mschmidt <mschmidt@...hat.com>,
        "intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>
CC:     Brent Rowsell <browsell@...hat.com>, Andrew Lunn <andrew@...n.ch>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "Brandeburg, Jesse" <jesse.brandeburg@...el.com>,
        "Kolacinski, Karol" <karol.kolacinski@...el.com>,
        "Nguyen, Anthony L" <anthony.l.nguyen@...el.com>,
        Simon Horman <simon.horman@...igine.com>
Subject: RE: [Intel-wired-lan] [PATCH net-next v2 4/6] ice: sleep, don't
 busy-wait, for ICE_CTL_Q_SQ_CMD_TIMEOUT

> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@...osl.org> On Behalf Of Michal Schmidt
> Sent: Wednesday, April 12, 2023 1:19 AM
> To: intel-wired-lan@...ts.osuosl.org
> Cc: Brent Rowsell <browsell@...hat.com>; Andrew Lunn <andrew@...n.ch>; netdev@...r.kernel.org; Brandeburg, Jesse <jesse.brandeburg@...el.com>; Kolacinski, Karol <karol.kolacinski@...el.com>; Nguyen, Anthony L <anthony.l.nguyen@...el.com>; Simon Horman <simon.horman@...igine.com>
> Subject: [Intel-wired-lan] [PATCH net-next v2 4/6] 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@...hat.com>
> Signed-off-by: Michal Schmidt <mschmidt@...hat.com>
> ---
 > drivers/net/ethernet/intel/ice/ice_common.c   | 14 +++++++-------
 > drivers/net/ethernet/intel/ice/ice_controlq.c |  9 +++++----  drivers/net/ethernet/intel/ice/ice_controlq.h |  2 +-
 > 3 files changed, 13 insertions(+), 12 deletions(-)
> 
Tested-by: Sunitha Mekala <sunithax.d.mekala@...el.com> (A Contingent worker at Intel)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ