From: Kent Overstreet <kent.overstreet@linux.dev>
To: Boqun Feng <boqun.feng@gmail.com>
Cc: linux-kernel@vger.kernel.org,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>, Will Deacon <will@kernel.org>,
Waiman Long <longman@redhat.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Brian Foster <bfoster@redhat.com>,
Dave Chinner <dchinner@redhat.com>
Subject: Re: [PATCH v2] locking: SIX locks (shared/intent/exclusive)
Date: Tue, 23 May 2023 00:19:37 -0400 [thread overview]
Message-ID: <ZGw+2abYSDohPG2E@moria.home.lan> (raw)
In-Reply-To: <ZGvnJZYQfAmgdsqr@boqun-archlinux>
On Mon, May 22, 2023 at 03:05:25PM -0700, Boqun Feng wrote:
> > + * bits 29-30 has read waiters
> > + * bits 30-31 has intent waiters
> > + * bits 31-32 has write waiters
> > + */
> > +
> > +#define SIX_LOCK_HELD_read_OFFSET 0
> > +#define SIX_LOCK_HELD_read ~(~0U << 26)
> > +#define SIX_LOCK_HELD_intent (1U << 26)
> > +#define SIX_LOCK_HELD_write (1U << 27)
> > +#define SIX_LOCK_WAITING_read (1U << (28 + SIX_LOCK_read))
> > +#define SIX_LOCK_WAITING_intent (1U << (28 + SIX_LOCK_intent))
> > +#define SIX_LOCK_WAITING_write (1U << (28 + SIX_LOCK_write))
> > +#define SIX_LOCK_NOSPIN (1U << 31)
>
> ^ NOSPIN is the 31st bit.
Thanks - I think I'll just delete that comment, it's out of date and
the state bits have simplified a bit :)
prev parent reply other threads:[~2023-05-23 4:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-22 17:13 Kent Overstreet
2023-05-22 18:58 ` Linus Torvalds
2023-05-22 20:13 ` Kent Overstreet
2023-05-22 20:53 ` Linus Torvalds
2023-05-22 21:52 ` Kent Overstreet
2023-05-22 22:05 ` Boqun Feng
2023-05-23 4:19 ` Kent Overstreet [this message]
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=ZGw+2abYSDohPG2E@moria.home.lan \
--to=kent.overstreet@linux.dev \
--cc=bfoster@redhat.com \
--cc=boqun.feng@gmail.com \
--cc=dchinner@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=longman@redhat.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=torvalds@linux-foundation.org \
--cc=will@kernel.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
all inboxes | Powered by JetHome®