Skip to content

Commit 3440ee4

Browse files
zhouzhouyi-hubchantra
authored andcommitted
powerpc: fix HOTPLUG error in rcutorture
I think we should avoid torture offline the cpu who do tick timer when nohz full is running. Tested on PPC VM of Open Source Lab of Oregon State University. The test results show that after the fix, the success rate of rcutorture is improved. After: Successes: 40 Failures: 9 Before: Successes: 38 Failures: 11 I examined the console.log and Make.out files one by one, no new compile error or test error is introduced by above fix. Signed-off-by: Zhouyi Zhou <[email protected]>
1 parent 87e7989 commit 3440ee4

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

arch/powerpc/kernel/sysfs.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include <linux/smp.h>
55
#include <linux/percpu.h>
66
#include <linux/init.h>
7+
#include <linux/tick.h>
78
#include <linux/sched.h>
89
#include <linux/export.h>
910
#include <linux/nodemask.h>
@@ -21,6 +22,7 @@
2122
#include <asm/firmware.h>
2223
#include <asm/idle.h>
2324
#include <asm/svm.h>
25+
#include "../../../kernel/time/tick-internal.h"
2426

2527
#include "cacheinfo.h"
2628
#include "setup.h"
@@ -1151,7 +1153,11 @@ static int __init topology_init(void)
11511153
* CPU. For instance, the boot cpu might never be valid
11521154
* for hotplugging.
11531155
*/
1154-
if (smp_ops && smp_ops->cpu_offline_self)
1156+
if (smp_ops && smp_ops->cpu_offline_self
1157+
#ifdef CONFIG_NO_HZ_FULL
1158+
&& !(tick_nohz_full_running && tick_do_timer_cpu == cpu)
1159+
#endif
1160+
)
11551161
c->hotpluggable = 1;
11561162
#endif
11571163

0 commit comments

Comments
 (0)