You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
include/linux/nodemask.h: use nr_node_ids (not MAX_NUMNODES) in __nodemask_pr_numnodes()
When viewing the /proc/<pid>/status file, one can see output lines like
Cpus_allowed: ffffffff,ffffffff,ffffffff
Cpus_allowed_list: 0-95
Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,0000000f
Mems_allowed_list: 0-3
The "Mems_allowed" line uses the "%*pb" format string while the
"Mems_allowed_list" line uses the "%*pbl" format string together with the
nodemask_pr_args() macro.
The "Mems_allowed" looks insane compared with the others. It is because
the nodemask_pr_args() macro uses MAX_NUMNODES as the number of nodes to
iterate. The cpumask_pr_args() macro uses nr_cpu_ids instead of MAX_CPUS.
For nodes, there is a corresponding nr_node_ids. So it makes sense to
use nr_node_ids instead to be consistent with "Cpus_allowed:".
With that change, the "Mems_allowed" line becomes sane again.
Mems_allowed: f
There are currently 10 call sites of nodemask_pr_args() in the kernel. Of
them, only cpuset_task_status_allowed() in kernel/cgroup/cpuset.c uses the
"%*pb" format string that will be affected by this change. That cpuset
function is called by proc_pid_status() only.
Link: http://lkml.kernel.org/r/1545405631-6808-1-git-send-email-longman@redhat.com
Signed-off-by: Waiman Long <longman@redhat.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
0 commit comments