* [PATCH RESEND -next] torture: avoid build error without CONFIG_RCU_TORTURE_TEST
@ 2020-02-13 11:53 Hongbo Yao
2020-02-13 13:05 ` Paul E. McKenney
0 siblings, 1 reply; 2+ messages in thread
From: Hongbo Yao @ 2020-02-13 11:53 UTC (permalink / raw)
To: paulmck; +Cc: linux-kernel, yaohongbo, chenzhou10, dave, josh
If TORTURE_TEST=y(selected by TORTURE_LOCK_TEST) and RCU_TORTURE_TEST=n,
the following error is seen while building kernel/torture.c
kernel/torture.c: In function torture_onoff:
kernel/torture.c:239:3: error: implicit declaration of function
rcutorture_sched_setaffinity; did you mean __NR_ia32_sched_setaffinity?
[-Werror=implicit-function-declaration]
rcutorture_sched_setaffinity(current->pid, cpumask_of(0));
Using sched_setaffnity() instead of rcutorture_sched_setaffinity() to
avoid the error.
Reported-by: Hulk Robot <hulkci@huawei.com>
Fixes: bc3db9afb849 ("EXP: rcutorture hack to force CPU hotplug onto CPU 0")
Signed-off-by: Hongbo Yao <yaohongbo@huawei.com>
---
kernel/torture.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/torture.c b/kernel/torture.c
index b29adec50e01..834214cbd1cd 100644
--- a/kernel/torture.c
+++ b/kernel/torture.c
@@ -236,7 +236,7 @@ torture_onoff(void *arg)
schedule_timeout_interruptible(HZ / 10);
continue;
}
- rcutorture_sched_setaffinity(current->pid, cpumask_of(0));
+ sched_setaffinity(current->pid, cpumask_of(0));
cpu = (torture_random(&rand) >> 4) % (maxcpu + 1);
if (!torture_offline(cpu,
&n_offline_attempts, &n_offline_successes,
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH RESEND -next] torture: avoid build error without CONFIG_RCU_TORTURE_TEST
2020-02-13 11:53 [PATCH RESEND -next] torture: avoid build error without CONFIG_RCU_TORTURE_TEST Hongbo Yao
@ 2020-02-13 13:05 ` Paul E. McKenney
0 siblings, 0 replies; 2+ messages in thread
From: Paul E. McKenney @ 2020-02-13 13:05 UTC (permalink / raw)
To: Hongbo Yao; +Cc: linux-kernel, chenzhou10, dave, josh
On Thu, Feb 13, 2020 at 07:53:13PM +0800, Hongbo Yao wrote:
> If TORTURE_TEST=y(selected by TORTURE_LOCK_TEST) and RCU_TORTURE_TEST=n,
> the following error is seen while building kernel/torture.c
>
> kernel/torture.c: In function torture_onoff:
> kernel/torture.c:239:3: error: implicit declaration of function
> rcutorture_sched_setaffinity; did you mean __NR_ia32_sched_setaffinity?
> [-Werror=implicit-function-declaration]
> rcutorture_sched_setaffinity(current->pid, cpumask_of(0));
>
> Using sched_setaffnity() instead of rcutorture_sched_setaffinity() to
> avoid the error.
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Fixes: bc3db9afb849 ("EXP: rcutorture hack to force CPU hotplug onto CPU 0")
> Signed-off-by: Hongbo Yao <yaohongbo@huawei.com>
Thank you for finding this!
However, this was due to a debugging commit used to chase a particular
bug (hence the "EXP:" at the beginning of the subject line). Now that
this bug has been fixes (woo-hoo!!!), I will be dropping this commit.
In case you are interested, the fix is here:
97be2ad9946f ("rcu: Make rcu_barrier() account for offline no-CBs CPUs")
Either way, thank you for your testing efforts!
Thanx, Paul
> ---
> kernel/torture.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/torture.c b/kernel/torture.c
> index b29adec50e01..834214cbd1cd 100644
> --- a/kernel/torture.c
> +++ b/kernel/torture.c
> @@ -236,7 +236,7 @@ torture_onoff(void *arg)
> schedule_timeout_interruptible(HZ / 10);
> continue;
> }
> - rcutorture_sched_setaffinity(current->pid, cpumask_of(0));
> + sched_setaffinity(current->pid, cpumask_of(0));
> cpu = (torture_random(&rand) >> 4) % (maxcpu + 1);
> if (!torture_offline(cpu,
> &n_offline_attempts, &n_offline_successes,
> --
> 2.17.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-02-13 13:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-13 11:53 [PATCH RESEND -next] torture: avoid build error without CONFIG_RCU_TORTURE_TEST Hongbo Yao
2020-02-13 13:05 ` Paul E. McKenney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).