Jeffrey Walton
2017-Sep-17 06:07 UTC
[CentOS] sysconf and _SC_LEVEL1_DCACHE_LINESIZE returns 0?
Hi Everyone,
I'm working on GCC112, which is POWER System S822 (Power8) machine
running CentOS 7 machine (https://gcc.gnu.org/wiki/CompileFarm):
$ cat /etc/centos-release
CentOS Linux release 7.3.1611 (AltArch)
I'm trying to determine L1 data cache size. When the following code
runs it returns 0. The man pages state -1 is an error, so I think its
claiming to succeed.
cacheLineSize = sysconf(_SC_LEVEL1_DCACHE_LINESIZE);
GCC119, which is also a S822 Power8 running AIX, returns 128.
Does anyone know what I might be doing wrong under Cent? Or maybe, how
can I retrieve the L1 data cache line size?
Thanks in advance.
Possibly Parallel Threads
- Failed PPC64 compile when using Power7 loads and stores?
- [klibc:sysconf] Framework and trivial implementation of sysconf(3)
- [klibc:master] tests: Add a trivial test for sysconf()
- [klibc:master] tests: Add a trivial test for sysconf()
- [PATCH common] mlutils: Simple wrapper around sysconf (_SC_NPROCESSORS_ONLN).
