+#ifdef O_NOATIME
+#define FIO_O_NOATIME O_NOATIME
+#else
+#define FIO_O_NOATIME 0
+#endif
+
+#ifdef MADV_REMOVE
+#define FIO_MADV_FREE MADV_REMOVE
+#endif
+
+#define CACHE_LINE_FILE \
+ "/sys/devices/system/cpu/cpu0/cache/index0/coherency_line_size"
+
+static inline int arch_cache_line_size(void)
+{
+ char size[32];
+ int fd, ret;
+
+ fd = open(CACHE_LINE_FILE, O_RDONLY);
+ if (fd < 0)
+ return -1;
+
+ ret = read(fd, size, sizeof(size));
+
+ close(fd);
+
+ if (ret <= 0)
+ return -1;
+ else
+ return atoi(size);
+}
+