diff options
author | Ingo Molnar <mingo@elte.hu> | 2005-09-10 03:26:12 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-10 13:06:22 -0400 |
commit | d79fc0fc6645b0cf5cd980da76942ca6d6300fa4 (patch) | |
tree | e74aca1df1d37dbd7af66636a4e39a3f7e1af479 /fs/pipe.c | |
parent | 95cdf3b799a481969a48d69a1a52916ad5da6694 (diff) |
[PATCH] sched: TASK_NONINTERACTIVE
This patch implements a task state bit (TASK_NONINTERACTIVE), which can be
used by blocking points to mark the task's wait as "non-interactive". This
does not mean the task will be considered a CPU-hog - the wait will simply
not have an effect on the waiting task's priority - positive or negative
alike. Right now only pipe_wait() will make use of it, because it's a
common source of not-so-interactive waits (kernel compilation jobs, etc.).
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/pipe.c')
-rw-r--r-- | fs/pipe.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -39,7 +39,11 @@ void pipe_wait(struct inode * inode) | |||
39 | { | 39 | { |
40 | DEFINE_WAIT(wait); | 40 | DEFINE_WAIT(wait); |
41 | 41 | ||
42 | prepare_to_wait(PIPE_WAIT(*inode), &wait, TASK_INTERRUPTIBLE); | 42 | /* |
43 | * Pipes are system-local resources, so sleeping on them | ||
44 | * is considered a noninteractive wait: | ||
45 | */ | ||
46 | prepare_to_wait(PIPE_WAIT(*inode), &wait, TASK_INTERRUPTIBLE|TASK_NONINTERACTIVE); | ||
43 | up(PIPE_SEM(*inode)); | 47 | up(PIPE_SEM(*inode)); |
44 | schedule(); | 48 | schedule(); |
45 | finish_wait(PIPE_WAIT(*inode), &wait); | 49 | finish_wait(PIPE_WAIT(*inode), &wait); |