[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200305185136.GB3348@worktop.programming.kicks-ass.net>
Date: Thu, 5 Mar 2020 19:51:36 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: André Almeida <andrealmeid@...labora.com>
Cc: Florian Weimer <fweimer@...hat.com>,
"Pierre-Loup A. Griffais" <pgriffais@...vesoftware.com>,
Thomas Gleixner <tglx@...utronix.de>,
linux-kernel@...r.kernel.org, kernel@...labora.com,
krisman@...labora.com, shuah@...nel.org,
linux-kselftest@...r.kernel.org, rostedt@...dmis.org,
ryao@...too.org, dvhart@...radead.org, mingo@...hat.com,
z.figura12@...il.com, steven@...vesoftware.com,
steven@...uorix.net, malteskarupke@....de, carlos@...hat.com,
adhemerval.zanella@...aro.org, libc-alpha@...rceware.org,
linux-api@...r.kernel.org
Subject: Re: 'simple' futex interface [Was: [PATCH v3 1/4] futex: Implement
mechanism to wait on any of several futexes]
On Thu, Mar 05, 2020 at 01:14:17PM -0300, André Almeida wrote:
> > sys_futex_wait(void *uaddr, u64 val, unsigned long flags, ktime_t *timo);
> > struct futex_wait {
> > void *uaddr;
> > u64 val;
> > u64 flags;
> > };
> > sys_futex_waitv(struct futex_wait *waiters, unsigned int nr_waiters,
> > u64 flags, ktime_t *timo);
> > sys_futex_wake(void *uaddr, unsigned int nr, u64 flags);
> > sys_futex_cmp_requeue(void *uaddr1, void *uaddr2, unsigned int nr_wake,
> > unsigned int nr_requeue, u64 cmpval, unsigned long flags);
> >
> > And that makes 7 arguments for cmp_requeue, which can't be. Maybe we if
> > combine nr_wake and nr_requeue in one as 2 u16... ?
> >
> > And then we need to go detector if the platform supports it or not..
> >
>
> Thanks everyone for the feedback around our mechanism. Are the
> performance benefits of implementing a syscall to wait on a single futex
> significant enough to maintain it instead of just using
> `sys_futex_waitv()` with `nr_waiters = 1`? If we join both cases in a
> single interface, we may even add a new member for NUMA hint in `struct
> futex_wait`.
My consideration was that avoiding the get_user/copy_from_user might
become measurable on !PTI systems with SMAP.
But someone would have to build it and measure it before we can be sure
of course.
Powered by blists - more mailing lists