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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250324142115.GF892515@horms.kernel.org>
Date: Mon, 24 Mar 2025 14:21:15 +0000
From: Simon Horman <horms@...nel.org>
To: Yu-Chun Lin <eleanor15x@...il.com>
Cc: isdn@...ux-pingi.de, kuba@...nel.org, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org, jserv@...s.ncku.edu.tw,
	visitorckw@...il.com
Subject: Re: [PATCH] mISDN: hfcsusb: Optimize performance by replacing
 rw_lock with spinlock

On Sat, Mar 22, 2025 at 01:20:24AM +0800, Yu-Chun Lin wrote:
> The 'HFClock', an rwlock, is only used by writers, making it functionally
> equivalent to a spinlock.
> 
> According to Documentation/locking/spinlocks.rst:
> 
> "Reader-writer locks require more atomic memory operations than simple
> spinlocks. Unless the reader critical section is long, you are better
> off just using spinlocks."
> 
> Since read_lock() is never called, switching to a spinlock reduces
> overhead and improves efficiency.
> 
> Signed-off-by: Yu-Chun Lin <eleanor15x@...il.com>
> ---
> Build tested only, as I don't have the hardware. 
> Ensured all rw_lock -> spinlock conversions are complete, and replacing
> rw_lock with spinlock should always be safe.
> 
>  drivers/isdn/hardware/mISDN/hfcsusb.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Hi Yu-Chun Lin,

Thanks for your patch.

Unfortunately I think it would be best to leave this rather old
and probably little used driver as-is in this regard unless there
is a demonstrable improvement on real hardware.

Otherwise the small risk of regression and overhead of driver
changes seems to outweigh the theoretical benefit.

-- 
pw-bot: deferred

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ