Re: [PATCH v2 1/1] Taskset: check first whether affinity is settable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux