[lkml]   [2006]   [Sep]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Cache line size
On Sun, Sep 10, 2006 at 08:34:46PM -0400, John Richard Moser wrote:

> Is there a way for the Linux Kernel to know the cache line size of the
> CPU it's on, besides #define X86_CACHE_LINE_SZ 32 or whatnot? I am
> looking in /proc/cpuinfo trying to determine how to run caching
> optimizations and interested in this information and its implications.
> It may also be useful if I can get this information at run time in
> application code.

You can use /dev/cpu/x/cpuid to read it directly from the CPU.
See the source of x86info for examples.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2006-09-11 04:35    [W:0.042 / U:0.616 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site