Merge branch 'master' into gfio
[fio.git] / os / os-linux.h
index 75964dca89543d67c6588b8fd635ac1c8dbcfc54..869a25d8ee5d86c684762d91c4f7a4496f2b5d7f 100644 (file)
@@ -253,4 +253,12 @@ static inline int os_trim(int fd, unsigned long long start,
        return errno;
 }
 
+#ifdef CONFIG_SCHED_IDLE
+static inline int fio_set_sched_idle(void)
+{
+       struct sched_param p = { .sched_priority = 0, };
+       return sched_setscheduler(gettid(), SCHED_IDLE, &p);
+}
+#endif
+
 #endif