Thread (34 messages) 34 messages, 4 authors, 2025-02-26

Re: [PATCHv2 1/6] blk-sysfs: remove q->sysfs_lock for attributes which don't need it

From: Christoph Hellwig <hch@lst.de>
Date: 2025-02-18 16:29:59

On Tue, Feb 18, 2025 at 09:45:02PM +0800, Ming Lei wrote:
IMO, this RO attributes needn't protection from q->limits_lock:

- no lifetime issue

- in-tree code needn't limits_lock.

- all are scalar variable, so the attribute itself is updated atomically
Except in the memory model they aren't without READ_ONCE/WRITE_ONCE.

Given that the limits_lock is not a hot lock taking the lock is a very
easy way to mark our intent.  And if we get things like thread thread
sanitizer patches merged that will become essential.  Even KCSAN
might object already without it.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help