Add kernel option vma_max_shift to twoway container tests.
Risk: low.

Signed-off-by: Duane Sand <duanes@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2187 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/client/tools/setidle.c b/client/tools/setidle.c
new file mode 100644
index 0000000..4d2cc05
--- /dev/null
+++ b/client/tools/setidle.c
@@ -0,0 +1,30 @@
+/* setidle.c: tell kernel to use SCHED_IDLE policy for an existing process
+   and its future descendents.  These background processes run only when some 
+   cpu would otherwise be idle.  The process's priority is never dynamically
+   escalated to the point where its I/O actions may compete with that of 
+   higher priority work */
+
+#include <sched.h>
+#include <errno.h>
+#include <stdio.h>
+
+#define SCHED_IDLE      6006
+
+int main(int argc, char *argv[])
+{
+       int pid;
+       struct sched_param param = { 0 };
+
+       if (argc != 2) {
+               printf("usage: %s pid\n", argv[0]);
+               return EINVAL;
+       }
+
+       pid = atoi(argv[1]);
+
+       if (sched_setscheduler(pid, SCHED_IDLE, &param) == -1) {
+               perror("error sched_setscheduler");
+               return -1;
+       }
+       return 0;
+}