Re: [PATCH -tip 22/32] sched: Split the cookie and setup per-task cookie on fork

From: Peter Zijlstra
Date: Wed Nov 25 2020 - 06:08:29 EST


On Tue, Nov 17, 2020 at 06:19:52PM -0500, Joel Fernandes (Google) wrote:
> Also, for the per-task cookie, it will get weird if we use pointers of any
> emphemeral objects. For this reason, introduce a refcounted object who's sole
> purpose is to assign unique cookie value by way of the object's pointer.

Might be useful to explain why exactly none of the many pid_t's are
good enough.