aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-12-11 21:21:38 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-12-11 21:21:38 -0500
commitf57d54bab696133fae569c5f01352249c36fc74f (patch)
tree8ebe3c6deaf95c424c86843c3d290fbf2a9e80d2 /arch/s390
parentda830e589a45f0c42eef6f3cbd07275f8893f181 (diff)
parentc1ad41f1f7270c1956da13fa8fd59d8d5929d56e (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 biggest change affects group scheduling: we now track the runnable average on a per-task entity basis, allowing a smoother, exponential decay average based load/weight estimation instead of the previous binary on-the-runqueue/off-the-runqueue load weight method. This will inevitably disturb workloads that were in some sort of borderline balancing state or unstable equilibrium, so an eye has to be kept on regressions. For that reason the new load average is only limited to group scheduling (shares distribution) at the moment (which was also hurting the most from the prior, crude weight calculation and whose scheduling quality wins most from this change) - but we plan to extend this to regular SMP balancing as well in the future, which will simplify and speed up things a bit. Other changes involve ongoing preparatory work to extend NOHZ to the scheduler as well, eventually allowing completely irq-free user-space execution." * 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (33 commits) Revert "sched/autogroup: Fix crash on reboot when autogroup is disabled" cputime: Comment cputime's adjusting code cputime: Consolidate cputime adjustment code cputime: Rename thread_group_times to thread_group_cputime_adjusted cputime: Move thread_group_cputime() to sched code vtime: Warn if irqs aren't disabled on system time accounting APIs vtime: No need to disable irqs on vtime_account() vtime: Consolidate a bit the ctx switch code vtime: Explicitly account pending user time on process tick vtime: Remove the underscore prefix invasion sched/autogroup: Fix crash on reboot when autogroup is disabled cputime: Separate irqtime accounting from generic vtime cputime: Specialize irq vtime hooks kvm: Directly account vtime to system on guest switch vtime: Make vtime_account_system() irqsafe vtime: Gather vtime declarations to their own header file sched: Describe CFS load-balancer sched: Introduce temporary FAIR_GROUP_SCHED dependency for load-tracking sched: Make __update_entity_runnable_avg() fast sched: Update_cfs_shares at period edge ...
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/include/asm/cputime.h1
-rw-r--r--arch/s390/kernel/vtime.c13
-rw-r--r--arch/s390/kvm/kvm-s390.c4
3 files changed, 13 insertions, 5 deletions
diff --git a/arch/s390/include/asm/cputime.h b/arch/s390/include/asm/cputime.h
index 023d5ae24482..d2ff41370c0c 100644
--- a/arch/s390/include/asm/cputime.h
+++ b/arch/s390/include/asm/cputime.h
@@ -14,6 +14,7 @@
14 14
15 15
16#define __ARCH_HAS_VTIME_ACCOUNT 16#define __ARCH_HAS_VTIME_ACCOUNT
17#define __ARCH_HAS_VTIME_TASK_SWITCH
17 18
18/* We want to use full resolution of the CPU timer: 2**-12 micro-seconds. */ 19/* We want to use full resolution of the CPU timer: 2**-12 micro-seconds. */
19 20
diff --git a/arch/s390/kernel/vtime.c b/arch/s390/kernel/vtime.c
index 790334427895..e84b8b68444a 100644
--- a/arch/s390/kernel/vtime.c
+++ b/arch/s390/kernel/vtime.c
@@ -112,7 +112,12 @@ void vtime_task_switch(struct task_struct *prev)
112 S390_lowcore.system_timer = ti->system_timer; 112 S390_lowcore.system_timer = ti->system_timer;
113} 113}
114 114
115void account_process_tick(struct task_struct *tsk, int user_tick) 115/*
116 * In s390, accounting pending user time also implies
117 * accounting system time in order to correctly compute
118 * the stolen time accounting.
119 */
120void vtime_account_user(struct task_struct *tsk)
116{ 121{
117 if (do_account_vtime(tsk, HARDIRQ_OFFSET)) 122 if (do_account_vtime(tsk, HARDIRQ_OFFSET))
118 virt_timer_expire(); 123 virt_timer_expire();
@@ -127,6 +132,8 @@ void vtime_account(struct task_struct *tsk)
127 struct thread_info *ti = task_thread_info(tsk); 132 struct thread_info *ti = task_thread_info(tsk);
128 u64 timer, system; 133 u64 timer, system;
129 134
135 WARN_ON_ONCE(!irqs_disabled());
136
130 timer = S390_lowcore.last_update_timer; 137 timer = S390_lowcore.last_update_timer;
131 S390_lowcore.last_update_timer = get_vtimer(); 138 S390_lowcore.last_update_timer = get_vtimer();
132 S390_lowcore.system_timer += timer - S390_lowcore.last_update_timer; 139 S390_lowcore.system_timer += timer - S390_lowcore.last_update_timer;
@@ -140,6 +147,10 @@ void vtime_account(struct task_struct *tsk)
140} 147}
141EXPORT_SYMBOL_GPL(vtime_account); 148EXPORT_SYMBOL_GPL(vtime_account);
142 149
150void vtime_account_system(struct task_struct *tsk)
151__attribute__((alias("vtime_account")));
152EXPORT_SYMBOL_GPL(vtime_account_system);
153
143void __kprobes vtime_stop_cpu(void) 154void __kprobes vtime_stop_cpu(void)
144{ 155{
145 struct s390_idle_data *idle = &__get_cpu_var(s390_idle); 156 struct s390_idle_data *idle = &__get_cpu_var(s390_idle);
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
index ecced9d18986..d91a95568002 100644
--- a/arch/s390/kvm/kvm-s390.c
+++ b/arch/s390/kvm/kvm-s390.c
@@ -608,9 +608,7 @@ static int __vcpu_run(struct kvm_vcpu *vcpu)
608 kvm_s390_deliver_pending_interrupts(vcpu); 608 kvm_s390_deliver_pending_interrupts(vcpu);
609 609
610 vcpu->arch.sie_block->icptcode = 0; 610 vcpu->arch.sie_block->icptcode = 0;
611 local_irq_disable();
612 kvm_guest_enter(); 611 kvm_guest_enter();
613 local_irq_enable();
614 VCPU_EVENT(vcpu, 6, "entering sie flags %x", 612 VCPU_EVENT(vcpu, 6, "entering sie flags %x",
615 atomic_read(&vcpu->arch.sie_block->cpuflags)); 613 atomic_read(&vcpu->arch.sie_block->cpuflags));
616 trace_kvm_s390_sie_enter(vcpu, 614 trace_kvm_s390_sie_enter(vcpu,
@@ -629,9 +627,7 @@ static int __vcpu_run(struct kvm_vcpu *vcpu)
629 VCPU_EVENT(vcpu, 6, "exit sie icptcode %d", 627 VCPU_EVENT(vcpu, 6, "exit sie icptcode %d",
630 vcpu->arch.sie_block->icptcode); 628 vcpu->arch.sie_block->icptcode);
631 trace_kvm_s390_sie_exit(vcpu, vcpu->arch.sie_block->icptcode); 629 trace_kvm_s390_sie_exit(vcpu, vcpu->arch.sie_block->icptcode);
632 local_irq_disable();
633 kvm_guest_exit(); 630 kvm_guest_exit();
634 local_irq_enable();
635 631
636 memcpy(&vcpu->run->s.regs.gprs[14], &vcpu->arch.sie_block->gg14, 16); 632 memcpy(&vcpu->run->s.regs.gprs[14], &vcpu->arch.sie_block->gg14, 16);
637 return rc; 633 return rc;