cyb70289 commented on code in PR #13819:
URL: https://github.com/apache/arrow/pull/13819#discussion_r940896826
##########
cpp/src/arrow/util/cpu_info.cc:
##########
@@ -295,35 +295,29 @@ void OsRetrieveCpuInfo(int64_t* hardware_flags,
CpuInfo::Vendor* vendor,
//------------------------------ LINUX ------------------------------//
// Get cache size, return 0 on error
int64_t LinuxGetCacheSize(int level) {
- const struct {
- int sysconf_name;
- const char* sysfs_path;
- } kCacheSizeEntries[] = {
- {
- _SC_LEVEL1_DCACHE_SIZE,
- "/sys/devices/system/cpu/cpu0/cache/index0/size", // l1d (index1 is
l1i)
- },
- {
- _SC_LEVEL2_CACHE_SIZE,
- "/sys/devices/system/cpu/cpu0/cache/index2/size", // l2
- },
- {
- _SC_LEVEL3_CACHE_SIZE,
- "/sys/devices/system/cpu/cpu0/cache/index3/size", // l3
- },
+ // get cache size by sysconf()
+#ifdef _SC_LEVEL1_DCACHE_SIZE
Review Comment:
Musl libc doesn't define these sysconf flags.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]