login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
March
»
28
Re: [PATCH 2/2] x86: modify show_shared_cpu_map in intel_cacheinfo
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From:
Bert Wesarg <bert.wesarg@...>
To: Mike Travis <travis@...>
Cc: Ingo Molnar <mingo@...>, <linux-kernel@...>
Subject:
Re: [PATCH 2/2] x86: modify show_shared_cpu_map in intel_cacheinfo
Date: Friday, March 28, 2008 - 5:01 am
On Fri, Mar 28, 2008 at 12:16 AM, Mike Travis <travis@sgi.com> wrote:
quoted text
> Used cpulist_scnprintf to print cpus on a leaf instead of requiring > a new "cpumask_scnprintf_len" function to determine the size of > the temporary buffer. cpulist_scnprintf can be used to print directly > to the output buffer, eliminating the need for the temporary buffer. > > Based on: > git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git > git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86.git > > Signed-off-by: Mike Travis <travis@sgi.com> > --- > arch/x86/kernel/cpu/intel_cacheinfo.c | 25 +++++++++++++++++-------- > 1 file changed, 17 insertions(+), 8 deletions(-) > > --- linux.trees.git.orig/arch/x86/kernel/cpu/intel_cacheinfo.c > +++ linux.trees.git/arch/x86/kernel/cpu/intel_cacheinfo.c > @@ -593,14 +593,23 @@ static ssize_t show_size(struct _cpuid4_ > > static ssize_t show_shared_cpu_map(struct _cpuid4_info *this_leaf, char *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); > + /* > + * cpulist_scnprintf() has the advantage of compressing > + * consecutive cpu numbers into a single range which seems > + * appropriate for cpus on a leaf. This will change what is > + * output so scripts that process the output will have to change.
So this breaks user space? Bert --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH 2/2] x86: modify show_shared_cpu_map in intel_cacheinfo
, Mike Travis
, (Thu Mar 27, 7:16 pm)
Re: [PATCH 2/2] x86: modify show_shared_cpu_map in intel_cac...
, Bert Wesarg
, (Fri Mar 28, 5:01 am)
Re: [PATCH 2/2] x86: modify show_shared_cpu_map in intel_cac...
, Mike Travis
, (Fri Mar 28, 10:40 am)
Re: [PATCH 2/2] x86: modify show_shared_cpu_map in intel_cac...
, Bert Wesarg
, (Fri Mar 28, 10:54 am)
Re: [PATCH 2/2] x86: modify show_shared_cpu_map in intel_cac...
, Mike Travis
, (Fri Mar 28, 2:19 pm)
Re: [PATCH 2/2] x86: modify show_shared_cpu_map in intel_cac...
, Bert Wesarg
, (Sat Mar 29, 4:59 am)
Re: [PATCH 2/2] x86: modify show_shared_cpu_map in intel_cac...
, Mike Travis
, (Mon Mar 31, 12:35 pm)
Re: [PATCH 2/2] x86: modify show_shared_cpu_map in intel_cac...
, Paul Jackson
, (Mon Mar 31, 1:56 pm)
Re: [PATCH 2/2] x86: modify show_shared_cpu_map in intel_cac...
, Bert Wesarg
, (Mon Mar 31, 1:24 pm)
Re: [PATCH 2/2] x86: modify show_shared_cpu_map in intel_cac...
, Paul Jackson
, (Mon Mar 31, 2:18 pm)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Tarkan Erimer
Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3
Greg KH
[GIT PATCH] driver core patches against 2.6.24
clameter
[31/36] Large Blocksize: Core piece
David Woodhouse
Re: [GIT *] Allow request_firmware() to be satisfied from in-kernel, use it in mor...
git
:
linux-netdev
:
Gerrit Renker
[PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side)
KOSAKI Motohiro
[bug?] tg3: Failed to load firmware "tigon/tg3_tso.bin"
Jarek Poplawski
[PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
openbsd-misc
:
Colocation donated by:
Who's online
There are currently
6 users
and
909 guests
online.
Online users
zeekec
privacycontrol
glowinthedarkyh
autoinsurancrfb
NeilK
dillmankaratei
Syndicate