there's no fio_set_sched_idle in os/os-android.h. copy the one from
os/os-linux.h.
current Android also has posix_madvise.
diff --git a/os/os-android.h b/os/os-android.h
index c30f62e..6b074cd 100644
--- a/os/os-android.h
+++ b/os/os-android.h
@@ -4,6 +4,7 @@
#define FIO_OS os_android
#include <sys/ioctl.h>
+#include <sys/mman.h>
#include <sys/uio.h>
#include <sys/syscall.h>
#include <sys/vfs.h>
@@ -37,10 +38,6 @@
#define OS_MAP_ANON MAP_ANONYMOUS
-#define posix_madvise madvise
-#define POSIX_MADV_DONTNEED MADV_DONTNEED
-#define POSIX_MADV_SEQUENTIAL MADV_SEQUENTIAL
-#define POSIX_MADV_RANDOM MADV_RANDOM
#ifdef MADV_REMOVE
#define FIO_MADV_FREE MADV_REMOVE
#endif
@@ -261,4 +258,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
--
To unsubscribe from this list: send the line "unsubscribe fio" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html