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: <20250307132929.GI3666230@kernel.org>
Date: Fri, 7 Mar 2025 13:29:29 +0000
From: Simon Horman <horms@...nel.org>
To: Yu-Chun Lin <eleanor15x@...il.com>
Cc: shshaikh@...vell.com, manishc@...vell.com, GR-Linux-NIC-Dev@...vell.com,
	andrew+netdev@...n.ch, davem@...emloft.net, edumazet@...gle.com,
	kuba@...nel.org, pabeni@...hat.com, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org, jserv@...s.ncku.edu.tw,
	visitorckw@...il.com
Subject: Re: [PATCH net-next] qlcnic: Optimize performance by replacing
 rw_lock with spinlock

On Fri, Mar 07, 2025 at 12:31:24AM +0800, Yu-Chun Lin wrote:
> The 'crb_lock', 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>

Hi Yu-Chun Lin,

Thanks for your patch.

My main question is if you have hardware to test this?
And if so, was a benefit observed?

If not, my feeling is that although your change looks
correct, we'd be better off taking the lower risk option
of leaving things be.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ