diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2010-09-30 22:15:13 +0100 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-09-30 22:16:10 +0100 |
commit | c0c657bd92911788b96d9670620eabf024453752 (patch) | |
tree | 774a5e2d966d6ee87da17cd063580d5970564d00 /meta-moblin/packages/sreadahead/sreadahead-0.02/set_to_idle.patch | |
parent | e71a306f9cac8e30e689d607e2092e11a756ef5d (diff) | |
download | openembedded-core-c0c657bd92911788b96d9670620eabf024453752.tar.gz openembedded-core-c0c657bd92911788b96d9670620eabf024453752.tar.bz2 openembedded-core-c0c657bd92911788b96d9670620eabf024453752.tar.xz openembedded-core-c0c657bd92911788b96d9670620eabf024453752.zip |
Split meta-extras and meta-moblin out of the main repository
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta-moblin/packages/sreadahead/sreadahead-0.02/set_to_idle.patch')
-rw-r--r-- | meta-moblin/packages/sreadahead/sreadahead-0.02/set_to_idle.patch | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/meta-moblin/packages/sreadahead/sreadahead-0.02/set_to_idle.patch b/meta-moblin/packages/sreadahead/sreadahead-0.02/set_to_idle.patch deleted file mode 100644 index b48659048..000000000 --- a/meta-moblin/packages/sreadahead/sreadahead-0.02/set_to_idle.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff -Naurp sreadahead-0.02/readahead.c sreadahead-0.02-nice/readahead.c ---- sreadahead-0.02/readahead.c 2008-11-06 00:57:17.000000000 -0500 -+++ sreadahead-0.02-nice/readahead.c 2008-11-06 02:28:29.000000000 -0500 -@@ -26,7 +26,18 @@ - #include <errno.h> - - #include "readahead.h" -+#include <sys/syscall.h> - -+# if defined(__i386__) -+# define __NR_ioprio_set 289 -+# elif defined(__x86_64__) -+# define __NR_ioprio_set 251 -+# else -+# error "Unsupported arch" -+# endif -+ -+#define IOPRIO_WHO_PROCESS 1 -+#define IOPRIO_CLASS_SHIFT 13 - #define MAXR 1024 - static struct readahead files[MAXR]; - static unsigned int total_files = 0; -@@ -68,7 +79,15 @@ void *one_thread(void *ptr) - - int main(int argc, char **argv) - { -- FILE *file = fopen("/etc/readahead.packed", "r"); -+ int iopriority = 7; /* hard code for idle */ -+ int iopriority_class = 3; /* 3 stands for idle */ -+ int pid = 0; -+ FILE *file; -+ -+ if (syscall(__NR_ioprio_set, IOPRIO_WHO_PROCESS, pid, iopriority | iopriority_class << IOPRIO_CLASS_SHIFT) == -1) -+ perror("Can not set priority to idle class"); -+ -+ file = fopen("/etc/readahead.packed", "r"); - if (!file) { - perror("Couldnt open /etc/readahead.packed"); - return -errno; |