From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Alejandro Colomar <alx@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-man@vger.kernel.org,
"André Almeida" <andrealmeid@igalia.com>,
"Darren Hart" <dvhart@infradead.org>,
"Davidlohr Bueso" <dave@stgolabs.net>,
"Ingo Molnar" <mingo@redhat.com>,
"Juri Lelli" <juri.lelli@redhat.com>,
"Peter Zijlstra" <peterz@infradead.org>,
"Thomas Gleixner" <tglx@linutronix.de>,
"Valentin Schneider" <vschneid@redhat.com>,
"Waiman Long" <longman@redhat.com>
Subject: Re: [[PATCH v3] 1/4] man/man2/prctl.2, man/man2const/PR_FUTEX_HASH.2const: Document PR_FUTEX_HASH
Date: Fri, 30 May 2025 12:09:16 +0200 [thread overview]
Message-ID: <20250530100916._unhdZoo@linutronix.de> (raw)
In-Reply-To: <fs57mucg3z5ay5ga7gqr6kdhlddydtmspwfkbm3rjtpjp57b6y@opvhf34v5xq4>
On 2025-05-30 11:51:58 [+0200], Alejandro Colomar wrote:
> Hi Sebastian,
Hi Alejandro,
> > diff --git a/man/man2const/PR_FUTEX_HASH.2const b/man/man2const/PR_FUTEX_HASH.2const
> > new file mode 100644
> > index 0000000000000..c27adcb73d079
> > --- /dev/null
> > +++ b/man/man2const/PR_FUTEX_HASH.2const
…
> > +Unrelated requests are requests which are not related to one another
> > +because they use a different
> > +.I uaddr
> > +value of the syscall or the requests are issued by different processes
>
> I think 'use a different uaddr value of the syscall' is technically
> incorrect, because two processes may have a different address for the
> same futex word, as their address space is different, right?
A shared futex over shared memory. Yes.
> See futex(2):
>
> $ MANWIDTH=72 man futex | grep -B7 -A5 different.v
>
> A futex is a 32‐bit value——referred to below as a futex word——
> whose address is supplied to the futex() system call. (Futexes
> are 32 bits in size on all platforms, including 64‐bit systems.)
> All futex operations are governed by this value. In order to
> share a futex between processes, the futex is placed in a region
> of shared memory, created using (for example) mmap(2) or shmat(2).
> (Thus, the futex word may have different virtual addresses in dif‐
> ferent processes, but these addresses all refer to the same loca‐
> tion in physical memory.) In a multithreaded program, it is suf‐
> ficient to place the futex word in a global variable shared by all
> threads.
>
> Maybe say 'use a different futex word'?
Oh yes, this would make it simpler to express.
Sebastian
next prev parent reply other threads:[~2025-05-30 10:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-26 15:55 [[PATCH v3] 0/4] Add documentation for PR_FUTEX_HASH Sebastian Andrzej Siewior
2025-05-26 15:55 ` [[PATCH v3] 1/4] man/man2/prctl.2, man/man2const/PR_FUTEX_HASH.2const: Document PR_FUTEX_HASH Sebastian Andrzej Siewior
2025-05-30 9:51 ` Alejandro Colomar
2025-05-30 10:09 ` Sebastian Andrzej Siewior [this message]
2025-05-26 15:55 ` [[PATCH v3] 2/4] man/man2/prctl.2, PR_FUTEX_HASH_SET_SLOTS.2const: Document PR_FUTEX_HASH_SET_SLOTS Sebastian Andrzej Siewior
2025-05-30 9:59 ` Alejandro Colomar
2025-05-26 15:55 ` [[PATCH v3] 3/4] man/man2/prctl.2, PR_FUTEX_HASH_GET_SLOTS.2const: Document PR_FUTEX_HASH_GET_SLOTS Sebastian Andrzej Siewior
2025-05-30 10:03 ` Alejandro Colomar
2025-05-26 15:55 ` [[PATCH v3] 4/4] man/man2/prctl.2, PR_FUTEX_HASH_GET_IMMUTABLE.2const: Document PR_FUTEX_HASH_GET_IMMUTABLE Sebastian Andrzej Siewior
2025-05-30 10:05 ` Alejandro Colomar
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=20250530100916._unhdZoo@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=alx@kernel.org \
--cc=andrealmeid@igalia.com \
--cc=dave@stgolabs.net \
--cc=dvhart@infradead.org \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-man@vger.kernel.org \
--cc=longman@redhat.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=vschneid@redhat.com \
/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