futex: don't spin waiting for PF_EXITING -> PF_EXITPIDONE transition
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest0 of 1 patch 0 repliesNew
Patches in v1 No applies recorded yet
The patch the cover letter announces is not in this archive.
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/1] futex: don't spin waiting for PF_EXITING -> PF_EXITPIDONE transition
Quoted 4 lines · Oleg Nesterov
And another question. Lets forget about this ->mm check. I simply can not understand this
Quoted 8 lines
ret = (p->flags & PF_EXITPIDONE) ? -ESRCH : -EAGAINlogic in
attach_to_pi_owner(). First of all, why do we need to retry ifPF_EXITINGis set butPF_EXITPIDONEis not? Why we can not simply ignorePF_EXITINGand rely onexit_pi_state_list()ifPF_EXITPIDONEis not set?I must have missed something but this looks buggy, I do not see any preemption point
^^^^^^^^^^
I meant synchronization point, sorry for confusion.
Quoted 3 lines
in this "retry" loop. Suppose that max_cpus=1 and
rt_task()preempts the non-rtPF_EXITINGowner. Looks likefutex_lock_pi()can spin forever in this case? (OK, ignoring RT throttling).
Finally I forced myself to try to make the 1st patch ;) To remind, we have more problems with robust+pi futexes, this needs another patch(es). Otherwise we could (probably) even kill PF_EXITPIDONE.
Peter. I have no idea how to test it (except it obviously fixes the test- case I sent before). IOW: please review.
And I still fail to understand why this PF_EXITING logic was added in the first place. So I also have the problem with the changelog, it merely says "don't do this because this is not needed".
On top of "check PF_KTHREAD rather than !p->mm to filter out kthreads" but doesn't depend on it.
Oleg.