torture: Forgive -EBUSY from boottime CPU-hotplug operations
During boot, CPU hotplug is often disabled, for example by PCI probing. On large systems that take substantial time to boot, this can result in spurious RCU_HOTPLUG errors. This commit therefore forgives any boottime -EBUSY CPU-hotplug failures by adjusting counters to pretend that the corresponding attempt never happened. A non-splat record of the failed attempt is emitted to the console with the added string "(-EBUSY forgiven during boot)". Signed-off-by: Paul E. McKenney <paulmck@kernel.org>alistair/sensors
parent
435508095a
commit
a59ee765a6
|
@ -84,6 +84,7 @@ bool torture_offline(int cpu, long *n_offl_attempts, long *n_offl_successes,
|
||||||
{
|
{
|
||||||
unsigned long delta;
|
unsigned long delta;
|
||||||
int ret;
|
int ret;
|
||||||
|
char *s;
|
||||||
unsigned long starttime;
|
unsigned long starttime;
|
||||||
|
|
||||||
if (!cpu_online(cpu) || !cpu_is_hotpluggable(cpu))
|
if (!cpu_online(cpu) || !cpu_is_hotpluggable(cpu))
|
||||||
|
@ -99,10 +100,16 @@ bool torture_offline(int cpu, long *n_offl_attempts, long *n_offl_successes,
|
||||||
(*n_offl_attempts)++;
|
(*n_offl_attempts)++;
|
||||||
ret = cpu_down(cpu);
|
ret = cpu_down(cpu);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
|
s = "";
|
||||||
|
if (!rcu_inkernel_boot_has_ended() && ret == -EBUSY) {
|
||||||
|
// PCI probe frequently disables hotplug during boot.
|
||||||
|
(*n_offl_attempts)--;
|
||||||
|
s = " (-EBUSY forgiven during boot)";
|
||||||
|
}
|
||||||
if (verbose)
|
if (verbose)
|
||||||
pr_alert("%s" TORTURE_FLAG
|
pr_alert("%s" TORTURE_FLAG
|
||||||
"torture_onoff task: offline %d failed: errno %d\n",
|
"torture_onoff task: offline %d failed%s: errno %d\n",
|
||||||
torture_type, cpu, ret);
|
torture_type, cpu, s, ret);
|
||||||
} else {
|
} else {
|
||||||
if (verbose > 1)
|
if (verbose > 1)
|
||||||
pr_alert("%s" TORTURE_FLAG
|
pr_alert("%s" TORTURE_FLAG
|
||||||
|
@ -137,6 +144,7 @@ bool torture_online(int cpu, long *n_onl_attempts, long *n_onl_successes,
|
||||||
{
|
{
|
||||||
unsigned long delta;
|
unsigned long delta;
|
||||||
int ret;
|
int ret;
|
||||||
|
char *s;
|
||||||
unsigned long starttime;
|
unsigned long starttime;
|
||||||
|
|
||||||
if (cpu_online(cpu) || !cpu_is_hotpluggable(cpu))
|
if (cpu_online(cpu) || !cpu_is_hotpluggable(cpu))
|
||||||
|
@ -150,10 +158,16 @@ bool torture_online(int cpu, long *n_onl_attempts, long *n_onl_successes,
|
||||||
(*n_onl_attempts)++;
|
(*n_onl_attempts)++;
|
||||||
ret = cpu_up(cpu);
|
ret = cpu_up(cpu);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
|
s = "";
|
||||||
|
if (!rcu_inkernel_boot_has_ended() && ret == -EBUSY) {
|
||||||
|
// PCI probe frequently disables hotplug during boot.
|
||||||
|
(*n_onl_attempts)--;
|
||||||
|
s = " (-EBUSY forgiven during boot)";
|
||||||
|
}
|
||||||
if (verbose)
|
if (verbose)
|
||||||
pr_alert("%s" TORTURE_FLAG
|
pr_alert("%s" TORTURE_FLAG
|
||||||
"torture_onoff task: online %d failed: errno %d\n",
|
"torture_onoff task: online %d failed%s: errno %d\n",
|
||||||
torture_type, cpu, ret);
|
torture_type, cpu, s, ret);
|
||||||
} else {
|
} else {
|
||||||
if (verbose > 1)
|
if (verbose > 1)
|
||||||
pr_alert("%s" TORTURE_FLAG
|
pr_alert("%s" TORTURE_FLAG
|
||||||
|
|
Loading…
Reference in New Issue