void cpuset_exit (struct task_struct * tsk);
Detach cpuset from tsk and release it.
Note that cpusets marked notify_on_release force every task in them to take the global cpuset_sem semaphore when exiting. This could impact scaling on very large systems. Be reluctant to use notify_on_release cpusets where very high task exit scaling is required on large systems.
Don't even think about derefencing 'cs' after the cpuset use count goes to zero, except inside a critical section guarded by the cpuset_sem semaphore. If you don't hold cpuset_sem, then a zero cpuset use count is a license to any other task to nuke the cpuset immediately.