Re: [PATCH] Reading deterministic cache parameters and exporting it in /sysfs

From: Dave Jones
Date: Tue Mar 15 2005 - 18:40:15 EST


On Tue, Mar 15, 2005 at 03:24:48PM -0800, Venkatesh Pallipadi wrote:
>
> The attached patch adds support for using cpuid(4) instead of cpuid(2), to get
> CPU cache information in a deterministic way for Intel CPUs, whenever
> supported. The details of cpuid(4) can be found here
>
> IA-32 Intel Architecture Software Developer's Manual (vol 2a)
> (http://developer.intel.com/design/pentium4/manuals/index_new.htm#sdm_vol2a)
> and
> Prescott New Instructions (PNI) Technology: Software Developer's Guide
> (http://www.intel.com/cd/ids/developer/asmo-na/eng/events/43988.htm)
>
> The advantage of using the cpuid(4) ('Deterministic Cache Parameters Leaf') are:
> * It provides more information than the descriptors provided by cpuid(2)
> * It is not table based as cpuid(2). So, we will not need changes to the
> kernel to support new cache descriptors in the descriptor table (as is the
> case with cpuid(2)).
>
> The patch also adds a bunch of interfaces under
> /sys/devices/system/cpu/cpuX/cache, showing various information about the
> caches.

Why does this need to be in kernel-space ? Is there some reason that prevents
you from enhancing x86info for example ? I really want to live to see the
death of /proc/cpuinfo one day, and reinventing it in sysfs seems pointless
if it can all be done in userspace.

> Most useful field being shared_cpu_map, which says what caches are
> shared among which logical cpus.

Given that the most useful field is of limited use to a majority of users,
and those that are interested can read this from userspace, this has me very puzzled.

Dave

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/