diff options
author | Ingo Molnar <mingo@elte.hu> | 2011-04-14 02:50:37 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-04-14 02:51:07 -0400 |
commit | a4c98f8bbeafee12c979c90743f6fda94f7515c7 (patch) | |
tree | 3dda24b8a2ec42ab7b42845cb68c8b6e1b0d501f /kernel | |
parent | f4ad9bd208c98f32a6f9136618e0b8bebe3fb370 (diff) | |
parent | 85f2e689a5c8fb6ed8fdbee00109e7f6e5fefcb6 (diff) |
Merge branch 'linus' into sched/locking
Merge reason: Pick up this upstream commit:
6631e635c65d: block: don't flush plugged IO on forced preemtion scheduling
As it modifies the scheduler and we'll queue up dependent patches.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/power/Kconfig | 6 | ||||
-rw-r--r-- | kernel/sched.c | 20 |
2 files changed, 15 insertions, 11 deletions
diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig index 4603f08dc47b..6de9a8fc3417 100644 --- a/kernel/power/Kconfig +++ b/kernel/power/Kconfig | |||
@@ -18,9 +18,13 @@ config SUSPEND_FREEZER | |||
18 | 18 | ||
19 | Turning OFF this setting is NOT recommended! If in doubt, say Y. | 19 | Turning OFF this setting is NOT recommended! If in doubt, say Y. |
20 | 20 | ||
21 | config HIBERNATE_CALLBACKS | ||
22 | bool | ||
23 | |||
21 | config HIBERNATION | 24 | config HIBERNATION |
22 | bool "Hibernation (aka 'suspend to disk')" | 25 | bool "Hibernation (aka 'suspend to disk')" |
23 | depends on SWAP && ARCH_HIBERNATION_POSSIBLE | 26 | depends on SWAP && ARCH_HIBERNATION_POSSIBLE |
27 | select HIBERNATE_CALLBACKS | ||
24 | select LZO_COMPRESS | 28 | select LZO_COMPRESS |
25 | select LZO_DECOMPRESS | 29 | select LZO_DECOMPRESS |
26 | ---help--- | 30 | ---help--- |
@@ -85,7 +89,7 @@ config PM_STD_PARTITION | |||
85 | 89 | ||
86 | config PM_SLEEP | 90 | config PM_SLEEP |
87 | def_bool y | 91 | def_bool y |
88 | depends on SUSPEND || HIBERNATION || XEN_SAVE_RESTORE | 92 | depends on SUSPEND || HIBERNATE_CALLBACKS |
89 | 93 | ||
90 | config PM_SLEEP_SMP | 94 | config PM_SLEEP_SMP |
91 | def_bool y | 95 | def_bool y |
diff --git a/kernel/sched.c b/kernel/sched.c index 48013633d792..a187c3fe027b 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -4111,20 +4111,20 @@ need_resched: | |||
4111 | try_to_wake_up_local(to_wakeup); | 4111 | try_to_wake_up_local(to_wakeup); |
4112 | } | 4112 | } |
4113 | deactivate_task(rq, prev, DEQUEUE_SLEEP); | 4113 | deactivate_task(rq, prev, DEQUEUE_SLEEP); |
4114 | |||
4115 | /* | ||
4116 | * If we are going to sleep and we have plugged IO queued, make | ||
4117 | * sure to submit it to avoid deadlocks. | ||
4118 | */ | ||
4119 | if (blk_needs_flush_plug(prev)) { | ||
4120 | raw_spin_unlock(&rq->lock); | ||
4121 | blk_flush_plug(prev); | ||
4122 | raw_spin_lock(&rq->lock); | ||
4123 | } | ||
4114 | } | 4124 | } |
4115 | switch_count = &prev->nvcsw; | 4125 | switch_count = &prev->nvcsw; |
4116 | } | 4126 | } |
4117 | 4127 | ||
4118 | /* | ||
4119 | * If we are going to sleep and we have plugged IO queued, make | ||
4120 | * sure to submit it to avoid deadlocks. | ||
4121 | */ | ||
4122 | if (prev->state != TASK_RUNNING && blk_needs_flush_plug(prev)) { | ||
4123 | raw_spin_unlock(&rq->lock); | ||
4124 | blk_flush_plug(prev); | ||
4125 | raw_spin_lock(&rq->lock); | ||
4126 | } | ||
4127 | |||
4128 | pre_schedule(rq, prev); | 4128 | pre_schedule(rq, prev); |
4129 | 4129 | ||
4130 | if (unlikely(!rq->nr_running)) | 4130 | if (unlikely(!rq->nr_running)) |