Hi Karel,
On 8/8/22 3:35 PM, Karel Zak wrote:
On Sun, Aug 07, 2022 at 12:49:16AM +0200, Carsten Emde wrote:
If the PF_NO_SETAFFINITY process flag is set, the user may not
know why the affinity is not settable. Write a respective message
and do not attempt to set the affinity of this process.
I'm unsure if constantly checking for the flag rather than calling
sched_setaffinity() is the right way. It seems pretty expensive.
I don't like when userspace tries to predict any kernel policy or
behavior. It seems better to call the syscall and, if necessary,
compose a better (detailed) error message.
Good point.
What about the patch below? (I have moved /proc/#/stat parsing to
lib/procfs.c to keep tastset.c more readable.)
Indeed, that is much better, thanks a lot!
Applied your patch and tested it successfully, you may add my
Tested-by: Carsten Emde <C.Emde@xxxxxxxxx>
if you wish.
Thanks again!
Carsten