Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 298354
b: refs/heads/master
c: 01f23e1
h: refs/heads/master
v: v3
  • Loading branch information
Catalin Marinas authored and Ingo Molnar committed Mar 13, 2012
1 parent 1c85dff commit e3334a4
Show file tree
Hide file tree
Showing 56 changed files with 526 additions and 526 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6135fc1eb4b1c9ae5f535507ed59591bab51e630
refs/heads/master: 01f23e1630d944f7085cd8fd5793e31ea91c03d8
3 changes: 1 addition & 2 deletions trunk/Documentation/scheduler/sched-stats.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ First field is a sched_yield() statistic:
1) # of times sched_yield() was called

Next three are schedule() statistics:
2) This field is a legacy array expiration count field used in the O(1)
scheduler. We kept it for ABI compatibility, but it is always set to zero.
2) # of times we switched to the expired queue and reused it
3) # of times schedule() was called
4) # of times schedule() left the processor idle

Expand Down
4 changes: 2 additions & 2 deletions trunk/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -5112,7 +5112,7 @@ F: kernel/delayacct.c
PERFORMANCE EVENTS SUBSYSTEM
M: Peter Zijlstra <a.p.zijlstra@chello.nl>
M: Paul Mackerras <paulus@samba.org>
M: Ingo Molnar <mingo@redhat.com>
M: Ingo Molnar <mingo@elte.hu>
M: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git perf/core
S: Supported
Expand Down Expand Up @@ -5736,7 +5736,7 @@ S: Maintained
F: drivers/watchdog/sc1200wdt.c

SCHEDULER
M: Ingo Molnar <mingo@redhat.com>
M: Ingo Molnar <mingo@elte.hu>
M: Peter Zijlstra <peterz@infradead.org>
T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git sched/core
S: Maintained
Expand Down
4 changes: 3 additions & 1 deletion trunk/arch/arm/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,9 @@ void cpu_idle(void)
leds_event(led_idle_end);
rcu_idle_exit();
tick_nohz_idle_exit();
schedule_preempt_disabled();
preempt_enable_no_resched();
schedule();
preempt_disable();
}
}

Expand Down
7 changes: 7 additions & 0 deletions trunk/arch/arm/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,13 @@ asmlinkage void __cpuinit secondary_start_kernel(void)
*/
percpu_timer_setup();

while (!cpu_active(cpu))
cpu_relax();

/*
* cpu_active bit is set, so it's safe to enalbe interrupts
* now.
*/
local_irq_enable();
local_fiq_enable();

Expand Down
4 changes: 3 additions & 1 deletion trunk/arch/avr32/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ void cpu_idle(void)
cpu_idle_sleep();
rcu_idle_exit();
tick_nohz_idle_exit();
schedule_preempt_disabled();
preempt_enable_no_resched();
schedule();
preempt_disable();
}
}

Expand Down
4 changes: 3 additions & 1 deletion trunk/arch/blackfin/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ void cpu_idle(void)
idle();
rcu_idle_exit();
tick_nohz_idle_exit();
schedule_preempt_disabled();
preempt_enable_no_resched();
schedule();
preempt_disable();
}
}

Expand Down
4 changes: 3 additions & 1 deletion trunk/arch/cris/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,9 @@ void cpu_idle (void)
idle = default_idle;
idle();
}
schedule_preempt_disabled();
preempt_enable_no_resched();
schedule();
preempt_disable();
}
}

Expand Down
4 changes: 3 additions & 1 deletion trunk/arch/frv/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ void cpu_idle(void)
idle();
}

schedule_preempt_disabled();
preempt_enable_no_resched();
schedule();
preempt_disable();
}
}

Expand Down
4 changes: 3 additions & 1 deletion trunk/arch/h8300/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ void cpu_idle(void)
while (1) {
while (!need_resched())
idle();
schedule_preempt_disabled();
preempt_enable_no_resched();
schedule();
preempt_disable();
}
}

Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/hexagon/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ void __cpuinit start_secondary(void)
printk(KERN_INFO "%s cpu %d\n", __func__, current_thread_info()->cpu);

set_cpu_online(cpu, true);
while (!cpumask_test_cpu(cpu, cpu_active_mask))
cpu_relax();
local_irq_enable();

cpu_idle();
Expand Down
4 changes: 3 additions & 1 deletion trunk/arch/ia64/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,9 @@ cpu_idle (void)
normal_xtp();
#endif
}
schedule_preempt_disabled();
preempt_enable_no_resched();
schedule();
preempt_disable();
check_pgt_cache();
if (cpu_is_offline(cpu))
play_dead();
Expand Down
4 changes: 3 additions & 1 deletion trunk/arch/m32r/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ void cpu_idle (void)

idle();
}
schedule_preempt_disabled();
preempt_enable_no_resched();
schedule();
preempt_disable();
}
}

Expand Down
4 changes: 3 additions & 1 deletion trunk/arch/m68k/kernel/process_mm.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ void cpu_idle(void)
while (1) {
while (!need_resched())
idle();
schedule_preempt_disabled();
preempt_enable_no_resched();
schedule();
preempt_disable();
}
}

Expand Down
4 changes: 3 additions & 1 deletion trunk/arch/m68k/kernel/process_no.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ void cpu_idle(void)
/* endless idle loop with no priority at all */
while (1) {
idle();
schedule_preempt_disabled();
preempt_enable_no_resched();
schedule();
preempt_disable();
}
}

Expand Down
4 changes: 3 additions & 1 deletion trunk/arch/microblaze/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ void cpu_idle(void)
rcu_idle_exit();
tick_nohz_idle_exit();

schedule_preempt_disabled();
preempt_enable_no_resched();
schedule();
preempt_disable();
check_pgt_cache();
}
}
Expand Down
4 changes: 3 additions & 1 deletion trunk/arch/mips/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ void __noreturn cpu_idle(void)
#endif
rcu_idle_exit();
tick_nohz_idle_exit();
schedule_preempt_disabled();
preempt_enable_no_resched();
schedule();
preempt_disable();
}
}

Expand Down
4 changes: 3 additions & 1 deletion trunk/arch/mn10300/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,9 @@ void cpu_idle(void)
idle();
}

schedule_preempt_disabled();
preempt_enable_no_resched();
schedule();
preempt_disable();
}
}

Expand Down
4 changes: 3 additions & 1 deletion trunk/arch/parisc/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ void cpu_idle(void)
while (1) {
while (!need_resched())
barrier();
schedule_preempt_disabled();
preempt_enable_no_resched();
schedule();
preempt_disable();
check_pgt_cache();
}
}
Expand Down
8 changes: 4 additions & 4 deletions trunk/arch/powerpc/kernel/idle.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,11 @@ void cpu_idle(void)
ppc64_runlatch_on();
rcu_idle_exit();
tick_nohz_idle_exit();
if (cpu_should_die()) {
sched_preempt_enable_no_resched();
preempt_enable_no_resched();
if (cpu_should_die())
cpu_die();
}
schedule_preempt_disabled();
schedule();
preempt_disable();
}
}

Expand Down
8 changes: 6 additions & 2 deletions trunk/arch/powerpc/platforms/iseries/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,9 @@ static void iseries_shared_idle(void)
if (hvlpevent_is_pending())
process_iSeries_events();

schedule_preempt_disabled();
preempt_enable_no_resched();
schedule();
preempt_disable();
}
}

Expand Down Expand Up @@ -613,7 +615,9 @@ static void iseries_dedicated_idle(void)
ppc64_runlatch_on();
rcu_idle_exit();
tick_nohz_idle_exit();
schedule_preempt_disabled();
preempt_enable_no_resched();
schedule();
preempt_disable();
}
}

Expand Down
4 changes: 3 additions & 1 deletion trunk/arch/s390/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@ void cpu_idle(void)
tick_nohz_idle_exit();
if (test_thread_flag(TIF_MCCK_PENDING))
s390_handle_mcck();
schedule_preempt_disabled();
preempt_enable_no_resched();
schedule();
preempt_disable();
}
}

Expand Down
6 changes: 6 additions & 0 deletions trunk/arch/s390/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,12 @@ int __cpuinit start_secondary(void *cpuvoid)
S390_lowcore.restart_psw.addr =
PSW_ADDR_AMODE | (unsigned long) psw_restart_int_handler;
__ctl_set_bit(0, 28); /* Enable lowcore protection */
/*
* Wait until the cpu which brought this one up marked it
* active before enabling interrupts.
*/
while (!cpumask_test_cpu(smp_processor_id(), cpu_active_mask))
cpu_relax();
local_irq_enable();
/* cpu_idle will call schedule for us */
cpu_idle();
Expand Down
4 changes: 3 additions & 1 deletion trunk/arch/score/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ void __noreturn cpu_idle(void)
while (!need_resched())
barrier();

schedule_preempt_disabled();
preempt_enable_no_resched();
schedule();
preempt_disable();
}
}

Expand Down
4 changes: 3 additions & 1 deletion trunk/arch/sh/kernel/idle.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@ void cpu_idle(void)

rcu_idle_exit();
tick_nohz_idle_exit();
schedule_preempt_disabled();
preempt_enable_no_resched();
schedule();
preempt_disable();
}
}

Expand Down
8 changes: 6 additions & 2 deletions trunk/arch/sparc/kernel/process_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@ void cpu_idle(void)
while (!need_resched())
cpu_relax();
}
schedule_preempt_disabled();
preempt_enable_no_resched();
schedule();
preempt_disable();
check_pgt_cache();
}
}
Expand All @@ -136,7 +138,9 @@ void cpu_idle(void)
while (!need_resched())
cpu_relax();
}
schedule_preempt_disabled();
preempt_enable_no_resched();
schedule();
preempt_disable();
check_pgt_cache();
}
}
Expand Down
10 changes: 6 additions & 4 deletions trunk/arch/sparc/kernel/process_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,15 @@ void cpu_idle(void)
rcu_idle_exit();
tick_nohz_idle_exit();

preempt_enable_no_resched();

#ifdef CONFIG_HOTPLUG_CPU
if (cpu_is_offline(cpu)) {
sched_preempt_enable_no_resched();
if (cpu_is_offline(cpu))
cpu_play_dead();
}
#endif
schedule_preempt_disabled();

schedule();
preempt_disable();
}
}

Expand Down
4 changes: 3 additions & 1 deletion trunk/arch/tile/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ void cpu_idle(void)
}
rcu_idle_exit();
tick_nohz_idle_exit();
schedule_preempt_disabled();
preempt_enable_no_resched();
schedule();
preempt_disable();
}
}

Expand Down
8 changes: 6 additions & 2 deletions trunk/arch/x86/include/asm/timer.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,14 @@ DECLARE_PER_CPU(unsigned long long, cyc2ns_offset);

static inline unsigned long long __cycles_2_ns(unsigned long long cyc)
{
unsigned long long quot;
unsigned long long rem;
int cpu = smp_processor_id();
unsigned long long ns = per_cpu(cyc2ns_offset, cpu);
ns += mult_frac(cyc, per_cpu(cyc2ns, cpu),
(1UL << CYC2NS_SCALE_FACTOR));
quot = (cyc >> CYC2NS_SCALE_FACTOR);
rem = cyc & ((1ULL << CYC2NS_SCALE_FACTOR) - 1);
ns += quot * per_cpu(cyc2ns, cpu) +
((rem * per_cpu(cyc2ns, cpu)) >> CYC2NS_SCALE_FACTOR);
return ns;
}

Expand Down
4 changes: 3 additions & 1 deletion trunk/arch/x86/kernel/process_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@ void cpu_idle(void)
}
rcu_idle_exit();
tick_nohz_idle_exit();
schedule_preempt_disabled();
preempt_enable_no_resched();
schedule();
preempt_disable();
}
}

Expand Down
4 changes: 3 additions & 1 deletion trunk/arch/x86/kernel/process_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,9 @@ void cpu_idle(void)
}

tick_nohz_idle_exit();
schedule_preempt_disabled();
preempt_enable_no_resched();
schedule();
preempt_disable();
}
}

Expand Down
Loading

0 comments on commit e3334a4

Please sign in to comment.