projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'drm-patches' of master.kernel.org:/pub/scm/linux/kernel/git/airlied...
[cascardo/linux.git]
/
kernel
/
sched.c
diff --git
a/kernel/sched.c
b/kernel/sched.c
index
b81ed87
..
cca93cc
100644
(file)
--- a/
kernel/sched.c
+++ b/
kernel/sched.c
@@
-4617,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
@@
-4645,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;
}
@@
-4671,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();
@@
-4687,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();
@@
-5608,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)
@@
-6873,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();