Thread (1 message) 1 message, 1 author, 2016-01-08

Re: [PATCH] sched_setattr.2: callee's affinity matters, not caller's one.

From: Michael Kerrisk (man-pages) <hidden>
Date: 2016-01-08 20:27:49

Possibly related (same subject, not in this thread)

Hello Akihiro,

On 01/02/2016 02:04 PM, Akihiro Suda wrote:
Hi, all

sched_setattr.2 says:

 EPERM  The caller's CPU affinity mask does not include all CPUs in
the system (see sched_setaffinity(2)).


But it seems that callee's affinity matters, not caller's one.
http://lxr.free-electrons.com/source/kernel/sched/core.c?v=4.3#L3888
I agree with you. But I think we can word a little more precisely, 
since "callee" isn't so clear. I applied the patch below. Thanks!

Cheers,

Michael

-- a/man2/sched_setattr.2
+++ b/man2/sched_setattr.2
@@ -341,7 +341,8 @@ are invalid.
 The caller does not have appropriate privileges.
 .TP
 .B EPERM
-The caller's CPU affinity mask
+The CPU affinity mask of the thread specified by
+.I pid
 does not include all CPUs in the system
 (see
 .BR sched_setaffinity (2)).

-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help