diff options
author | Alexey Dobriyan | 2018-02-07 00:39:37 +0100 |
---|---|---|
committer | Linus Torvalds | 2018-02-07 03:32:45 +0100 |
commit | 4de373a12f3c551f9263f37d609f264b440adfec (patch) | |
tree | b7d06e3340b02a1aa204f7fdae8a08e403265d28 /kernel/sched | |
parent | kernel/fork.c: add comment about usage of CLONE_FS flags and namespaces (diff) | |
download | kernel-qcow2-linux-4de373a12f3c551f9263f37d609f264b440adfec.tar.gz kernel-qcow2-linux-4de373a12f3c551f9263f37d609f264b440adfec.tar.xz kernel-qcow2-linux-4de373a12f3c551f9263f37d609f264b440adfec.zip |
cpumask: make cpumask_size() return "unsigned int"
CPUmasks are never big enough to warrant 64-bit code.
Space savings:
add/remove: 0/0 grow/shrink: 1/4 up/down: 3/-17 (-14)
Function old new delta
sched_init_numa 1530 1533 +3
compat_sys_sched_setaffinity 160 159 -1
sys_sched_getaffinity 197 195 -2
sys_sched_setaffinity 183 176 -7
compat_sys_sched_getaffinity 179 172 -7
Link: http://lkml.kernel.org/r/20171204165531.GA8221@avx2
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/sched')
-rw-r--r-- | kernel/sched/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 3da7a2444a91..d99fb5bf61ec 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -4853,7 +4853,7 @@ SYSCALL_DEFINE3(sched_getaffinity, pid_t, pid, unsigned int, len, ret = sched_getaffinity(pid, mask); if (ret == 0) { - size_t retlen = min_t(size_t, len, cpumask_size()); + unsigned int retlen = min(len, cpumask_size()); if (copy_to_user(user_mask_ptr, mask, retlen)) ret = -EFAULT; |