Re: [RFC PATCH 2/3] futex: Add basic infrastructure for local task local hash.

From: Peter Zijlstra
Date: Mon Oct 28 2024 - 06:16:47 EST


On Sun, Oct 27, 2024 at 12:34:51AM +0200, Sebastian Andrzej Siewior wrote:

> Introduce a task local hash map. The hashmap can be allocated via
> prctl(PR_FUTEX_HASH, PR_FUTEX_HASH_ALLOCATE, 0)

Per process, per task is useless and will make things malfunction.

Things missing in this patch are CLONE_THREAD / CLONE_VM, and create
must be absolutely forbidden once mm_users != 1.