diff options
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/sched/debug.c | 6 | ||||
| -rw-r--r-- | kernel/sched/fair.c | 14 | ||||
| -rw-r--r-- | kernel/sched/stats.h | 5 | ||||
| -rw-r--r-- | kernel/time/ntp.c | 6 | ||||
| -rw-r--r-- | kernel/time/timekeeping.c | 2 |
5 files changed, 19 insertions, 14 deletions
diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c index e076bddd4c66..196559994f7c 100644 --- a/kernel/sched/debug.c +++ b/kernel/sched/debug.c | |||
| @@ -124,7 +124,7 @@ print_task(struct seq_file *m, struct rq *rq, struct task_struct *p) | |||
| 124 | SEQ_printf(m, " "); | 124 | SEQ_printf(m, " "); |
| 125 | 125 | ||
| 126 | SEQ_printf(m, "%15s %5d %9Ld.%06ld %9Ld %5d ", | 126 | SEQ_printf(m, "%15s %5d %9Ld.%06ld %9Ld %5d ", |
| 127 | p->comm, p->pid, | 127 | p->comm, task_pid_nr(p), |
| 128 | SPLIT_NS(p->se.vruntime), | 128 | SPLIT_NS(p->se.vruntime), |
| 129 | (long long)(p->nvcsw + p->nivcsw), | 129 | (long long)(p->nvcsw + p->nivcsw), |
| 130 | p->prio); | 130 | p->prio); |
| @@ -289,7 +289,7 @@ do { \ | |||
| 289 | P(nr_load_updates); | 289 | P(nr_load_updates); |
| 290 | P(nr_uninterruptible); | 290 | P(nr_uninterruptible); |
| 291 | PN(next_balance); | 291 | PN(next_balance); |
| 292 | P(curr->pid); | 292 | SEQ_printf(m, " .%-30s: %ld\n", "curr->pid", (long)(task_pid_nr(rq->curr))); |
| 293 | PN(clock); | 293 | PN(clock); |
| 294 | P(cpu_load[0]); | 294 | P(cpu_load[0]); |
| 295 | P(cpu_load[1]); | 295 | P(cpu_load[1]); |
| @@ -492,7 +492,7 @@ void proc_sched_show_task(struct task_struct *p, struct seq_file *m) | |||
| 492 | { | 492 | { |
| 493 | unsigned long nr_switches; | 493 | unsigned long nr_switches; |
| 494 | 494 | ||
| 495 | SEQ_printf(m, "%s (%d, #threads: %d)\n", p->comm, p->pid, | 495 | SEQ_printf(m, "%s (%d, #threads: %d)\n", p->comm, task_pid_nr(p), |
| 496 | get_nr_threads(p)); | 496 | get_nr_threads(p)); |
| 497 | SEQ_printf(m, | 497 | SEQ_printf(m, |
| 498 | "---------------------------------------------------------" | 498 | "---------------------------------------------------------" |
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 9b3fe1cd8f40..11cd13667359 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c | |||
| @@ -5928,11 +5928,15 @@ static void task_fork_fair(struct task_struct *p) | |||
| 5928 | cfs_rq = task_cfs_rq(current); | 5928 | cfs_rq = task_cfs_rq(current); |
| 5929 | curr = cfs_rq->curr; | 5929 | curr = cfs_rq->curr; |
| 5930 | 5930 | ||
| 5931 | if (unlikely(task_cpu(p) != this_cpu)) { | 5931 | /* |
| 5932 | rcu_read_lock(); | 5932 | * Not only the cpu but also the task_group of the parent might have |
| 5933 | __set_task_cpu(p, this_cpu); | 5933 | * been changed after parent->se.parent,cfs_rq were copied to |
| 5934 | rcu_read_unlock(); | 5934 | * child->se.parent,cfs_rq. So call __set_task_cpu() to make those |
| 5935 | } | 5935 | * of child point to valid ones. |
| 5936 | */ | ||
| 5937 | rcu_read_lock(); | ||
| 5938 | __set_task_cpu(p, this_cpu); | ||
| 5939 | rcu_read_unlock(); | ||
| 5936 | 5940 | ||
| 5937 | update_curr(cfs_rq); | 5941 | update_curr(cfs_rq); |
| 5938 | 5942 | ||
diff --git a/kernel/sched/stats.h b/kernel/sched/stats.h index 5aef494fc8b4..c7edee71bce8 100644 --- a/kernel/sched/stats.h +++ b/kernel/sched/stats.h | |||
| @@ -104,8 +104,9 @@ static inline void sched_info_queued(struct task_struct *t) | |||
| 104 | } | 104 | } |
| 105 | 105 | ||
| 106 | /* | 106 | /* |
| 107 | * Called when a process ceases being the active-running process, either | 107 | * Called when a process ceases being the active-running process involuntarily |
| 108 | * voluntarily or involuntarily. Now we can calculate how long we ran. | 108 | * due, typically, to expiring its time slice (this may also be called when |
| 109 | * switching to the idle task). Now we can calculate how long we ran. | ||
| 109 | * Also, if the process is still in the TASK_RUNNING state, call | 110 | * Also, if the process is still in the TASK_RUNNING state, call |
| 110 | * sched_info_queued() to mark that it has now again started waiting on | 111 | * sched_info_queued() to mark that it has now again started waiting on |
| 111 | * the runqueue. | 112 | * the runqueue. |
diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c index 8f5b3b98577b..bb2215174f05 100644 --- a/kernel/time/ntp.c +++ b/kernel/time/ntp.c | |||
| @@ -516,13 +516,13 @@ static void sync_cmos_clock(struct work_struct *work) | |||
| 516 | schedule_delayed_work(&sync_cmos_work, timespec_to_jiffies(&next)); | 516 | schedule_delayed_work(&sync_cmos_work, timespec_to_jiffies(&next)); |
| 517 | } | 517 | } |
| 518 | 518 | ||
| 519 | static void notify_cmos_timer(void) | 519 | void ntp_notify_cmos_timer(void) |
| 520 | { | 520 | { |
| 521 | schedule_delayed_work(&sync_cmos_work, 0); | 521 | schedule_delayed_work(&sync_cmos_work, 0); |
| 522 | } | 522 | } |
| 523 | 523 | ||
| 524 | #else | 524 | #else |
| 525 | static inline void notify_cmos_timer(void) { } | 525 | void ntp_notify_cmos_timer(void) { } |
| 526 | #endif | 526 | #endif |
| 527 | 527 | ||
| 528 | 528 | ||
| @@ -687,8 +687,6 @@ int __do_adjtimex(struct timex *txc, struct timespec *ts, s32 *time_tai) | |||
| 687 | if (!(time_status & STA_NANO)) | 687 | if (!(time_status & STA_NANO)) |
| 688 | txc->time.tv_usec /= NSEC_PER_USEC; | 688 | txc->time.tv_usec /= NSEC_PER_USEC; |
| 689 | 689 | ||
| 690 | notify_cmos_timer(); | ||
| 691 | |||
| 692 | return result; | 690 | return result; |
| 693 | } | 691 | } |
| 694 | 692 | ||
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index 48b9fffabdc2..947ba25a95a0 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c | |||
| @@ -1703,6 +1703,8 @@ int do_adjtimex(struct timex *txc) | |||
| 1703 | write_seqcount_end(&timekeeper_seq); | 1703 | write_seqcount_end(&timekeeper_seq); |
| 1704 | raw_spin_unlock_irqrestore(&timekeeper_lock, flags); | 1704 | raw_spin_unlock_irqrestore(&timekeeper_lock, flags); |
| 1705 | 1705 | ||
| 1706 | ntp_notify_cmos_timer(); | ||
| 1707 | |||
| 1706 | return ret; | 1708 | return ret; |
| 1707 | } | 1709 | } |
| 1708 | 1710 | ||
