Skip to content

Commit

Permalink
powerpc: fix HOTPLUG error in rcutorture
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
zhouzhouyi-hub authored and chantra committed Oct 20, 2022
1 parent 87e7989 commit 37c0e4d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion arch/powerpc/kernel/sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <linux/smp.h>
#include <linux/percpu.h>
#include <linux/init.h>
#include <linux/tick.h>
#include <linux/sched.h>
#include <linux/export.h>
#include <linux/nodemask.h>
Expand All @@ -21,6 +22,7 @@
#include <asm/firmware.h>
#include <asm/idle.h>
#include <asm/svm.h>
#include "../../../kernel/time/tick-internal.h"

#include "cacheinfo.h"
#include "setup.h"
Expand Down Expand Up @@ -1151,7 +1153,11 @@ static int __init topology_init(void)
* CPU. For instance, the boot cpu might never be valid
* for hotplugging.
*/
if (smp_ops && smp_ops->cpu_offline_self)
if (smp_ops && smp_ops->cpu_offline_self
#ifdef CONFIG_NO_HZ_FULL
&& !(tick_nohz_full_running && tick_do_timer_cpu == cpu)
#endif
)
c->hotpluggable = 1;
#endif

Expand Down

0 comments on commit 37c0e4d

Please sign in to comment.