lkml.org 
[lkml]   [2020]   [May]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 10/10] rcu: Nocb (de)activate through sysfs
On Wed, May 13, 2020 at 06:47:14PM +0200, Frederic Weisbecker wrote:
> Not for merge.
>
> Make nocb toggable for a given CPU using:
> /sys/devices/system/cpu/cpu*/hotplug/nocb
>
> This is only intended for those who want to test this patchset. The real
> interfaces will be cpuset/isolation and rcutorture.

Makes sense!

Speaking of rcutorture, what level of testing has this series undergone?

Thanx, Paul

> Not-Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
> Cc: Paul E. McKenney <paulmck@kernel.org>
> Cc: Josh Triplett <josh@joshtriplett.org>
> Cc: Steven Rostedt <rostedt@goodmis.org>
> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
> Cc: Lai Jiangshan <jiangshanlai@gmail.com>
> Cc: Joel Fernandes <joel@joelfernandes.org>
> ---
> kernel/cpu.c | 23 +++++++++++++++++++++++
> 1 file changed, 23 insertions(+)
>
> diff --git a/kernel/cpu.c b/kernel/cpu.c
> index 2371292f30b0..ac6283dcb897 100644
> --- a/kernel/cpu.c
> +++ b/kernel/cpu.c
> @@ -2208,10 +2208,33 @@ static ssize_t show_cpuhp_fail(struct device *dev,
>
> static DEVICE_ATTR(fail, 0644, show_cpuhp_fail, write_cpuhp_fail);
>
> +static ssize_t write_nocb(struct device *dev,
> + struct device_attribute *attr,
> + const char *buf, size_t count)
> +{
> + int val, ret;
> +
> + ret = kstrtoint(buf, 10, &val);
> + if (ret)
> + return ret;
> +
> + if (val == 0)
> + rcu_nocb_cpu_deoffload(dev->id);
> + else if (val == 1)
> + rcu_nocb_cpu_offload(dev->id);
> + else
> + return -EINVAL;
> +
> + return count;
> +}
> +
> +static DEVICE_ATTR(nocb, 0644, NULL, write_nocb);
> +
> static struct attribute *cpuhp_cpu_attrs[] = {
> &dev_attr_state.attr,
> &dev_attr_target.attr,
> &dev_attr_fail.attr,
> + &dev_attr_nocb.attr,
> NULL
> };
>
> --
> 2.25.0
>

\
 
 \ /
  Last update: 2020-05-13 20:43    [W:0.385 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site