diff options
author | Ingo Molnar <mingo@elte.hu> | 2007-10-15 11:00:19 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2007-10-15 11:00:19 -0400 |
commit | 71e20f1873d46e138c26ce83f8fe54b7221f572f (patch) | |
tree | 3b5c5083d3ffcf7c9d7ddad81acf30c09197ef99 /fs/pipe.c | |
parent | d172fcd3ae1ca7ac27ec8904242fd61e0e11d332 (diff) |
sched: affine sync wakeups
make sync wakeups affine for cache-cold tasks: if a cache-cold task
is woken up by a sync wakeup then use the opportunity to migrate it
straight away. (the two tasks are 'related' because they communicate)
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'fs/pipe.c')
-rw-r--r-- | fs/pipe.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -382,7 +382,7 @@ redo: | |||
382 | 382 | ||
383 | /* Signal writers asynchronously that there is more room. */ | 383 | /* Signal writers asynchronously that there is more room. */ |
384 | if (do_wakeup) { | 384 | if (do_wakeup) { |
385 | wake_up_interruptible(&pipe->wait); | 385 | wake_up_interruptible_sync(&pipe->wait); |
386 | kill_fasync(&pipe->fasync_writers, SIGIO, POLL_OUT); | 386 | kill_fasync(&pipe->fasync_writers, SIGIO, POLL_OUT); |
387 | } | 387 | } |
388 | if (ret > 0) | 388 | if (ret > 0) |
@@ -555,7 +555,7 @@ redo2: | |||
555 | out: | 555 | out: |
556 | mutex_unlock(&inode->i_mutex); | 556 | mutex_unlock(&inode->i_mutex); |
557 | if (do_wakeup) { | 557 | if (do_wakeup) { |
558 | wake_up_interruptible(&pipe->wait); | 558 | wake_up_interruptible_sync(&pipe->wait); |
559 | kill_fasync(&pipe->fasync_readers, SIGIO, POLL_IN); | 559 | kill_fasync(&pipe->fasync_readers, SIGIO, POLL_IN); |
560 | } | 560 | } |
561 | if (ret > 0) | 561 | if (ret > 0) |
@@ -649,7 +649,7 @@ pipe_release(struct inode *inode, int decr, int decw) | |||
649 | if (!pipe->readers && !pipe->writers) { | 649 | if (!pipe->readers && !pipe->writers) { |
650 | free_pipe_info(inode); | 650 | free_pipe_info(inode); |
651 | } else { | 651 | } else { |
652 | wake_up_interruptible(&pipe->wait); | 652 | wake_up_interruptible_sync(&pipe->wait); |
653 | kill_fasync(&pipe->fasync_readers, SIGIO, POLL_IN); | 653 | kill_fasync(&pipe->fasync_readers, SIGIO, POLL_IN); |
654 | kill_fasync(&pipe->fasync_writers, SIGIO, POLL_OUT); | 654 | kill_fasync(&pipe->fasync_writers, SIGIO, POLL_OUT); |
655 | } | 655 | } |