* [PATCH 0/4] x86: add cpus_scnprintf function v2
@ 2008-04-05 1:24 Mike Travis
2008-04-05 1:24 ` [PATCH 1/4] " Mike Travis
` (4 more replies)
0 siblings, 5 replies; 14+ messages in thread
From: Mike Travis @ 2008-04-05 1:24 UTC (permalink / raw)
To: Ingo Molnar; +Cc: Thomas Gleixner, H. Peter Anvin, Andrew Morton, linux-kernel
* 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.
--
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 1/4] x86: add cpus_scnprintf function v2
2008-04-05 1:24 [PATCH 0/4] x86: add cpus_scnprintf function v2 Mike Travis
@ 2008-04-05 1:24 ` Mike Travis
2008-04-05 1:24 ` [PATCH 2/4] x86: modify show_shared_cpu_map in intel_cacheinfo v2 Mike Travis
` (3 subsequent siblings)
4 siblings, 0 replies; 14+ messages in thread
From: Mike Travis @ 2008-04-05 1:24 UTC (permalink / raw)
To: Ingo Molnar; +Cc: Thomas Gleixner, H. Peter Anvin, Andrew Morton, linux-kernel
[-- Attachment #1: add-cpus_scnprintf --]
[-- Type: text/plain, Size: 12194 bytes --]
* Add a new cpus_scnprintf() function and a sysctl flag to control
how cpumask sets are printed. The default is to use the current
cpumask_scnprintf(). If kernel.compat_cpus_printf is '0' (default 1),
then cpulist_scnprintf() is used. A nodes_scnprintf() function is
also provided for compatibilty.
Note that setting the kernel.compat_cpus_printf to '0' also makes the
syntax compatible with the setting and showing of cpuset parameters
such as cpu_exclusive and mem_exclusive.
This is introduced with a CONFIG_KERN_COMPAT_CPUSET_PRINTF flag which
currently is only defined for X86_64_SMP architecture.
* In addition, remove the cpumask_scnprintf_len() function.
This is all needed to accomodate large NR_CPUS count and the usage has
been added to Documentation/sysctl/kernel.txt.
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 a 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.
---
Documentation/sysctl/kernel.txt | 56 ++++++++++++++++++++++++++++++++++++++++
arch/x86/Kconfig | 4 ++
arch/x86/kernel/setup.c | 5 +++
include/linux/bitmap.h | 1
include/linux/cpumask.h | 35 ++++++++++++++++++++-----
include/linux/nodemask.h | 31 ++++++++++++++++++++++
kernel/sysctl.c | 11 +++++++
lib/bitmap.c | 16 -----------
8 files changed, 135 insertions(+), 24 deletions(-)
--- linux-2.6.x86.orig/Documentation/sysctl/kernel.txt
+++ linux-2.6.x86/Documentation/sysctl/kernel.txt
@@ -18,6 +18,7 @@ Currently, these files might (depending
show up in /proc/sys/kernel:
- acpi_video_flags
- acct
+- compat_cpus_printf
- core_pattern
- core_uses_pid
- ctrl-alt-del
@@ -85,6 +86,61 @@ valid for 30 seconds.
==============================================================
+compat_cpus_printf:
+
+compat_cpus_printf is used to alter the way cpumask_t cpu bits
+are printed. To maintain compatibility with the current output
+format, the default is '1'.
+
+** DO NOT CHANGE THIS ** if you run programs or scripts which may
+rely on the current format until you are certain they can handle the
+newer, more compact format. If you change the format, it will apply
+to all programs that access common /proc and /sys interfaces.
+
+The current format results in the following print when the number
+of cpus in a system is large. An example when NR_CPUS is 4096 and
+compat_cpus_printf is '1':
+
+ # cat /sys/devices/system/cpu/cpu92/cache/index2/shared_cpu_map
+ 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,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,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,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,00000000,33000000,00000000,00000000
+
+The same example when compat_cpus_printf = '0':
+
+ # echo 0 > /proc/sys/kernel/compat_cpus_printf
+ # cat /sys/devices/system/cpu/cpu3/cache/index0/shared_cpu_map
+ +88-89,92-93
+
+Note that when the "non-compatibile" (or "cpulist") format is specified,
+a preceeding '+' is output. This allows user scripts and programs that
+process the output to distinguish which format is present:
+
+ if (buf[0] == '+')
+ bitmask_parselist(&buf[1], ...);
+ else
+ bitmask_parsehex(buf, ...);
+
+See libbitmask(3) for details on parsing the output.
+
+In addition to conversion of cpumask_t cpu bits, nodemask_t bits are
+handled the same way.
+
+==============================================================
+
core_pattern:
core_pattern is used to specify a core dumpfile pattern name.
--- linux-2.6.x86.orig/arch/x86/Kconfig
+++ linux-2.6.x86/arch/x86/Kconfig
@@ -192,6 +192,10 @@ config X86_TRAMPOLINE
depends on X86_SMP || (X86_VOYAGER && SMP)
default y
+config KERN_COMPAT_CPUS_PRINTF
+ bool
+ default X86_64_SMP
+
config KTIME_SCALAR
def_bool X86_32
source "init/Kconfig"
--- linux-2.6.x86.orig/arch/x86/kernel/setup.c
+++ linux-2.6.x86/arch/x86/kernel/setup.c
@@ -25,6 +25,11 @@ static void __init setup_nr_cpu_ids(void
static inline void setup_nr_cpu_ids(void) { }
#endif
+#ifdef CONFIG_KERN_COMPAT_CPUS_PRINTF
+/* select cpus_scnprintf output */
+int compat_cpus_printf = 1;
+#endif
+
#if defined(CONFIG_HAVE_SETUP_PER_CPU_AREA) && defined(CONFIG_SMP)
/*
* Copy data used in early init routines from the initial arrays to the
--- linux-2.6.x86.orig/include/linux/bitmap.h
+++ linux-2.6.x86/include/linux/bitmap.h
@@ -108,7 +108,6 @@ extern int __bitmap_weight(const unsigne
extern int bitmap_scnprintf(char *buf, unsigned int len,
const unsigned long *src, int nbits);
-extern int bitmap_scnprintf_len(unsigned int len);
extern int __bitmap_parse(const char *buf, unsigned int buflen, int is_user,
unsigned long *dst, int nbits);
extern int bitmap_parse_user(const char __user *ubuf, unsigned int ulen,
--- linux-2.6.x86.orig/include/linux/cpumask.h
+++ linux-2.6.x86/include/linux/cpumask.h
@@ -14,6 +14,8 @@
* bitmap_scnlistprintf() and bitmap_parselist(), also in bitmap.c.
* For details of cpu_remap(), see bitmap_bitremap in lib/bitmap.c
* For details of cpus_remap(), see bitmap_remap in lib/bitmap.c.
+ * For details of cpus_scnprintf(), see compat_cpus_printf in
+ * Documentation/sysctl/kernel.txt.
*
* The available cpumask operations are:
*
@@ -52,6 +54,9 @@
* int cpumask_parse_user(ubuf, ulen, mask) Parse ascii string as cpumask
* int cpulist_scnprintf(buf, len, mask) Format cpumask as list for printing
* int cpulist_parse(buf, map) Parse ascii string as cpulist
+ * int cpus_scnprintf(buf, len, mask) Format cpumask with either
+ * cpumask_scnprintf or cpulist_scnprintf
+ * based on the value of compat_cpus_printf
* int cpu_remap(oldbit, old, new) newbit = map(old, new)(oldbit)
* int cpus_remap(dst, src, old, new) *dst = map(old, new)(src)
*
@@ -285,13 +290,6 @@ static inline int __cpumask_scnprintf(ch
return bitmap_scnprintf(buf, len, srcp->bits, nbits);
}
-#define cpumask_scnprintf_len(len) \
- __cpumask_scnprintf_len((len))
-static inline int __cpumask_scnprintf_len(int len)
-{
- return bitmap_scnprintf_len(len);
-}
-
#define cpumask_parse_user(ubuf, ulen, dst) \
__cpumask_parse_user((ubuf), (ulen), &(dst), NR_CPUS)
static inline int __cpumask_parse_user(const char __user *buf, int len,
@@ -314,6 +312,29 @@ static inline int __cpulist_parse(const
return bitmap_parselist(buf, dstp->bits, nbits);
}
+#ifdef CONFIG_KERN_COMPAT_CPUS_PRINTF
+#define cpus_scnprintf(buf, len, src) __cpus_scnprintf((buf), (len), &(src))
+static inline int __cpus_scnprintf(char *buf, int len, const cpumask_t *srcp)
+{
+ extern int compat_cpus_printf;
+
+ if (compat_cpus_printf)
+ return __cpumask_scnprintf(buf, len, srcp, NR_CPUS);
+ else {
+ int n = 0;
+ if (len > 1) {
+ *buf++ = '+';
+ *buf = '\0';
+ n = __cpulist_scnprintf(buf, len-1, srcp, NR_CPUS);
+ n++;
+ }
+ return n;
+ }
+}
+#else
+#define cpus_scnprintf(buf, len, src) cpumask_scnprintf(buf, len, src)
+#endif
+
#define cpu_remap(oldbit, old, new) \
__cpu_remap((oldbit), &(old), &(new), NR_CPUS)
static inline int __cpu_remap(int oldbit,
--- linux-2.6.x86.orig/include/linux/nodemask.h
+++ linux-2.6.x86/include/linux/nodemask.h
@@ -14,6 +14,8 @@
* bitmap_scnlistprintf() and bitmap_parselist(), also in bitmap.c.
* For details of node_remap(), see bitmap_bitremap in lib/bitmap.c.
* For details of nodes_remap(), see bitmap_remap in lib/bitmap.c.
+ * For details of nodes_scnprintf(), see compat_cpus_printf in
+ * Documentation/sysctl/kernel.txt.
*
* The available nodemask operations are:
*
@@ -54,6 +56,9 @@
* int nodemask_parse_user(ubuf, ulen, mask) Parse ascii string as nodemask
* int nodelist_scnprintf(buf, len, mask) Format nodemask as list for printing
* int nodelist_parse(buf, map) Parse ascii string as nodelist
+ * int nodes_scnprintf(buf, len, mask) Format nodemask with either
+ * nodemask_scnprintf or nodelist_scnprintf
+ * based on the value of compat_cpus_printf
* int node_remap(oldbit, old, new) newbit = map(old, new)(oldbit)
* int nodes_remap(dst, src, old, new) *dst = map(old, new)(dst)
*
@@ -310,6 +315,32 @@ static inline int __nodelist_parse(const
return bitmap_parselist(buf, dstp->bits, nbits);
}
+#ifdef CONFIG_KERN_COMPAT_CPUS_PRINTF
+#define nodes_scnprintf(buf, len, src) \
+ __nodes_scnprintf((buf), (len), &(src))
+static inline int __nodes_scnprintf(char *buf, int len, const nodemask_t *srcp)
+{
+ extern int compat_cpus_printf;
+
+ if (compat_cpus_printf)
+ return __nodemask_scnprintf(buf, len, srcp, MAX_NUMNODES);
+ else {
+ int n = 0;
+ if (len > 1) {
+ *buf++ = '+';
+ *buf = '\0';
+ n = __nodelist_scnprintf(buf, len-1, srcp,
+ MAX_NUMNODES);
+ n++;
+ }
+ return n;
+ }
+}
+#else
+#define nodes_scnprintf(buf, len, src) nodemask_scnprintf(buf, len, src)
+#endif
+
+
#define node_remap(oldbit, old, new) \
__node_remap((oldbit), &(old), &(new), MAX_NUMNODES)
static inline int __node_remap(int oldbit,
--- linux-2.6.x86.orig/kernel/sysctl.c
+++ linux-2.6.x86/kernel/sysctl.c
@@ -82,6 +82,7 @@ extern int compat_log;
extern int maps_protect;
extern int sysctl_stat_interval;
extern int latencytop_enabled;
+extern int compat_cpus_printf;
/* Constants used for minimum and maximum */
#if defined(CONFIG_DETECT_SOFTLOCKUP) || defined(CONFIG_HIGHMEM)
@@ -831,6 +832,16 @@ static struct ctl_table kern_table[] = {
.proc_handler = &proc_dointvec,
},
#endif
+#ifdef CONFIG_KERN_COMPAT_CPUS_PRINTF
+ {
+ .ctl_name = CTL_UNNUMBERED,
+ .procname = "compat_cpus_printf",
+ .data = &compat_cpus_printf,
+ .maxlen = sizeof (int),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec,
+ },
+#endif
/*
* NOTE: do not add new entries to this table unless you have read
--- linux-2.6.x86.orig/lib/bitmap.c
+++ linux-2.6.x86/lib/bitmap.c
@@ -316,22 +316,6 @@ int bitmap_scnprintf(char *buf, unsigned
EXPORT_SYMBOL(bitmap_scnprintf);
/**
- * bitmap_scnprintf_len - return buffer length needed to convert
- * bitmap to an ASCII hex string.
- * @len: number of bits to be converted
- */
-int bitmap_scnprintf_len(unsigned int len)
-{
- /* we need 9 chars per word for 32 bit words (8 hexdigits + sep/null) */
- int bitslen = ALIGN(len, CHUNKSZ);
- int wordlen = CHUNKSZ / 4;
- int buflen = (bitslen / wordlen) * (wordlen + 1) * sizeof(char);
-
- return buflen;
-}
-EXPORT_SYMBOL(bitmap_scnprintf_len);
-
-/**
* __bitmap_parse - convert an ASCII hex string into a bitmap.
* @buf: pointer to buffer containing string.
* @buflen: buffer size in bytes. If string is smaller than this
--
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 2/4] x86: modify show_shared_cpu_map in intel_cacheinfo v2
2008-04-05 1:24 [PATCH 0/4] x86: add cpus_scnprintf function v2 Mike Travis
2008-04-05 1:24 ` [PATCH 1/4] " Mike Travis
@ 2008-04-05 1:24 ` Mike Travis
2008-04-07 13:57 ` Bert Wesarg
2008-04-05 1:24 ` [PATCH 3/4] cpumask: use new cpus_scnprintf function v2 Mike Travis
` (2 subsequent siblings)
4 siblings, 1 reply; 14+ messages in thread
From: Mike Travis @ 2008-04-05 1:24 UTC (permalink / raw)
To: Ingo Molnar; +Cc: Thomas Gleixner, H. Peter Anvin, Andrew Morton, linux-kernel
[-- Attachment #1: mod-intel_cacheinfo --]
[-- Type: text/plain, Size: 3265 bytes --]
Use cpus_scnprintf to print cpus on a leaf instead of requiring
a new "cpumask_scnprintf_len" function to determine the size of
the temporary buffer. cpus_scnprintf can be used to print directly
to the output buffer, eliminating the need for the temporary buffer.
The format that cpus_scnprintf uses is dependent on the sysctl
variable kernel.compat_cpus_printf. The default is '1' and
results in this printout when NR_CPUS = 4096:
# cat /sys/devices/system/cpu/cpu3/cache/index0/shared_cpu_map
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,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,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,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,00000000,00000000,00000000,0000000c
Clearing kernel.compat_cpus_printf changes the output to:
# sysctl kernel.compat_cpus_printf=0
# cat /sys/devices/system/cpu/cpu3/cache/index0/shared_cpu_map
+2-3
[Depends on: x86: add cpus_scnprintf function patch]
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.
---
arch/x86/kernel/cpu/intel_cacheinfo.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
--- linux-2.6.x86.orig/arch/x86/kernel/cpu/intel_cacheinfo.c
+++ linux-2.6.x86/arch/x86/kernel/cpu/intel_cacheinfo.c
@@ -593,14 +593,17 @@ static ssize_t show_size(struct _cpuid4_
static ssize_t show_shared_cpu_map(struct _cpuid4_info *this_leaf, char *buf)
{
+ unsigned long end = ALIGN((unsigned long)buf, PAGE_SIZE);
+ int len = end - (unsigned long)buf;
int n = 0;
- int len = cpumask_scnprintf_len(nr_cpu_ids);
- char *mask_str = kmalloc(len, GFP_KERNEL);
- if (mask_str) {
- cpumask_scnprintf(mask_str, len, this_leaf->shared_cpu_map);
- n = sprintf(buf, "%s\n", mask_str);
- kfree(mask_str);
+ if (len == 0)
+ len = PAGE_SIZE;
+
+ if (len >= 2) {
+ n = cpus_scnprintf(buf, len-2, this_leaf->shared_cpu_map);
+ buf[n++] = '\n';
+ buf[n] = '\0';
}
return n;
}
--
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 3/4] cpumask: use new cpus_scnprintf function v2
2008-04-05 1:24 [PATCH 0/4] x86: add cpus_scnprintf function v2 Mike Travis
2008-04-05 1:24 ` [PATCH 1/4] " Mike Travis
2008-04-05 1:24 ` [PATCH 2/4] x86: modify show_shared_cpu_map in intel_cacheinfo v2 Mike Travis
@ 2008-04-05 1:24 ` Mike Travis
2008-04-05 1:24 ` [PATCH 4/4] cpumask: add show cpu map functions Mike Travis
2008-04-07 8:04 ` [PATCH 0/4] x86: add cpus_scnprintf function v2 Paul Jackson
4 siblings, 0 replies; 14+ messages in thread
From: Mike Travis @ 2008-04-05 1:24 UTC (permalink / raw)
To: Ingo Molnar; +Cc: Thomas Gleixner, H. Peter Anvin, Andrew Morton, linux-kernel
[-- Attachment #1: use-cpuset_scnprintf --]
[-- Type: text/plain, Size: 7401 bytes --]
Use cpus_scnprintf to print cpumask sets where appropriate. This is used
when the number of cpus present in a system is so large that the current
method of printing cpumask_t sets as mask bits result in a large number
of output lines. See Documentation/sysctl/kernel.txt(compat_cpus_printf)
for usage info.
The version for kernel/sched_stats.h is bumped to 15 with a note in
Documentation/scheduler/sched-stats.txt describing the change.
Also some small bugs fixed (or code efficiency improvments) for various uses
of cpus_scnprintf.
[Depends on: x86: add cpus_scnprintf function patch]
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.
---
Documentation/scheduler/sched-stats.txt | 6 ++++++
drivers/base/node.c | 2 +-
drivers/base/topology.c | 14 +++++++++++---
drivers/pci/pci-sysfs.c | 7 ++++---
drivers/pci/probe.c | 6 +++---
kernel/cpuset.c | 4 ++--
kernel/irq/proc.c | 2 +-
kernel/profile.c | 2 +-
kernel/sched_stats.h | 11 ++++++++---
kernel/trace/trace.c | 2 +-
10 files changed, 38 insertions(+), 18 deletions(-)
--- linux-2.6.x86.orig/Documentation/scheduler/sched-stats.txt
+++ linux-2.6.x86/Documentation/scheduler/sched-stats.txt
@@ -1,3 +1,9 @@
+Version 15 is a slight change to the output format. The list of cpus in
+a group may be sent in one of two formats. This is to accomodate systems
+with very large count of cpus. There is a sysctl bit that changes this
+behaviour. See the Documentation/sysctl/kernel.txt:"compat_cpus_printf"
+flag for further info.
+
Version 14 of schedstats includes support for sched_domains, which hit the
mainline kernel in 2.6.20 although it is identical to the stats from version
12 which was in the kernel from 2.6.13-2.6.19 (version 13 never saw a kernel
--- linux-2.6.x86.orig/drivers/base/node.c
+++ linux-2.6.x86/drivers/base/node.c
@@ -28,7 +28,7 @@ static ssize_t node_read_cpumap(struct s
/* 2004/06/03: buf currently PAGE_SIZE, need > 1 char per 4 bits. */
BUILD_BUG_ON(MAX_NUMNODES/4 > PAGE_SIZE/2);
- len = cpumask_scnprintf(buf, PAGE_SIZE-2, *mask);
+ len = cpus_scnprintf(buf, PAGE_SIZE-2, *mask);
buf[len++] = '\n';
buf[len] = '\0';
return len;
--- linux-2.6.x86.orig/drivers/base/topology.c
+++ linux-2.6.x86/drivers/base/topology.c
@@ -43,10 +43,18 @@ static ssize_t show_##name(struct sys_de
#define define_siblings_show_func(name) \
static ssize_t show_##name(struct sys_device *dev, char *buf) \
{ \
- ssize_t len = -1; \
+ unsigned long end = ALIGN((unsigned long)buf, PAGE_SIZE); \
+ int len = end - (unsigned long)buf; \
+ int n = 0; \
unsigned int cpu = dev->id; \
- len = cpumask_scnprintf(buf, NR_CPUS+1, topology_##name(cpu)); \
- return (len + sprintf(buf + len, "\n")); \
+ if (len == 0) \
+ len = PAGE_SIZE; \
+ if (len > 1) { \
+ n = cpus_scnprintf(buf, len-2, topology_##name(cpu)); \
+ buf[n++] = '\n'; \
+ buf[n] = '\0'; \
+ } \
+ return n; \
}
#ifdef topology_physical_package_id
--- linux-2.6.x86.orig/drivers/pci/pci-sysfs.c
+++ linux-2.6.x86/drivers/pci/pci-sysfs.c
@@ -72,9 +72,10 @@ static ssize_t local_cpus_show(struct de
int len;
mask = pcibus_to_cpumask(to_pci_dev(dev)->bus);
- len = cpumask_scnprintf(buf, PAGE_SIZE-2, mask);
- strcat(buf,"\n");
- return 1+len;
+ len = cpus_scnprintf(buf, PAGE_SIZE-2, mask);
+ buf[len++] = '\n';
+ buf[len] = '\0';
+ return len;
}
/* show resources */
--- linux-2.6.x86.orig/drivers/pci/probe.c
+++ linux-2.6.x86/drivers/pci/probe.c
@@ -89,9 +89,9 @@ static ssize_t pci_bus_show_cpuaffinity(
cpumask_t cpumask;
cpumask = pcibus_to_cpumask(to_pci_bus(dev));
- ret = cpumask_scnprintf(buf, PAGE_SIZE, cpumask);
- if (ret < PAGE_SIZE)
- buf[ret++] = '\n';
+ ret = cpus_scnprintf(buf, PAGE_SIZE-2, cpumask);
+ buf[ret++] = '\n';
+ buf[ret] = '\0';
return ret;
}
DEVICE_ATTR(cpuaffinity, S_IRUGO, pci_bus_show_cpuaffinity, NULL);
--- linux-2.6.x86.orig/kernel/cpuset.c
+++ linux-2.6.x86/kernel/cpuset.c
@@ -2364,11 +2364,11 @@ const struct file_operations proc_cpuset
void cpuset_task_status_allowed(struct seq_file *m, struct task_struct *task)
{
seq_printf(m, "Cpus_allowed:\t");
- m->count += cpumask_scnprintf(m->buf + m->count, m->size - m->count,
+ m->count += cpus_scnprintf(m->buf + m->count, m->size - m->count,
task->cpus_allowed);
seq_printf(m, "\n");
seq_printf(m, "Mems_allowed:\t");
- m->count += nodemask_scnprintf(m->buf + m->count, m->size - m->count,
+ m->count += nodes_scnprintf(m->buf + m->count, m->size - m->count,
task->mems_allowed);
seq_printf(m, "\n");
}
--- linux-2.6.x86.orig/kernel/irq/proc.c
+++ linux-2.6.x86/kernel/irq/proc.c
@@ -27,7 +27,7 @@ static int irq_affinity_read_proc(char *
if (desc->status & IRQ_MOVE_PENDING)
mask = &desc->pending_mask;
#endif
- len = cpumask_scnprintf(page, count, *mask);
+ len = cpus_scnprintf(page, count, *mask);
if (count - len < 2)
return -EINVAL;
--- linux-2.6.x86.orig/kernel/profile.c
+++ linux-2.6.x86/kernel/profile.c
@@ -426,7 +426,7 @@ void profile_tick(int type)
static int prof_cpu_mask_read_proc(char *page, char **start, off_t off,
int count, int *eof, void *data)
{
- int len = cpumask_scnprintf(page, count, *(cpumask_t *)data);
+ int len = cpus_scnprintf(page, count, *(cpumask_t *)data);
if (count - len < 2)
return -EINVAL;
len += sprintf(page + len, "\n");
--- linux-2.6.x86.orig/kernel/sched_stats.h
+++ linux-2.6.x86/kernel/sched_stats.h
@@ -4,11 +4,16 @@
* bump this up when changing the output format or the meaning of an existing
* format, so that tools can adapt (or abort)
*/
-#define SCHEDSTAT_VERSION 14
+#define SCHEDSTAT_VERSION 15
static int show_schedstat(struct seq_file *seq, void *v)
{
int cpu;
+ int mask_len = NR_CPUS/32 * 9;
+ char *mask_str = kmalloc(mask_len, GFP_KERNEL);
+
+ if (mask_str == NULL)
+ return -ENOMEM;
seq_printf(seq, "version %d\n", SCHEDSTAT_VERSION);
seq_printf(seq, "timestamp %lu\n", jiffies);
@@ -36,9 +41,8 @@ static int show_schedstat(struct seq_fil
preempt_disable();
for_each_domain(cpu, sd) {
enum cpu_idle_type itype;
- char mask_str[NR_CPUS];
- cpumask_scnprintf(mask_str, NR_CPUS, sd->span);
+ cpus_scnprintf(mask_str, mask_len, sd->span);
seq_printf(seq, "domain%d %s", dcount++, mask_str);
for (itype = CPU_IDLE; itype < CPU_MAX_IDLE_TYPES;
itype++) {
@@ -63,6 +67,7 @@ static int show_schedstat(struct seq_fil
preempt_enable();
#endif
}
+ kfree(mask_str);
return 0;
}
--- linux-2.6.x86.orig/kernel/trace/trace.c
+++ linux-2.6.x86/kernel/trace/trace.c
@@ -1799,7 +1799,7 @@ tracing_cpumask_read(struct file *filp,
mutex_lock(&tracing_cpumask_update_lock);
- len = cpumask_scnprintf(mask_str, count, tracing_cpumask);
+ len = cpus_scnprintf(mask_str, count, tracing_cpumask);
if (count - len < 2) {
count = -EINVAL;
goto out_err;
--
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 4/4] cpumask: add show cpu map functions
2008-04-05 1:24 [PATCH 0/4] x86: add cpus_scnprintf function v2 Mike Travis
` (2 preceding siblings ...)
2008-04-05 1:24 ` [PATCH 3/4] cpumask: use new cpus_scnprintf function v2 Mike Travis
@ 2008-04-05 1:24 ` Mike Travis
2008-04-07 8:04 ` [PATCH 0/4] x86: add cpus_scnprintf function v2 Paul Jackson
4 siblings, 0 replies; 14+ messages in thread
From: Mike Travis @ 2008-04-05 1:24 UTC (permalink / raw)
To: Ingo Molnar; +Cc: Thomas Gleixner, H. Peter Anvin, Andrew Morton, linux-kernel
[-- Attachment #1: add-cpu-show-map-funcs --]
[-- Type: text/plain, Size: 3287 bytes --]
* Add cpu_sysdev_class functions to display the
cpu_online_map
cpu_present_map
cpu_possible_map
cpu_system_map
* Small change to include/linux/sysdev.h to allow the attribute
name and label to be different (to avoid collision with the
"attr_online" entry for bringing cpus on- and off-line.)
Depends on:
[x86/latest]: x86: add cpus_scnprintf function
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
# x86
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Mike Travis <travis@sgi.com>
---
drivers/base/cpu.c | 50 +++++++++++++++++++++++++++++++++++++++++++++++++
include/linux/sysdev.h | 10 ++++++---
2 files changed, 57 insertions(+), 3 deletions(-)
--- linux-2.6.x86.orig/drivers/base/cpu.c
+++ linux-2.6.x86/drivers/base/cpu.c
@@ -103,6 +103,53 @@ static SYSDEV_ATTR(crash_notes, 0400, sh
#endif
/*
+ * Print cpu online, possible, present, and system maps
+ */
+static ssize_t print_cpus_map(char *buf, cpumask_t *map)
+{
+ int n = cpus_scnprintf(buf, PAGE_SIZE-2, *map);
+
+ buf[n++] = '\n';
+ buf[n] = '\0';
+ return n;
+}
+
+#define print_cpus_func(type) \
+static ssize_t print_cpus_##type(struct sysdev_class *class, char *buf) \
+{ \
+ return print_cpus_map(buf, &cpu_##type##_map); \
+} \
+struct sysdev_class_attribute attr_##type##_map = \
+ _SYSDEV_CLASS_ATTR(type, 0444, print_cpus_##type, NULL)
+
+print_cpus_func(online);
+print_cpus_func(possible);
+print_cpus_func(present);
+print_cpus_func(system);
+
+struct sysdev_class_attribute *cpu_state_attr[] = {
+ &attr_online_map,
+ &attr_possible_map,
+ &attr_present_map,
+ &attr_system_map,
+};
+
+static int cpu_states_init(void)
+{
+ int i;
+ int err = 0;
+
+ for (i = 0; i < ARRAY_SIZE(cpu_state_attr); i++) {
+ int ret;
+ ret = sysdev_class_create_file(&cpu_sysdev_class,
+ cpu_state_attr[i]);
+ if (!err)
+ err = ret;
+ }
+ return err;
+}
+
+/*
* register_cpu - Setup a sysfs device for a CPU.
* @cpu - cpu->hotpluggable field set to 1 will generate a control file in
* sysfs for this CPU.
@@ -147,6 +194,9 @@ int __init cpu_dev_init(void)
int err;
err = sysdev_class_register(&cpu_sysdev_class);
+ if (!err)
+ err = cpu_states_init();
+
#if defined(CONFIG_SCHED_MC) || defined(CONFIG_SCHED_SMT)
if (!err)
err = sched_create_sysfs_power_savings_entries(&cpu_sysdev_class);
--- linux-2.6.x86.orig/include/linux/sysdev.h
+++ linux-2.6.x86/include/linux/sysdev.h
@@ -45,12 +45,16 @@ struct sysdev_class_attribute {
ssize_t (*store)(struct sysdev_class *, const char *, size_t);
};
-#define SYSDEV_CLASS_ATTR(_name,_mode,_show,_store) \
-struct sysdev_class_attribute attr_##_name = { \
+#define _SYSDEV_CLASS_ATTR(_name,_mode,_show,_store) \
+{ \
.attr = {.name = __stringify(_name), .mode = _mode }, \
.show = _show, \
.store = _store, \
-};
+}
+
+#define SYSDEV_CLASS_ATTR(_name,_mode,_show,_store) \
+ struct sysdev_class_attribute attr_##_name = \
+ _SYSDEV_CLASS_ATTR(_name,_mode,_show,_store)
extern int sysdev_class_register(struct sysdev_class *);
--
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 0/4] x86: add cpus_scnprintf function v2
2008-04-05 1:24 [PATCH 0/4] x86: add cpus_scnprintf function v2 Mike Travis
` (3 preceding siblings ...)
2008-04-05 1:24 ` [PATCH 4/4] cpumask: add show cpu map functions Mike Travis
@ 2008-04-07 8:04 ` Paul Jackson
2008-04-07 8:16 ` Ingo Molnar
2008-04-07 14:07 ` Bert Wesarg
4 siblings, 2 replies; 14+ messages in thread
From: Paul Jackson @ 2008-04-07 8:04 UTC (permalink / raw)
To: Mike Travis; +Cc: mingo, tglx, hpa, akpm, linux-kernel
I still have some concerns with this cpus_scnprintf patch.
I've taken them up with Mike offline for initial consideration.
If others have questions, concerns or enthusiasms for this patch,
Mike and I would be interested.
--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@sgi.com> 1.940.382.4214
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 0/4] x86: add cpus_scnprintf function v2
2008-04-07 8:04 ` [PATCH 0/4] x86: add cpus_scnprintf function v2 Paul Jackson
@ 2008-04-07 8:16 ` Ingo Molnar
2008-04-07 8:44 ` Paul Jackson
` (2 more replies)
2008-04-07 14:07 ` Bert Wesarg
1 sibling, 3 replies; 14+ messages in thread
From: Ingo Molnar @ 2008-04-07 8:16 UTC (permalink / raw)
To: Paul Jackson; +Cc: Mike Travis, tglx, hpa, akpm, linux-kernel
* Paul Jackson <pj@sgi.com> wrote:
> I still have some concerns with this cpus_scnprintf patch.
>
> I've taken them up with Mike offline for initial consideration.
>
> If others have questions, concerns or enthusiasms for this patch, Mike
> and I would be interested.
i dont mind the old patch either (which did an ugly temporary
allocation), if it keeps the ABI. I dont think it's a big deal, lets not
allow it to become a roadblock, and the overall goal of all these
patches [4096 CPU support in upstream Linux] is important and i'm
enthusiastic about that ;-)
Ingo
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 0/4] x86: add cpus_scnprintf function v2
2008-04-07 8:16 ` Ingo Molnar
@ 2008-04-07 8:44 ` Paul Jackson
2008-04-07 18:42 ` Mike Travis
2008-04-10 15:30 ` Paul Jackson
2 siblings, 0 replies; 14+ messages in thread
From: Paul Jackson @ 2008-04-07 8:44 UTC (permalink / raw)
To: Ingo Molnar; +Cc: travis, tglx, hpa, akpm, linux-kernel
Ingo wrote:
> the overall goal of all these patches [4096 CPU
> support in upstream Linux] is important and i'm
> enthusiastic about that ;-)
Yes, the goal is important, and yes Mike has done
a pile of excellent work meeting that goal.
--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@sgi.com> 1.940.382.4214
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 2/4] x86: modify show_shared_cpu_map in intel_cacheinfo v2
2008-04-05 1:24 ` [PATCH 2/4] x86: modify show_shared_cpu_map in intel_cacheinfo v2 Mike Travis
@ 2008-04-07 13:57 ` Bert Wesarg
2008-04-07 18:45 ` Mike Travis
0 siblings, 1 reply; 14+ messages in thread
From: Bert Wesarg @ 2008-04-07 13:57 UTC (permalink / raw)
To: Mike Travis
Cc: Ingo Molnar, Thomas Gleixner, H. Peter Anvin, Andrew Morton,
linux-kernel
On Sat, Apr 5, 2008 at 3:24 AM, Mike Travis <travis@sgi.com> wrote:
> --- linux-2.6.x86.orig/arch/x86/kernel/cpu/intel_cacheinfo.c
> +++ linux-2.6.x86/arch/x86/kernel/cpu/intel_cacheinfo.c
> @@ -593,14 +593,17 @@ static ssize_t show_size(struct _cpuid4_
>
> static ssize_t show_shared_cpu_map(struct _cpuid4_info *this_leaf, char *buf)
> {
> + unsigned long end = ALIGN((unsigned long)buf, PAGE_SIZE);
May I suggest this:
ptrdiff_t len = PTR_ALIGN(buf + PAGE_SIZE - 1, PAGE_SIZE) - buf;
> + if (len == 0)
> + len = PAGE_SIZE;
Than this is not necessary.
> +
> + if (len >= 2) {
> + n = cpus_scnprintf(buf, len-2, this_leaf->shared_cpu_map);
> + buf[n++] = '\n';
> + buf[n] = '\0';
> }
> return n;
> }
Apart from my suggestion and the use of cpus_scnprintf I think this patch is ok.
Bert
PS: sorry for the long delay.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 0/4] x86: add cpus_scnprintf function v2
2008-04-07 8:04 ` [PATCH 0/4] x86: add cpus_scnprintf function v2 Paul Jackson
2008-04-07 8:16 ` Ingo Molnar
@ 2008-04-07 14:07 ` Bert Wesarg
2008-04-07 18:22 ` Mike Travis
1 sibling, 1 reply; 14+ messages in thread
From: Bert Wesarg @ 2008-04-07 14:07 UTC (permalink / raw)
To: Paul Jackson; +Cc: Mike Travis, mingo, tglx, hpa, akpm, linux-kernel
On Mon, Apr 7, 2008 at 10:04 AM, Paul Jackson <pj@sgi.com> wrote:
> I still have some concerns with this cpus_scnprintf patch.
>
> I've taken them up with Mike offline for initial consideration.
>
> If others have questions, concerns or enthusiasms for this patch,
> Mike and I would be interested.
As long as the only justification for this cpus_scnprintf is human
readability, I have concerns too.
Patch 2/4 itself is ok and 4/4 too. The only thing I miss is an export
of NR_CPUS. So that you know in front of reading a kernel mask, what
size your bitmap needs. (for example glibc cpu_set_t has only 1024
bits but has an cpu_set_t with arbitrary size too).
Bert
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 0/4] x86: add cpus_scnprintf function v2
2008-04-07 14:07 ` Bert Wesarg
@ 2008-04-07 18:22 ` Mike Travis
0 siblings, 0 replies; 14+ messages in thread
From: Mike Travis @ 2008-04-07 18:22 UTC (permalink / raw)
To: Bert Wesarg; +Cc: Paul Jackson, mingo, tglx, hpa, akpm, linux-kernel
Bert Wesarg wrote:
> On Mon, Apr 7, 2008 at 10:04 AM, Paul Jackson <pj@sgi.com> wrote:
>> I still have some concerns with this cpus_scnprintf patch.
>>
>> I've taken them up with Mike offline for initial consideration.
>>
>> If others have questions, concerns or enthusiasms for this patch,
>> Mike and I would be interested.
> As long as the only justification for this cpus_scnprintf is human
> readability, I have concerns too.
>
> Patch 2/4 itself is ok and 4/4 too. The only thing I miss is an export
> of NR_CPUS. So that you know in front of reading a kernel mask, what
> size your bitmap needs. (for example glibc cpu_set_t has only 1024
> bits but has an cpu_set_t with arbitrary size too).
>
> Bert
Hi Bert,
Yes, sorry, I promised I'd follow up with you on what's happening. I
did get some feedback on changes proposed but haven't yet tracked down
specific details yet.
Part of the change is readability, but also looking towards the future
of 16k/64k/??? # of cpus, the straight mask approach will overflow the
PAGE_SIZE buffer provided (though some pathological cases will overflow
the range method as well.) So we'll need some advancement in the format
of the printout.
Another aspect is that this brings the cpumap and cpuset interfaces
closer as the latter already uses the range method.
Thanks,
Mike
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 0/4] x86: add cpus_scnprintf function v2
2008-04-07 8:16 ` Ingo Molnar
2008-04-07 8:44 ` Paul Jackson
@ 2008-04-07 18:42 ` Mike Travis
2008-04-10 15:30 ` Paul Jackson
2 siblings, 0 replies; 14+ messages in thread
From: Mike Travis @ 2008-04-07 18:42 UTC (permalink / raw)
To: Ingo Molnar; +Cc: Paul Jackson, tglx, hpa, akpm, linux-kernel
Ingo Molnar wrote:
> * Paul Jackson <pj@sgi.com> wrote:
>
>> I still have some concerns with this cpus_scnprintf patch.
>>
>> I've taken them up with Mike offline for initial consideration.
>>
>> If others have questions, concerns or enthusiasms for this patch, Mike
>> and I would be interested.
>
> i dont mind the old patch either (which did an ugly temporary
> allocation), if it keeps the ABI. I dont think it's a big deal, lets not
> allow it to become a roadblock, and the overall goal of all these
> patches [4096 CPU support in upstream Linux] is important and i'm
> enthusiastic about that ;-)
>
> Ingo
I have no stake in the ground for this either. My assigned task was to
minimize the effect of bumping up the possible cpu count to a really
large amount. This seemed to me to fall in this category. A side goal
was to prepare for even larger cpu count systems.
An alternative that Paul had suggested was to introduce a new set of
file interfaces that produce the alternate format. This would not
break existing interfaces and allow a transition, though how many
post-processors of the information would change is unclear. Given
that fact, would the added code and complexity be worthwhile?
Thanks,
Mike
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 2/4] x86: modify show_shared_cpu_map in intel_cacheinfo v2
2008-04-07 13:57 ` Bert Wesarg
@ 2008-04-07 18:45 ` Mike Travis
0 siblings, 0 replies; 14+ messages in thread
From: Mike Travis @ 2008-04-07 18:45 UTC (permalink / raw)
To: Bert Wesarg
Cc: Ingo Molnar, Thomas Gleixner, H. Peter Anvin, Andrew Morton,
linux-kernel
Bert Wesarg wrote:
> On Sat, Apr 5, 2008 at 3:24 AM, Mike Travis <travis@sgi.com> wrote:
>> --- linux-2.6.x86.orig/arch/x86/kernel/cpu/intel_cacheinfo.c
>> +++ linux-2.6.x86/arch/x86/kernel/cpu/intel_cacheinfo.c
>> @@ -593,14 +593,17 @@ static ssize_t show_size(struct _cpuid4_
>>
>> static ssize_t show_shared_cpu_map(struct _cpuid4_info *this_leaf, char *buf)
>> {
>> + unsigned long end = ALIGN((unsigned long)buf, PAGE_SIZE);
> May I suggest this:
>
> ptrdiff_t len = PTR_ALIGN(buf + PAGE_SIZE - 1, PAGE_SIZE) - buf;
Hmm, that sounds great. There were a number of different methods used in
the various places to provide for that extra '\n'! ;-)
>
>> + if (len == 0)
>> + len = PAGE_SIZE;
> Than this is not necessary.
>
>> +
>> + if (len >= 2) {
>> + n = cpus_scnprintf(buf, len-2, this_leaf->shared_cpu_map);
>> + buf[n++] = '\n';
>> + buf[n] = '\0';
>> }
>> return n;
>> }
> Apart from my suggestion and the use of cpus_scnprintf I think this patch is ok.
>
> Bert
>
> PS: sorry for the long delay.
Thanks!
Mike
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 0/4] x86: add cpus_scnprintf function v2
2008-04-07 8:16 ` Ingo Molnar
2008-04-07 8:44 ` Paul Jackson
2008-04-07 18:42 ` Mike Travis
@ 2008-04-10 15:30 ` Paul Jackson
2 siblings, 0 replies; 14+ messages in thread
From: Paul Jackson @ 2008-04-10 15:30 UTC (permalink / raw)
To: Ingo Molnar; +Cc: travis, tglx, hpa, akpm, linux-kernel
Ingo, responding to Paul, three days ago:
> i dont mind the old patch either (which did an ugly temporary
> allocation), if it keeps the ABI.
But this v2 and earlier patch versions broke the kernel-user interface,
incompatibly, for about a dozen different /sys and /proc files, and
without even stating so very clearly in the patch commentary. We'd
have to be rather desperate before I'd agree to that.
Mike's latest v3 version of this cpus_scnprintf patchset has resolved
these incompatibilities, by adding new *list files in /sys and /proc,
and new *list line items in the /proc/<pid>/status files, rather than
breaking existing files and lines.
That is much better. Better to add files and lines, than to change the
format of existing ones.
--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@sgi.com> 1.940.382.4214
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2008-04-10 15:30 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-05 1:24 [PATCH 0/4] x86: add cpus_scnprintf function v2 Mike Travis
2008-04-05 1:24 ` [PATCH 1/4] " Mike Travis
2008-04-05 1:24 ` [PATCH 2/4] x86: modify show_shared_cpu_map in intel_cacheinfo v2 Mike Travis
2008-04-07 13:57 ` Bert Wesarg
2008-04-07 18:45 ` Mike Travis
2008-04-05 1:24 ` [PATCH 3/4] cpumask: use new cpus_scnprintf function v2 Mike Travis
2008-04-05 1:24 ` [PATCH 4/4] cpumask: add show cpu map functions Mike Travis
2008-04-07 8:04 ` [PATCH 0/4] x86: add cpus_scnprintf function v2 Paul Jackson
2008-04-07 8:16 ` Ingo Molnar
2008-04-07 8:44 ` Paul Jackson
2008-04-07 18:42 ` Mike Travis
2008-04-10 15:30 ` Paul Jackson
2008-04-07 14:07 ` Bert Wesarg
2008-04-07 18:22 ` Mike Travis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox