stat: Add iops stat and sample number information to terse format
[fio.git] / os / os-linux.h
index 0e6246ef1d6e5e70166ea55433e5c2f25fc14c83..3e7a2fc3303639564d47e06595c932f3b6322fb2 100644 (file)
@@ -260,6 +260,14 @@ static inline int arch_cache_line_size(void)
                return atoi(size);
 }
 
+#ifdef __powerpc64__
+#define FIO_HAVE_CPU_ONLINE_SYSCONF
+static inline unsigned int cpus_online(void)
+{
+        return sysconf(_SC_NPROCESSORS_CONF);
+}
+#endif
+
 static inline unsigned long long get_fs_free_size(const char *path)
 {
        unsigned long long ret;
@@ -295,11 +303,23 @@ static inline int fio_set_sched_idle(void)
 }
 #endif
 
-#ifndef POSIX_FADV_STREAMID
-#define POSIX_FADV_STREAMID    8
+#ifndef F_GET_RW_HINT
+#ifndef F_LINUX_SPECIFIC_BASE
+#define F_LINUX_SPECIFIC_BASE  1024
+#endif
+#define F_GET_RW_HINT          (F_LINUX_SPECIFIC_BASE + 11)
+#define F_SET_RW_HINT          (F_LINUX_SPECIFIC_BASE + 12)
 #endif
 
-#define FIO_HAVE_STREAMID
+#ifndef RWH_WRITE_LIFE_NONE
+#define RWH_WRITE_LIFE_NONE    0
+#define RWH_WRITE_LIFE_SHORT   1
+#define RWH_WRITE_LIFE_MEDIUM  2
+#define RWH_WRITE_LIFE_LONG    3
+#define RWH_WRITE_LIFE_EXTREME 4
+#endif
+
+#define FIO_HAVE_WRITE_HINT
 
 #ifndef RWF_HIPRI
 #define RWF_HIPRI      0x00000001
@@ -311,6 +331,14 @@ static inline int fio_set_sched_idle(void)
 #define RWF_SYNC       0x00000004
 #endif
 
+#ifndef RWF_WRITE_LIFE_SHIFT
+#define RWF_WRITE_LIFE_SHIFT           4
+#define RWF_WRITE_LIFE_SHORT           (1 << RWF_WRITE_LIFE_SHIFT)
+#define RWF_WRITE_LIFE_MEDIUM          (2 << RWF_WRITE_LIFE_SHIFT)
+#define RWF_WRITE_LIFE_LONG            (3 << RWF_WRITE_LIFE_SHIFT)
+#define RWF_WRITE_LIFE_EXTREME         (4 << RWF_WRITE_LIFE_SHIFT)
+#endif
+
 #ifndef CONFIG_PWRITEV2
 #ifdef __NR_preadv2
 static inline void make_pos_h_l(unsigned long *pos_h, unsigned long *pos_l,