diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-09 19:06:06 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-09 19:06:06 -0500 |
| commit | 5b9b28a63f2e47dac5ff3a2503bfe3ade8796aa0 (patch) | |
| tree | 3d6e42aa380f53c45ed60779960b420d40169256 /include/linux | |
| parent | a4cbbf549a9be10b7583c44249efccd64839533d (diff) | |
| parent | 139b6fd26d85a65c4e0d2795b87b94f9505e5943 (diff) | |
Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull scheduler updates from Ingo Molnar:
"The main scheduler changes in this cycle were:
- various sched/deadline fixes and enhancements
- rescheduling latency fixes/cleanups
- rework the rq->clock code to be more consistent and more robust.
- minor micro-optimizations
- ->avg.decay_count fixes
- add a stack overflow check to might_sleep()
- idle-poll handler fix, possibly resulting in power savings
- misc smaller updates and fixes"
* 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
sched/Documentation: Remove unneeded word
sched/wait: Introduce wait_on_bit_timeout()
sched: Pull resched loop to __schedule() callers
sched/deadline: Remove cpu_active_mask from cpudl_find()
sched: Fix hrtick_start() on UP
sched/deadline: Avoid pointless __setscheduler()
sched/deadline: Fix stale yield state
sched/deadline: Fix hrtick for a non-leftmost task
sched/deadline: Modify cpudl::free_cpus to reflect rd->online
sched/idle: Add missing checks to the exit condition of cpu_idle_poll()
sched: Fix missing preemption opportunity
sched/rt: Reduce rq lock contention by eliminating locking of non-feasible target
sched/debug: Print rq->clock_task
sched/core: Rework rq->clock update skips
sched/core: Validate rq_clock*() serialization
sched/core: Remove check of p->sched_class
sched/fair: Fix sched_entity::avg::decay_count initialization
sched/debug: Fix potential call to __ffs(0) in sched_show_task()
sched/debug: Check for stack overflow in ___might_sleep()
sched/fair: Fix the dealing with decay_count in __synchronize_entity_decay()
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/wait.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/include/linux/wait.h b/include/linux/wait.h index 37423e0e1379..537d58eea8a0 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h | |||
| @@ -990,6 +990,32 @@ wait_on_bit_io(void *word, int bit, unsigned mode) | |||
| 990 | } | 990 | } |
| 991 | 991 | ||
| 992 | /** | 992 | /** |
| 993 | * wait_on_bit_timeout - wait for a bit to be cleared or a timeout elapses | ||
| 994 | * @word: the word being waited on, a kernel virtual address | ||
| 995 | * @bit: the bit of the word being waited on | ||
| 996 | * @mode: the task state to sleep in | ||
| 997 | * @timeout: timeout, in jiffies | ||
| 998 | * | ||
| 999 | * Use the standard hashed waitqueue table to wait for a bit | ||
| 1000 | * to be cleared. This is similar to wait_on_bit(), except also takes a | ||
| 1001 | * timeout parameter. | ||
| 1002 | * | ||
| 1003 | * Returned value will be zero if the bit was cleared before the | ||
| 1004 | * @timeout elapsed, or non-zero if the @timeout elapsed or process | ||
| 1005 | * received a signal and the mode permitted wakeup on that signal. | ||
| 1006 | */ | ||
| 1007 | static inline int | ||
| 1008 | wait_on_bit_timeout(void *word, int bit, unsigned mode, unsigned long timeout) | ||
| 1009 | { | ||
| 1010 | might_sleep(); | ||
| 1011 | if (!test_bit(bit, word)) | ||
| 1012 | return 0; | ||
| 1013 | return out_of_line_wait_on_bit_timeout(word, bit, | ||
| 1014 | bit_wait_timeout, | ||
| 1015 | mode, timeout); | ||
| 1016 | } | ||
| 1017 | |||
| 1018 | /** | ||
| 993 | * wait_on_bit_action - wait for a bit to be cleared | 1019 | * wait_on_bit_action - wait for a bit to be cleared |
| 994 | * @word: the word being waited on, a kernel virtual address | 1020 | * @word: the word being waited on, a kernel virtual address |
| 995 | * @bit: the bit of the word being waited on | 1021 | * @bit: the bit of the word being waited on |
