projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[PATCH] uml: mostly const a structure
[powerpc.git]
/
kernel
/
sched.c
diff --git
a/kernel/sched.c
b/kernel/sched.c
index
8a0afb9
..
cca93cc
100644
(file)
--- a/
kernel/sched.c
+++ b/
kernel/sched.c
@@
-1567,6
+1567,7
@@
int fastcall wake_up_state(struct task_struct *p, unsigned int state)
return try_to_wake_up(p, state, 0);
}
return try_to_wake_up(p, state, 0);
}
+static void task_running_tick(struct rq *rq, struct task_struct *p);
/*
* Perform scheduler related setup for a newly forked process p.
* p is forked by current.
/*
* Perform scheduler related setup for a newly forked process p.
* p is forked by current.
@@
-1627,7
+1628,7
@@
void fastcall sched_fork(struct task_struct *p, int clone_flags)
* runqueue lock is not a problem.
*/
current->time_slice = 1;
* runqueue lock is not a problem.
*/
current->time_slice = 1;
-
scheduler_tick(
);
+
task_running_tick(cpu_rq(cpu), current
);
}
local_irq_enable();
put_cpu();
}
local_irq_enable();
put_cpu();
@@
-3429,6
+3430,8
@@
asmlinkage void __sched schedule(void)
"%s/0x%08x/%d\n",
current->comm, preempt_count(), current->pid);
debug_show_held_locks(current);
"%s/0x%08x/%d\n",
current->comm, preempt_count(), current->pid);
debug_show_held_locks(current);
+ if (irqs_disabled())
+ print_irqtrace_events(current);
dump_stack();
}
profile_hit(SCHED_PROFILING, __builtin_return_address(0));
dump_stack();
}
profile_hit(SCHED_PROFILING, __builtin_return_address(0));
@@
-4614,15
+4617,6
@@
asmlinkage long sys_sched_yield(void)
return 0;
}
return 0;
}
-static inline int __resched_legal(int expected_preempt_count)
-{
- if (unlikely(preempt_count() != expected_preempt_count))
- return 0;
- if (unlikely(system_state != SYSTEM_RUNNING))
- return 0;
- return 1;
-}
-
static void __cond_resched(void)
{
#ifdef CONFIG_DEBUG_SPINLOCK_SLEEP
static void __cond_resched(void)
{
#ifdef CONFIG_DEBUG_SPINLOCK_SLEEP
@@
-4642,7
+4636,8
@@
static void __cond_resched(void)
int __sched cond_resched(void)
{
int __sched cond_resched(void)
{
- if (need_resched() && __resched_legal(0)) {
+ if (need_resched() && !(preempt_count() & PREEMPT_ACTIVE) &&
+ system_state == SYSTEM_RUNNING) {
__cond_resched();
return 1;
}
__cond_resched();
return 1;
}
@@
-4668,7
+4663,7
@@
int cond_resched_lock(spinlock_t *lock)
ret = 1;
spin_lock(lock);
}
ret = 1;
spin_lock(lock);
}
- if (need_resched() &&
__resched_legal(1)
) {
+ if (need_resched() &&
system_state == SYSTEM_RUNNING
) {
spin_release(&lock->dep_map, 1, _THIS_IP_);
_raw_spin_unlock(lock);
preempt_enable_no_resched();
spin_release(&lock->dep_map, 1, _THIS_IP_);
_raw_spin_unlock(lock);
preempt_enable_no_resched();
@@
-4684,7
+4679,7
@@
int __sched cond_resched_softirq(void)
{
BUG_ON(!in_softirq());
{
BUG_ON(!in_softirq());
- if (need_resched() &&
__resched_legal(0)
) {
+ if (need_resched() &&
system_state == SYSTEM_RUNNING
) {
raw_local_irq_disable();
_local_bh_enable();
raw_local_irq_enable();
raw_local_irq_disable();
_local_bh_enable();
raw_local_irq_enable();
@@
-5605,7
+5600,7
@@
static void cpu_attach_domain(struct sched_domain *sd, int cpu)
}
/* cpus with isolated domains */
}
/* cpus with isolated domains */
-static cpumask_t
__cpuinitdata
cpu_isolated_map = CPU_MASK_NONE;
+static cpumask_t cpu_isolated_map = CPU_MASK_NONE;
/* Setup the mask of cpus configured for isolated domains */
static int __init isolated_cpu_setup(char *str)
/* Setup the mask of cpus configured for isolated domains */
static int __init isolated_cpu_setup(char *str)
@@
-6870,7
+6865,7
@@
void __init sched_init_smp(void)
lock_cpu_hotplug();
arch_init_sched_domains(&cpu_online_map);
lock_cpu_hotplug();
arch_init_sched_domains(&cpu_online_map);
- cpus_andnot(non_isolated_cpus, cpu_
onlin
e_map, cpu_isolated_map);
+ cpus_andnot(non_isolated_cpus, cpu_
possibl
e_map, cpu_isolated_map);
if (cpus_empty(non_isolated_cpus))
cpu_set(smp_processor_id(), non_isolated_cpus);
unlock_cpu_hotplug();
if (cpus_empty(non_isolated_cpus))
cpu_set(smp_processor_id(), non_isolated_cpus);
unlock_cpu_hotplug();
@@
-6977,6
+6972,8
@@
void __might_sleep(char *file, int line)
printk("in_atomic():%d, irqs_disabled():%d\n",
in_atomic(), irqs_disabled());
debug_show_held_locks(current);
printk("in_atomic():%d, irqs_disabled():%d\n",
in_atomic(), irqs_disabled());
debug_show_held_locks(current);
+ if (irqs_disabled())
+ print_irqtrace_events(current);
dump_stack();
}
#endif
dump_stack();
}
#endif