lkml.org 
[lkml]   [2008]   [Apr]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[PATCH 0/4] x86: add cpus_scnprintf function v2

* Add a new cpus_scnprintf and a sysctl flag to control how cpumask sets
are printed. The default (1) is to use the current cpumask_scnprintf.
If kernel.compat_cpus_printf is '0', then cpulist_scnprintf is used.
In addition, a nodes_scnprintf function is provided for compatibilty.

* This is introduced with a CONFIG_KERN_COMPAT_CPUSET_PRINTF flag which
currently is only defined for X86_64_SMP architecture. For all other
architectures the current cpumask_scnprintf() is used.

* Add usage information to Documentation/sysctl/kernel.txt for the
/proc/sys/kernel/compat_cpus_printf flag.

* Add cpu_sysdev_class functions to display the

cpu_online_map
cpu_present_map
cpu_possible_map
cpu_system_map

* Modify usages of cpumask_scnprintf to use the new cpus_scnprintf where
appropriate. The list of files affected are:

arch/x86/kernel/cpu/intel_cacheinfo.c
drivers/base/node.c
drivers/base/topology.c
drivers/pci/pci-sysfs.c
drivers/pci/probe.c
kernel/irq/proc.c
kernel/profile.c
kernel/sched_stats.h
kernel/sysctl.c
kernel/sysctl_check.c
kernel/trace/trace.c

Note that kernel/sched.c is not in this patchset as it has many other changes,
so the change to use cpus_scnprintf is in a following patchset.

For inclusion in x86/latest.

Based on:
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
+ x86/latest .../x86/linux-2.6-x86.git
+ sched-devel/latest .../mingo/linux-2.6-sched-devel.git

Signed-off-by: Mike Travis <travis@sgi.com>
---
v2:
Renamed cpuset_scnprintf() to cpus_scnprintf to avoid confusion with
"cpusets", and changed the other names to match.

Added a sentinel character for the cpulist type output so scripts can
be written to handle both cases.

Added warning in the Documentation/sysctl/kernel.txt that changing this
option may break scripts and programs that rely on the current format.
Also provided example on how to process the output.

Added information to Documentation/scheduler/sched-stats.txt about
change in version number because of new cpus_scnprintf function.

--


\
 
 \ /
  Last update: 2008-04-05 03:29    [W:0.074 / U:0.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site