diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2012-09-13 10:41:01 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2012-09-13 10:41:01 -0400 |
commit | 78890b5989d96ddce989cde929c45ceeded0fcaf (patch) | |
tree | 4e2da81fc7c97f11aee174b1eedac110c9a68b3a /kernel/sched/stop_task.c | |
parent | 1959ec5f82acbdf91425b41600f119ebecb5f6a8 (diff) | |
parent | 55d512e245bc7699a8800e23df1a24195dd08217 (diff) |
Merge commit 'v3.6-rc5' into next
* commit 'v3.6-rc5': (1098 commits)
Linux 3.6-rc5
HID: tpkbd: work even if the new Lenovo Keyboard driver is not configured
Remove user-triggerable BUG from mpol_to_str
xen/pciback: Fix proper FLR steps.
uml: fix compile error in deliver_alarm()
dj: memory scribble in logi_dj
Fix order of arguments to compat_put_time[spec|val]
xen: Use correct masking in xen_swiotlb_alloc_coherent.
xen: fix logical error in tlb flushing
xen/p2m: Fix one-off error in checking the P2M tree directory.
powerpc: Don't use __put_user() in patch_instruction
powerpc: Make sure IPI handlers see data written by IPI senders
powerpc: Restore correct DSCR in context switch
powerpc: Fix DSCR inheritance in copy_thread()
powerpc: Keep thread.dscr and thread.dscr_inherit in sync
powerpc: Update DSCR on all CPUs when writing sysfs dscr_default
powerpc/powernv: Always go into nap mode when CPU is offline
powerpc: Give hypervisor decrementer interrupts their own handler
powerpc/vphn: Fix arch_update_cpu_topology() return value
ARM: gemini: fix the gemini build
...
Conflicts:
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
drivers/rapidio/devices/tsi721.c
Diffstat (limited to 'kernel/sched/stop_task.c')
-rw-r--r-- | kernel/sched/stop_task.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/kernel/sched/stop_task.c b/kernel/sched/stop_task.c index 7b386e86fd23..da5eb5bed84a 100644 --- a/kernel/sched/stop_task.c +++ b/kernel/sched/stop_task.c | |||
@@ -27,8 +27,10 @@ static struct task_struct *pick_next_task_stop(struct rq *rq) | |||
27 | { | 27 | { |
28 | struct task_struct *stop = rq->stop; | 28 | struct task_struct *stop = rq->stop; |
29 | 29 | ||
30 | if (stop && stop->on_rq) | 30 | if (stop && stop->on_rq) { |
31 | stop->se.exec_start = rq->clock_task; | ||
31 | return stop; | 32 | return stop; |
33 | } | ||
32 | 34 | ||
33 | return NULL; | 35 | return NULL; |
34 | } | 36 | } |
@@ -52,6 +54,21 @@ static void yield_task_stop(struct rq *rq) | |||
52 | 54 | ||
53 | static void put_prev_task_stop(struct rq *rq, struct task_struct *prev) | 55 | static void put_prev_task_stop(struct rq *rq, struct task_struct *prev) |
54 | { | 56 | { |
57 | struct task_struct *curr = rq->curr; | ||
58 | u64 delta_exec; | ||
59 | |||
60 | delta_exec = rq->clock_task - curr->se.exec_start; | ||
61 | if (unlikely((s64)delta_exec < 0)) | ||
62 | delta_exec = 0; | ||
63 | |||
64 | schedstat_set(curr->se.statistics.exec_max, | ||
65 | max(curr->se.statistics.exec_max, delta_exec)); | ||
66 | |||
67 | curr->se.sum_exec_runtime += delta_exec; | ||
68 | account_group_exec_runtime(curr, delta_exec); | ||
69 | |||
70 | curr->se.exec_start = rq->clock_task; | ||
71 | cpuacct_charge(curr, delta_exec); | ||
55 | } | 72 | } |
56 | 73 | ||
57 | static void task_tick_stop(struct rq *rq, struct task_struct *curr, int queued) | 74 | static void task_tick_stop(struct rq *rq, struct task_struct *curr, int queued) |
@@ -60,6 +77,9 @@ static void task_tick_stop(struct rq *rq, struct task_struct *curr, int queued) | |||
60 | 77 | ||
61 | static void set_curr_task_stop(struct rq *rq) | 78 | static void set_curr_task_stop(struct rq *rq) |
62 | { | 79 | { |
80 | struct task_struct *stop = rq->stop; | ||
81 | |||
82 | stop->se.exec_start = rq->clock_task; | ||
63 | } | 83 | } |
64 | 84 | ||
65 | static void switched_to_stop(struct rq *rq, struct task_struct *p) | 85 | static void switched_to_stop(struct rq *rq, struct task_struct *p) |