diff options
author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2025-07-10 13:00:06 +0200 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2025-07-11 16:02:00 +0200 |
commit | a255b78d14324f8a4a49f88e983b9f00818d1194 (patch) | |
tree | a8b47e5fb180d4b8523d2220a990e8d093a278e0 /scripts/lib/kdoc/kdoc_parser.py | |
parent | d7b8f8e20813f0179d8ef519541a3527e7661d3a (diff) |
selftests/futex: Adapt the private hash test to RCU related changes
The auto scaling on create creation used to automatically assign the new
hash because there was the private hash was unused and could be replaced
right away.
This is already racy because if the private hash is in use by a thread
then the visibile resize will be delayed. With the upcoming change to
wait for a RCU grace period before the hash can be assigned, the test
will always fail.
If the reported number of hash buckets is not updated after an
auto scaling event, block on an acquired lock with a timeout. The timeout
is the delay to wait towards a grace period and locking and a locked
pthread_mutex_t ensure that glibc calls into kernel using futex
operation which will assign new private hash if available.
This will retry every 100ms up to 2 seconds in total.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20250710110011.384614-2-bigeasy@linutronix.de
Diffstat (limited to 'scripts/lib/kdoc/kdoc_parser.py')
0 files changed, 0 insertions, 0 deletions