Merge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: softlockup: fix NMI hangs due to lock race - 2.6.26-rc regression rcupreempt: remove export of rcu_batches_completed_bh cpuset: limit the input of cpuset.sched_relax_domain_level
This commit is contained in:
commit
1f1e2ce8a5
|
@ -542,7 +542,7 @@ otherwise initial value -1 that indicates the cpuset has no request.
|
||||||
2 : search cores in a package.
|
2 : search cores in a package.
|
||||||
3 : search cpus in a node [= system wide on non-NUMA system]
|
3 : search cpus in a node [= system wide on non-NUMA system]
|
||||||
( 4 : search nodes in a chunk of node [on NUMA system] )
|
( 4 : search nodes in a chunk of node [on NUMA system] )
|
||||||
( 5~ : search system wide [on NUMA system])
|
( 5 : search system wide [on NUMA system] )
|
||||||
|
|
||||||
This file is per-cpuset and affect the sched domain where the cpuset
|
This file is per-cpuset and affect the sched domain where the cpuset
|
||||||
belongs to. Therefore if the flag 'sched_load_balance' of a cpuset
|
belongs to. Therefore if the flag 'sched_load_balance' of a cpuset
|
||||||
|
|
|
@ -1037,8 +1037,8 @@ int current_cpuset_is_being_rebound(void)
|
||||||
|
|
||||||
static int update_relax_domain_level(struct cpuset *cs, s64 val)
|
static int update_relax_domain_level(struct cpuset *cs, s64 val)
|
||||||
{
|
{
|
||||||
if ((int)val < 0)
|
if (val < -1 || val >= SD_LV_MAX)
|
||||||
val = -1;
|
return -EINVAL;
|
||||||
|
|
||||||
if (val != cs->relax_domain_level) {
|
if (val != cs->relax_domain_level) {
|
||||||
cs->relax_domain_level = val;
|
cs->relax_domain_level = val;
|
||||||
|
|
|
@ -217,8 +217,6 @@ long rcu_batches_completed(void)
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(rcu_batches_completed);
|
EXPORT_SYMBOL_GPL(rcu_batches_completed);
|
||||||
|
|
||||||
EXPORT_SYMBOL_GPL(rcu_batches_completed_bh);
|
|
||||||
|
|
||||||
void __rcu_read_lock(void)
|
void __rcu_read_lock(void)
|
||||||
{
|
{
|
||||||
int idx;
|
int idx;
|
||||||
|
|
|
@ -6879,7 +6879,12 @@ static int default_relax_domain_level = -1;
|
||||||
|
|
||||||
static int __init setup_relax_domain_level(char *str)
|
static int __init setup_relax_domain_level(char *str)
|
||||||
{
|
{
|
||||||
default_relax_domain_level = simple_strtoul(str, NULL, 0);
|
unsigned long val;
|
||||||
|
|
||||||
|
val = simple_strtoul(str, NULL, 0);
|
||||||
|
if (val < SD_LV_MAX)
|
||||||
|
default_relax_domain_level = val;
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
__setup("relax_domain_level=", setup_relax_domain_level);
|
__setup("relax_domain_level=", setup_relax_domain_level);
|
||||||
|
|
|
@ -49,12 +49,17 @@ static unsigned long get_timestamp(int this_cpu)
|
||||||
return cpu_clock(this_cpu) >> 30LL; /* 2^30 ~= 10^9 */
|
return cpu_clock(this_cpu) >> 30LL; /* 2^30 ~= 10^9 */
|
||||||
}
|
}
|
||||||
|
|
||||||
void touch_softlockup_watchdog(void)
|
static void __touch_softlockup_watchdog(void)
|
||||||
{
|
{
|
||||||
int this_cpu = raw_smp_processor_id();
|
int this_cpu = raw_smp_processor_id();
|
||||||
|
|
||||||
__raw_get_cpu_var(touch_timestamp) = get_timestamp(this_cpu);
|
__raw_get_cpu_var(touch_timestamp) = get_timestamp(this_cpu);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void touch_softlockup_watchdog(void)
|
||||||
|
{
|
||||||
|
__raw_get_cpu_var(touch_timestamp) = 0;
|
||||||
|
}
|
||||||
EXPORT_SYMBOL(touch_softlockup_watchdog);
|
EXPORT_SYMBOL(touch_softlockup_watchdog);
|
||||||
|
|
||||||
void touch_all_softlockup_watchdogs(void)
|
void touch_all_softlockup_watchdogs(void)
|
||||||
|
@ -80,7 +85,7 @@ void softlockup_tick(void)
|
||||||
unsigned long now;
|
unsigned long now;
|
||||||
|
|
||||||
if (touch_timestamp == 0) {
|
if (touch_timestamp == 0) {
|
||||||
touch_softlockup_watchdog();
|
__touch_softlockup_watchdog();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -95,7 +100,7 @@ void softlockup_tick(void)
|
||||||
|
|
||||||
/* do not print during early bootup: */
|
/* do not print during early bootup: */
|
||||||
if (unlikely(system_state != SYSTEM_RUNNING)) {
|
if (unlikely(system_state != SYSTEM_RUNNING)) {
|
||||||
touch_softlockup_watchdog();
|
__touch_softlockup_watchdog();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -214,7 +219,7 @@ static int watchdog(void *__bind_cpu)
|
||||||
sched_setscheduler(current, SCHED_FIFO, ¶m);
|
sched_setscheduler(current, SCHED_FIFO, ¶m);
|
||||||
|
|
||||||
/* initialize timestamp */
|
/* initialize timestamp */
|
||||||
touch_softlockup_watchdog();
|
__touch_softlockup_watchdog();
|
||||||
|
|
||||||
set_current_state(TASK_INTERRUPTIBLE);
|
set_current_state(TASK_INTERRUPTIBLE);
|
||||||
/*
|
/*
|
||||||
|
@ -223,7 +228,7 @@ static int watchdog(void *__bind_cpu)
|
||||||
* debug-printout triggers in softlockup_tick().
|
* debug-printout triggers in softlockup_tick().
|
||||||
*/
|
*/
|
||||||
while (!kthread_should_stop()) {
|
while (!kthread_should_stop()) {
|
||||||
touch_softlockup_watchdog();
|
__touch_softlockup_watchdog();
|
||||||
schedule();
|
schedule();
|
||||||
|
|
||||||
if (kthread_should_stop())
|
if (kthread_should_stop())
|
||||||
|
|
Loading…
Reference in New Issue