On 2/28/20 1:25 PM, Thomas Gleixner wrote:
Peter Zijlstra peterz@infradead.org writes:
On Fri, Feb 28, 2020 at 08:07:17PM +0100, Peter Zijlstra wrote:
So I have a problem with this vector layout, it doesn't allow for per-futex flags, and esp. with that multi-size futex support that becomes important, but also with the already extand private/shared and wait_bitset flags this means you cannot have a vector with mixed wait types.
Alternatively, we throw the entire single-syscall futex interface under the bus and design a bunch of new syscalls that are natively vectored or something.
Thomas mentioned something like that, the problem is, ofcourse, that we then want to fix a whole bunch of historical ills, and the probmem becomes much bigger.
We keep piling features on top of an interface and mechanism which is fragile as hell and horrible to maintain. Adding vectoring, multi size and whatever is not making it any better.
There is also the long standing issue with NUMA, which we can't address with the current pile at all.
So I'm really advocating that all involved parties sit down ASAP and hash out a new and less convoluted mechanism where all the magic new features can be addressed in a sane way so that the 'F' in Futex really only means Fast and not some other word starting with 'F'.
Are you specifically talking about the interface, or the mechanism itself? Would you be OK with a new syscall that calls into the same code as this patch? It does seem like that's what we want, so if we rewrote a mechanism I'm not convinced it would come out any different. But, the interface itself seems fair-game to rewrite, as the current futex syscall is turning into an ioctl of sorts.
This solves a real problem with a real usecase; so I'd like to stay practical and not go into deeper issues like solving NUMA support for all of futex in the interest of users waiting at the other end. Can you point us to your preferred approach just for the scope of what we're trying to accomplish?
Thanks,
tglx