The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Matthew Wilcox <willy@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Ingo Molnar <mingo@redhat.com>, Will Deacon <will@kernel.org>,
	Boqun Feng <boqun.feng@gmail.com>,
	Waiman Long <longman@redhat.com>,
	linux-kernel@vger.kernel.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 23:26:43 +0100	[thread overview]
Message-ID: <20260218222643.GC1395266@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <aZYoXsUtbzs-nRZH@casper.infradead.org>

On Wed, Feb 18, 2026 at 09:00:14PM +0000, Matthew Wilcox wrote:

> Here's all the changes I made, and I'll post a rolled-up version
> next.

That all seems reasonable.

One small nit:

> +	if (list_empty(&waiter->list)) {
> +		sem->first_waiter = NULL;
> +		return true;
>  	}
>  
> +	if (sem->first_waiter == waiter)
> +		sem->first_waiter = list_first_entry(&waiter->list,
> +				struct rwsem_waiter, list);

Since that's multiple lines, could you wrap in {}, also I tend to prefer
cino=(0:0 style wrapping. That is, something like so:

        if (sem->first_waiter == waiter) {
                sem->first_waiter = list_first_entry(&waiter->list,
                                                     struct rwsem_waiter, list);
        }


> +	list_del(&waiter->list);
> +
>  	return false;
>  }



  parent reply	other threads:[~2026-02-18 22:26 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 [this message]
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
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=20260218222643.GC1395266@noisy.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=boqun.feng@gmail.com \
    --cc=hch@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=longman@redhat.com \
    --cc=mingo@redhat.com \
    --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