Re: [PATCH 2/2] rcu/tree_plugin: don't handle the case of 'all' CPU range

2021-04-20 Thread Yury Norov
On Tue, Apr 20, 2021 at 01:18:40PM +0300, Andy Shevchenko wrote:
> On Mon, Apr 19, 2021 at 05:01:31PM -0700, Yury Norov wrote:
> > The 'all' semantics is now supported by the bitmap_parselist() so we can
> > drop supporting it as a special case in RCU code. This patch does not
> > add any functional changes for existing users.
> 
> > -   if (!strcasecmp(str, "all"))/* legacy: use "0-N" instead */
> 
> Perhaps move comment as well to new location.

I actually wanted to remove this comment. The reason is that 'all' is
verbose, clear and proven to be useful for at least RCU. In v2 I'll
mention it explicitly in commit comment.


Re: [PATCH 2/2] rcu/tree_plugin: don't handle the case of 'all' CPU range

2021-04-20 Thread Andy Shevchenko
On Mon, Apr 19, 2021 at 05:01:31PM -0700, Yury Norov wrote:
> The 'all' semantics is now supported by the bitmap_parselist() so we can
> drop supporting it as a special case in RCU code. This patch does not
> add any functional changes for existing users.

> - if (!strcasecmp(str, "all"))/* legacy: use "0-N" instead */

Perhaps move comment as well to new location.

-- 
With Best Regards,
Andy Shevchenko




[PATCH 2/2] rcu/tree_plugin: don't handle the case of 'all' CPU range

2021-04-19 Thread Yury Norov
The 'all' semantics is now supported by the bitmap_parselist() so we can
drop supporting it as a special case in RCU code. This patch does not
add any functional changes for existing users.

Signed-off-by: Yury Norov 
---
 kernel/rcu/tree_plugin.h | 9 +++--
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
index 464b16132866..334eaf4d561f 100644
--- a/kernel/rcu/tree_plugin.h
+++ b/kernel/rcu/tree_plugin.h
@@ -1511,13 +1511,10 @@ static void rcu_cleanup_after_idle(void)
 static int __init rcu_nocb_setup(char *str)
 {
alloc_bootmem_cpumask_var(_nocb_mask);
-   if (!strcasecmp(str, "all"))/* legacy: use "0-N" instead */
+   if (cpulist_parse(str, rcu_nocb_mask)) {
+   pr_warn("rcu_nocbs= bad CPU range, all CPUs set\n");
cpumask_setall(rcu_nocb_mask);
-   else
-   if (cpulist_parse(str, rcu_nocb_mask)) {
-   pr_warn("rcu_nocbs= bad CPU range, all CPUs set\n");
-   cpumask_setall(rcu_nocb_mask);
-   }
+   }
return 1;
 }
 __setup("rcu_nocbs=", rcu_nocb_setup);
-- 
2.25.1