From: Waiman Long <llong@redhat.com>
To: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>, Will Deacon <will@kernel.org>,
Boqun Feng <boqun.feng@gmail.com>,
linux-kernel@vger.kernel.org,
Linus Torvalds <torvalds@linux-foundation.org>,
Christoph Hellwig <hch@infradead.org>,
linux-fsdevel@vger.kernel.org
Subject: Re: [RFC 1/1] rwsem: Shrink rwsem by one pointer
Date: Wed, 18 Feb 2026 17:47:52 -0500 [thread overview]
Message-ID: <1aab1afa-d23b-40c6-8e56-a6314fa728dc@redhat.com> (raw)
In-Reply-To: <20260217190835.1151964-2-willy@infradead.org>
On 2/17/26 2:08 PM, Matthew Wilcox (Oracle) wrote:
> Instead of embedding a list_head in struct rw_semaphore, store a pointer
> to the first waiter. The list of waiters remains a doubly linked list
> so we can efficiently add to the tail of the list, remove from the front
> (or middle) of the list.
>
> Some of the list manipulation becomes more complicated, but it's a
> reasonable tradeoff on the slow paths to shrink some core data structures
> like struct inode.
If the goal is to use only one pointer for the rwsem structure, would it
make sense to change list_head to hlist_head for instance? At least we
have existing helpers that can be used instead of making our own coding
convention here.
Cheers,
Longman
next prev parent reply other threads:[~2026-02-18 22:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-17 19:08 [RFC 0/1] Shrinking rwsem Matthew Wilcox (Oracle)
2026-02-17 19:08 ` [RFC 1/1] rwsem: Shrink rwsem by one pointer Matthew Wilcox (Oracle)
2026-02-17 20:27 ` Linus Torvalds
2026-02-18 21:00 ` Matthew Wilcox
2026-02-18 21:37 ` Linus Torvalds
2026-02-18 22:26 ` Peter Zijlstra
2026-02-18 22:45 ` Linus Torvalds
2026-02-18 22:52 ` Linus Torvalds
2026-03-04 19:51 ` Matthew Wilcox
2026-02-18 22:47 ` Waiman Long [this message]
2026-02-18 23:06 ` Matthew Wilcox
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1aab1afa-d23b-40c6-8e56-a6314fa728dc@redhat.com \
--to=llong@redhat.com \
--cc=boqun.feng@gmail.com \
--cc=hch@infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=torvalds@linux-foundation.org \
--cc=will@kernel.org \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox