public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] rcuscale: fix building with RCU_TINY
@ 2023-06-09 12:05 Arnd Bergmann
  2023-06-09 22:51 ` Paul E. McKenney
  0 siblings, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2023-06-09 12:05 UTC (permalink / raw)
  To: Paul E. McKenney, Frederic Weisbecker, Neeraj Upadhyay,
	Joel Fernandes, Josh Triplett, Boqun Feng, Davidlohr Bueso
  Cc: Arnd Bergmann, Steven Rostedt, Mathieu Desnoyers, Lai Jiangshan,
	Zqiang, Mukesh Ojha, Nicolas Saenz Julienne, Zhen Lei, Qiuxu Zhuo,
	rcu, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

Both the CONFIG_TASKS_RCU and CONFIG_TASKS_RUDE_RCU options
are broken when RCU_TINY is enabled as well, as some functions
are missing a declaration.

In file included from kernel/rcu/update.c:649:
kernel/rcu/tasks.h:1271:21: error: no previous prototype for 'get_rcu_tasks_rude_gp_kthread' [-Werror=missing-prototypes]
 1271 | struct task_struct *get_rcu_tasks_rude_gp_kthread(void)
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/rcu/rcuscale.c:330:27: error: 'get_rcu_tasks_rude_gp_kthread' undeclared here (not in a function); did you mean 'get_rcu_tasks_trace_gp_kthread'?
  330 |         .rso_gp_kthread = get_rcu_tasks_rude_gp_kthread,
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                           get_rcu_tasks_trace_gp_kthread

In file included from /home/arnd/arm-soc/kernel/rcu/update.c:649:
kernel/rcu/tasks.h:1113:21: error: no previous prototype for 'get_rcu_tasks_gp_kthread' [-Werror=missing-prototypes]
 1113 | struct task_struct *get_rcu_tasks_gp_kthread(void)
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~

Also, building with CONFIG_TASKS_RUDE_RCU but not CONFIG_TASKS_RCU is
broken because of some missing stub functions:

kernel/rcu/rcuscale.c:322:27: error: 'tasks_scale_read_lock' undeclared here (not in a function); did you mean 'srcu_scale_read_lock'?
  322 |         .readlock       = tasks_scale_read_lock,
      |                           ^~~~~~~~~~~~~~~~~~~~~
      |                           srcu_scale_read_lock
kernel/rcu/rcuscale.c:323:27: error: 'tasks_scale_read_unlock' undeclared here (not in a function); did you mean 'srcu_scale_read_unlock'?
  323 |         .readunlock     = tasks_scale_read_unlock,
      |                           ^~~~~~~~~~~~~~~~~~~~~~~
      |                           srcu_scale_read_unlock

Move the declarations outside of the RCU_TINY #ifdef and duplicate the
shared stub functions to address all of the above.

Fixes: 88d7ff818f0ce ("rcuscale: Add RCU Tasks Rude testing")
Fixes: 755f1c5eb416b ("rcuscale: Measure RCU Tasks Trace grace-period kthread CPU time")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 kernel/rcu/rcu.h      | 14 ++++++++------
 kernel/rcu/rcuscale.c | 13 +++++++++++--
 2 files changed, 19 insertions(+), 8 deletions(-)

diff --git a/kernel/rcu/rcu.h b/kernel/rcu/rcu.h
index 9829d8161b213..5befd8780dcd3 100644
--- a/kernel/rcu/rcu.h
+++ b/kernel/rcu/rcu.h
@@ -505,18 +505,20 @@ void rcu_async_relax(void);
 void rcupdate_announce_bootup_oddness(void);
 #ifdef CONFIG_TASKS_RCU_GENERIC
 void show_rcu_tasks_gp_kthreads(void);
-# ifdef CONFIG_TASKS_RCU
-struct task_struct *get_rcu_tasks_gp_kthread(void);
-# endif // # ifdef CONFIG_TASKS_RCU
-# ifdef CONFIG_TASKS_RUDE_RCU
-struct task_struct *get_rcu_tasks_rude_gp_kthread(void);
-# endif // # ifdef CONFIG_TASKS_RUDE_RCU
 #else /* #ifdef CONFIG_TASKS_RCU_GENERIC */
 static inline void show_rcu_tasks_gp_kthreads(void) {}
 #endif /* #else #ifdef CONFIG_TASKS_RCU_GENERIC */
 void rcu_request_urgent_qs_task(struct task_struct *t);
 #endif /* #else #ifdef CONFIG_TINY_RCU */
 
+#ifdef CONFIG_TASKS_RCU
+struct task_struct *get_rcu_tasks_gp_kthread(void);
+#endif // # ifdef CONFIG_TASKS_RCU
+
+#ifdef CONFIG_TASKS_RUDE_RCU
+struct task_struct *get_rcu_tasks_rude_gp_kthread(void);
+#endif // # ifdef CONFIG_TASKS_RUDE_RCU
+
 #define RCU_SCHEDULER_INACTIVE	0
 #define RCU_SCHEDULER_INIT	1
 #define RCU_SCHEDULER_RUNNING	2
diff --git a/kernel/rcu/rcuscale.c b/kernel/rcu/rcuscale.c
index 5ce3b4e7ce711..a0eae19007088 100644
--- a/kernel/rcu/rcuscale.c
+++ b/kernel/rcu/rcuscale.c
@@ -316,11 +316,20 @@ static struct rcu_scale_ops tasks_ops = {
  * Definitions for RCU-tasks-rude scalability testing.
  */
 
+static int tasks_rude_scale_read_lock(void)
+{
+	return 0;
+}
+
+static void tasks_rude_scale_read_unlock(int idx)
+{
+}
+
 static struct rcu_scale_ops tasks_rude_ops = {
 	.ptype		= RCU_TASKS_RUDE_FLAVOR,
 	.init		= rcu_sync_scale_init,
-	.readlock	= tasks_scale_read_lock,
-	.readunlock	= tasks_scale_read_unlock,
+	.readlock	= tasks_rude_scale_read_lock,
+	.readunlock	= tasks_rude_scale_read_unlock,
 	.get_gp_seq	= rcu_no_completed,
 	.gp_diff	= rcu_seq_diff,
 	.async		= call_rcu_tasks_rude,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] rcuscale: fix building with RCU_TINY
  2023-06-09 12:05 [PATCH] rcuscale: fix building with RCU_TINY Arnd Bergmann
@ 2023-06-09 22:51 ` Paul E. McKenney
  2023-06-13 14:42   ` Randy Dunlap
  0 siblings, 1 reply; 4+ messages in thread
From: Paul E. McKenney @ 2023-06-09 22:51 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Frederic Weisbecker, Neeraj Upadhyay, Joel Fernandes,
	Josh Triplett, Boqun Feng, Davidlohr Bueso, Arnd Bergmann,
	Steven Rostedt, Mathieu Desnoyers, Lai Jiangshan, Zqiang,
	Mukesh Ojha, Nicolas Saenz Julienne, Zhen Lei, Qiuxu Zhuo, rcu,
	linux-kernel

On Fri, Jun 09, 2023 at 02:05:14PM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> Both the CONFIG_TASKS_RCU and CONFIG_TASKS_RUDE_RCU options
> are broken when RCU_TINY is enabled as well, as some functions
> are missing a declaration.
> 
> In file included from kernel/rcu/update.c:649:
> kernel/rcu/tasks.h:1271:21: error: no previous prototype for 'get_rcu_tasks_rude_gp_kthread' [-Werror=missing-prototypes]
>  1271 | struct task_struct *get_rcu_tasks_rude_gp_kthread(void)
>       |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> kernel/rcu/rcuscale.c:330:27: error: 'get_rcu_tasks_rude_gp_kthread' undeclared here (not in a function); did you mean 'get_rcu_tasks_trace_gp_kthread'?
>   330 |         .rso_gp_kthread = get_rcu_tasks_rude_gp_kthread,
>       |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>       |                           get_rcu_tasks_trace_gp_kthread
> 
> In file included from /home/arnd/arm-soc/kernel/rcu/update.c:649:
> kernel/rcu/tasks.h:1113:21: error: no previous prototype for 'get_rcu_tasks_gp_kthread' [-Werror=missing-prototypes]
>  1113 | struct task_struct *get_rcu_tasks_gp_kthread(void)
>       |                     ^~~~~~~~~~~~~~~~~~~~~~~~
> 
> Also, building with CONFIG_TASKS_RUDE_RCU but not CONFIG_TASKS_RCU is
> broken because of some missing stub functions:
> 
> kernel/rcu/rcuscale.c:322:27: error: 'tasks_scale_read_lock' undeclared here (not in a function); did you mean 'srcu_scale_read_lock'?
>   322 |         .readlock       = tasks_scale_read_lock,
>       |                           ^~~~~~~~~~~~~~~~~~~~~
>       |                           srcu_scale_read_lock
> kernel/rcu/rcuscale.c:323:27: error: 'tasks_scale_read_unlock' undeclared here (not in a function); did you mean 'srcu_scale_read_unlock'?
>   323 |         .readunlock     = tasks_scale_read_unlock,
>       |                           ^~~~~~~~~~~~~~~~~~~~~~~
>       |                           srcu_scale_read_unlock
> 
> Move the declarations outside of the RCU_TINY #ifdef and duplicate the
> shared stub functions to address all of the above.
> 
> Fixes: 88d7ff818f0ce ("rcuscale: Add RCU Tasks Rude testing")
> Fixes: 755f1c5eb416b ("rcuscale: Measure RCU Tasks Trace grace-period kthread CPU time")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Queued and pushed, thank you!

I clearly need to improve my Kconfig coverage here...

							Thanx, Paul

> ---
>  kernel/rcu/rcu.h      | 14 ++++++++------
>  kernel/rcu/rcuscale.c | 13 +++++++++++--
>  2 files changed, 19 insertions(+), 8 deletions(-)
> 
> diff --git a/kernel/rcu/rcu.h b/kernel/rcu/rcu.h
> index 9829d8161b213..5befd8780dcd3 100644
> --- a/kernel/rcu/rcu.h
> +++ b/kernel/rcu/rcu.h
> @@ -505,18 +505,20 @@ void rcu_async_relax(void);
>  void rcupdate_announce_bootup_oddness(void);
>  #ifdef CONFIG_TASKS_RCU_GENERIC
>  void show_rcu_tasks_gp_kthreads(void);
> -# ifdef CONFIG_TASKS_RCU
> -struct task_struct *get_rcu_tasks_gp_kthread(void);
> -# endif // # ifdef CONFIG_TASKS_RCU
> -# ifdef CONFIG_TASKS_RUDE_RCU
> -struct task_struct *get_rcu_tasks_rude_gp_kthread(void);
> -# endif // # ifdef CONFIG_TASKS_RUDE_RCU
>  #else /* #ifdef CONFIG_TASKS_RCU_GENERIC */
>  static inline void show_rcu_tasks_gp_kthreads(void) {}
>  #endif /* #else #ifdef CONFIG_TASKS_RCU_GENERIC */
>  void rcu_request_urgent_qs_task(struct task_struct *t);
>  #endif /* #else #ifdef CONFIG_TINY_RCU */
>  
> +#ifdef CONFIG_TASKS_RCU
> +struct task_struct *get_rcu_tasks_gp_kthread(void);
> +#endif // # ifdef CONFIG_TASKS_RCU
> +
> +#ifdef CONFIG_TASKS_RUDE_RCU
> +struct task_struct *get_rcu_tasks_rude_gp_kthread(void);
> +#endif // # ifdef CONFIG_TASKS_RUDE_RCU
> +
>  #define RCU_SCHEDULER_INACTIVE	0
>  #define RCU_SCHEDULER_INIT	1
>  #define RCU_SCHEDULER_RUNNING	2
> diff --git a/kernel/rcu/rcuscale.c b/kernel/rcu/rcuscale.c
> index 5ce3b4e7ce711..a0eae19007088 100644
> --- a/kernel/rcu/rcuscale.c
> +++ b/kernel/rcu/rcuscale.c
> @@ -316,11 +316,20 @@ static struct rcu_scale_ops tasks_ops = {
>   * Definitions for RCU-tasks-rude scalability testing.
>   */
>  
> +static int tasks_rude_scale_read_lock(void)
> +{
> +	return 0;
> +}
> +
> +static void tasks_rude_scale_read_unlock(int idx)
> +{
> +}
> +
>  static struct rcu_scale_ops tasks_rude_ops = {
>  	.ptype		= RCU_TASKS_RUDE_FLAVOR,
>  	.init		= rcu_sync_scale_init,
> -	.readlock	= tasks_scale_read_lock,
> -	.readunlock	= tasks_scale_read_unlock,
> +	.readlock	= tasks_rude_scale_read_lock,
> +	.readunlock	= tasks_rude_scale_read_unlock,
>  	.get_gp_seq	= rcu_no_completed,
>  	.gp_diff	= rcu_seq_diff,
>  	.async		= call_rcu_tasks_rude,
> -- 
> 2.39.2
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] rcuscale: fix building with RCU_TINY
  2023-06-09 22:51 ` Paul E. McKenney
@ 2023-06-13 14:42   ` Randy Dunlap
  2023-06-13 16:25     ` Paul E. McKenney
  0 siblings, 1 reply; 4+ messages in thread
From: Randy Dunlap @ 2023-06-13 14:42 UTC (permalink / raw)
  To: paulmck, Arnd Bergmann
  Cc: Frederic Weisbecker, Neeraj Upadhyay, Joel Fernandes,
	Josh Triplett, Boqun Feng, Davidlohr Bueso, Arnd Bergmann,
	Steven Rostedt, Mathieu Desnoyers, Lai Jiangshan, Zqiang,
	Mukesh Ojha, Nicolas Saenz Julienne, Zhen Lei, Qiuxu Zhuo, rcu,
	linux-kernel

Paul-

On 6/9/23 15:51, Paul E. McKenney wrote:
> On Fri, Jun 09, 2023 at 02:05:14PM +0200, Arnd Bergmann wrote:
>> From: Arnd Bergmann <arnd@arndb.de>
>>
>> Both the CONFIG_TASKS_RCU and CONFIG_TASKS_RUDE_RCU options
>> are broken when RCU_TINY is enabled as well, as some functions
>> are missing a declaration.
>>
>> In file included from kernel/rcu/update.c:649:
>> kernel/rcu/tasks.h:1271:21: error: no previous prototype for 'get_rcu_tasks_rude_gp_kthread' [-Werror=missing-prototypes]
>>  1271 | struct task_struct *get_rcu_tasks_rude_gp_kthread(void)
>>       |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> kernel/rcu/rcuscale.c:330:27: error: 'get_rcu_tasks_rude_gp_kthread' undeclared here (not in a function); did you mean 'get_rcu_tasks_trace_gp_kthread'?
>>   330 |         .rso_gp_kthread = get_rcu_tasks_rude_gp_kthread,
>>       |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>       |                           get_rcu_tasks_trace_gp_kthread
>>
>> In file included from /home/arnd/arm-soc/kernel/rcu/update.c:649:
>> kernel/rcu/tasks.h:1113:21: error: no previous prototype for 'get_rcu_tasks_gp_kthread' [-Werror=missing-prototypes]
>>  1113 | struct task_struct *get_rcu_tasks_gp_kthread(void)
>>       |                     ^~~~~~~~~~~~~~~~~~~~~~~~
>>
>> Also, building with CONFIG_TASKS_RUDE_RCU but not CONFIG_TASKS_RCU is
>> broken because of some missing stub functions:
>>
>> kernel/rcu/rcuscale.c:322:27: error: 'tasks_scale_read_lock' undeclared here (not in a function); did you mean 'srcu_scale_read_lock'?
>>   322 |         .readlock       = tasks_scale_read_lock,
>>       |                           ^~~~~~~~~~~~~~~~~~~~~
>>       |                           srcu_scale_read_lock
>> kernel/rcu/rcuscale.c:323:27: error: 'tasks_scale_read_unlock' undeclared here (not in a function); did you mean 'srcu_scale_read_unlock'?
>>   323 |         .readunlock     = tasks_scale_read_unlock,
>>       |                           ^~~~~~~~~~~~~~~~~~~~~~~
>>       |                           srcu_scale_read_unlock
>>
>> Move the declarations outside of the RCU_TINY #ifdef and duplicate the
>> shared stub functions to address all of the above.
>>
>> Fixes: 88d7ff818f0ce ("rcuscale: Add RCU Tasks Rude testing")
>> Fixes: 755f1c5eb416b ("rcuscale: Measure RCU Tasks Trace grace-period kthread CPU time")
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> 
> Queued and pushed, thank you!
> 
> I clearly need to improve my Kconfig coverage here...
> 

Pushed where. I'm still seeing this build error in linux-next 20230613.

Thanks.

> 
>> ---
>>  kernel/rcu/rcu.h      | 14 ++++++++------
>>  kernel/rcu/rcuscale.c | 13 +++++++++++--
>>  2 files changed, 19 insertions(+), 8 deletions(-)
>>
>> diff --git a/kernel/rcu/rcu.h b/kernel/rcu/rcu.h
>> index 9829d8161b213..5befd8780dcd3 100644
>> --- a/kernel/rcu/rcu.h
>> +++ b/kernel/rcu/rcu.h
>> @@ -505,18 +505,20 @@ void rcu_async_relax(void);
>>  void rcupdate_announce_bootup_oddness(void);
>>  #ifdef CONFIG_TASKS_RCU_GENERIC
>>  void show_rcu_tasks_gp_kthreads(void);
>> -# ifdef CONFIG_TASKS_RCU
>> -struct task_struct *get_rcu_tasks_gp_kthread(void);
>> -# endif // # ifdef CONFIG_TASKS_RCU
>> -# ifdef CONFIG_TASKS_RUDE_RCU
>> -struct task_struct *get_rcu_tasks_rude_gp_kthread(void);
>> -# endif // # ifdef CONFIG_TASKS_RUDE_RCU
>>  #else /* #ifdef CONFIG_TASKS_RCU_GENERIC */
>>  static inline void show_rcu_tasks_gp_kthreads(void) {}
>>  #endif /* #else #ifdef CONFIG_TASKS_RCU_GENERIC */
>>  void rcu_request_urgent_qs_task(struct task_struct *t);
>>  #endif /* #else #ifdef CONFIG_TINY_RCU */
>>  
>> +#ifdef CONFIG_TASKS_RCU
>> +struct task_struct *get_rcu_tasks_gp_kthread(void);
>> +#endif // # ifdef CONFIG_TASKS_RCU
>> +
>> +#ifdef CONFIG_TASKS_RUDE_RCU
>> +struct task_struct *get_rcu_tasks_rude_gp_kthread(void);
>> +#endif // # ifdef CONFIG_TASKS_RUDE_RCU
>> +
>>  #define RCU_SCHEDULER_INACTIVE	0
>>  #define RCU_SCHEDULER_INIT	1
>>  #define RCU_SCHEDULER_RUNNING	2
>> diff --git a/kernel/rcu/rcuscale.c b/kernel/rcu/rcuscale.c
>> index 5ce3b4e7ce711..a0eae19007088 100644
>> --- a/kernel/rcu/rcuscale.c
>> +++ b/kernel/rcu/rcuscale.c
>> @@ -316,11 +316,20 @@ static struct rcu_scale_ops tasks_ops = {
>>   * Definitions for RCU-tasks-rude scalability testing.
>>   */
>>  
>> +static int tasks_rude_scale_read_lock(void)
>> +{
>> +	return 0;
>> +}
>> +
>> +static void tasks_rude_scale_read_unlock(int idx)
>> +{
>> +}
>> +
>>  static struct rcu_scale_ops tasks_rude_ops = {
>>  	.ptype		= RCU_TASKS_RUDE_FLAVOR,
>>  	.init		= rcu_sync_scale_init,
>> -	.readlock	= tasks_scale_read_lock,
>> -	.readunlock	= tasks_scale_read_unlock,
>> +	.readlock	= tasks_rude_scale_read_lock,
>> +	.readunlock	= tasks_rude_scale_read_unlock,
>>  	.get_gp_seq	= rcu_no_completed,
>>  	.gp_diff	= rcu_seq_diff,
>>  	.async		= call_rcu_tasks_rude,
>> -- 
>> 2.39.2
>>

-- 
~Randy

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] rcuscale: fix building with RCU_TINY
  2023-06-13 14:42   ` Randy Dunlap
@ 2023-06-13 16:25     ` Paul E. McKenney
  0 siblings, 0 replies; 4+ messages in thread
From: Paul E. McKenney @ 2023-06-13 16:25 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: Arnd Bergmann, Frederic Weisbecker, Neeraj Upadhyay,
	Joel Fernandes, Josh Triplett, Boqun Feng, Davidlohr Bueso,
	Arnd Bergmann, Steven Rostedt, Mathieu Desnoyers, Lai Jiangshan,
	Zqiang, Mukesh Ojha, Nicolas Saenz Julienne, Zhen Lei, Qiuxu Zhuo,
	rcu, linux-kernel

On Tue, Jun 13, 2023 at 07:42:17AM -0700, Randy Dunlap wrote:
> Paul-
> 
> On 6/9/23 15:51, Paul E. McKenney wrote:
> > On Fri, Jun 09, 2023 at 02:05:14PM +0200, Arnd Bergmann wrote:
> >> From: Arnd Bergmann <arnd@arndb.de>
> >>
> >> Both the CONFIG_TASKS_RCU and CONFIG_TASKS_RUDE_RCU options
> >> are broken when RCU_TINY is enabled as well, as some functions
> >> are missing a declaration.
> >>
> >> In file included from kernel/rcu/update.c:649:
> >> kernel/rcu/tasks.h:1271:21: error: no previous prototype for 'get_rcu_tasks_rude_gp_kthread' [-Werror=missing-prototypes]
> >>  1271 | struct task_struct *get_rcu_tasks_rude_gp_kthread(void)
> >>       |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >> kernel/rcu/rcuscale.c:330:27: error: 'get_rcu_tasks_rude_gp_kthread' undeclared here (not in a function); did you mean 'get_rcu_tasks_trace_gp_kthread'?
> >>   330 |         .rso_gp_kthread = get_rcu_tasks_rude_gp_kthread,
> >>       |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >>       |                           get_rcu_tasks_trace_gp_kthread
> >>
> >> In file included from /home/arnd/arm-soc/kernel/rcu/update.c:649:
> >> kernel/rcu/tasks.h:1113:21: error: no previous prototype for 'get_rcu_tasks_gp_kthread' [-Werror=missing-prototypes]
> >>  1113 | struct task_struct *get_rcu_tasks_gp_kthread(void)
> >>       |                     ^~~~~~~~~~~~~~~~~~~~~~~~
> >>
> >> Also, building with CONFIG_TASKS_RUDE_RCU but not CONFIG_TASKS_RCU is
> >> broken because of some missing stub functions:
> >>
> >> kernel/rcu/rcuscale.c:322:27: error: 'tasks_scale_read_lock' undeclared here (not in a function); did you mean 'srcu_scale_read_lock'?
> >>   322 |         .readlock       = tasks_scale_read_lock,
> >>       |                           ^~~~~~~~~~~~~~~~~~~~~
> >>       |                           srcu_scale_read_lock
> >> kernel/rcu/rcuscale.c:323:27: error: 'tasks_scale_read_unlock' undeclared here (not in a function); did you mean 'srcu_scale_read_unlock'?
> >>   323 |         .readunlock     = tasks_scale_read_unlock,
> >>       |                           ^~~~~~~~~~~~~~~~~~~~~~~
> >>       |                           srcu_scale_read_unlock
> >>
> >> Move the declarations outside of the RCU_TINY #ifdef and duplicate the
> >> shared stub functions to address all of the above.
> >>
> >> Fixes: 88d7ff818f0ce ("rcuscale: Add RCU Tasks Rude testing")
> >> Fixes: 755f1c5eb416b ("rcuscale: Measure RCU Tasks Trace grace-period kthread CPU time")
> >> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > 
> > Queued and pushed, thank you!
> > 
> > I clearly need to improve my Kconfig coverage here...
> 
> Pushed where. I'm still seeing this build error in linux-next 20230613.

To rcu/dev.  There have been some testing bottlenecks, but it should
reach rcu/next soon.

							Thanx, Paul

> Thanks.
> 
> > 
> >> ---
> >>  kernel/rcu/rcu.h      | 14 ++++++++------
> >>  kernel/rcu/rcuscale.c | 13 +++++++++++--
> >>  2 files changed, 19 insertions(+), 8 deletions(-)
> >>
> >> diff --git a/kernel/rcu/rcu.h b/kernel/rcu/rcu.h
> >> index 9829d8161b213..5befd8780dcd3 100644
> >> --- a/kernel/rcu/rcu.h
> >> +++ b/kernel/rcu/rcu.h
> >> @@ -505,18 +505,20 @@ void rcu_async_relax(void);
> >>  void rcupdate_announce_bootup_oddness(void);
> >>  #ifdef CONFIG_TASKS_RCU_GENERIC
> >>  void show_rcu_tasks_gp_kthreads(void);
> >> -# ifdef CONFIG_TASKS_RCU
> >> -struct task_struct *get_rcu_tasks_gp_kthread(void);
> >> -# endif // # ifdef CONFIG_TASKS_RCU
> >> -# ifdef CONFIG_TASKS_RUDE_RCU
> >> -struct task_struct *get_rcu_tasks_rude_gp_kthread(void);
> >> -# endif // # ifdef CONFIG_TASKS_RUDE_RCU
> >>  #else /* #ifdef CONFIG_TASKS_RCU_GENERIC */
> >>  static inline void show_rcu_tasks_gp_kthreads(void) {}
> >>  #endif /* #else #ifdef CONFIG_TASKS_RCU_GENERIC */
> >>  void rcu_request_urgent_qs_task(struct task_struct *t);
> >>  #endif /* #else #ifdef CONFIG_TINY_RCU */
> >>  
> >> +#ifdef CONFIG_TASKS_RCU
> >> +struct task_struct *get_rcu_tasks_gp_kthread(void);
> >> +#endif // # ifdef CONFIG_TASKS_RCU
> >> +
> >> +#ifdef CONFIG_TASKS_RUDE_RCU
> >> +struct task_struct *get_rcu_tasks_rude_gp_kthread(void);
> >> +#endif // # ifdef CONFIG_TASKS_RUDE_RCU
> >> +
> >>  #define RCU_SCHEDULER_INACTIVE	0
> >>  #define RCU_SCHEDULER_INIT	1
> >>  #define RCU_SCHEDULER_RUNNING	2
> >> diff --git a/kernel/rcu/rcuscale.c b/kernel/rcu/rcuscale.c
> >> index 5ce3b4e7ce711..a0eae19007088 100644
> >> --- a/kernel/rcu/rcuscale.c
> >> +++ b/kernel/rcu/rcuscale.c
> >> @@ -316,11 +316,20 @@ static struct rcu_scale_ops tasks_ops = {
> >>   * Definitions for RCU-tasks-rude scalability testing.
> >>   */
> >>  
> >> +static int tasks_rude_scale_read_lock(void)
> >> +{
> >> +	return 0;
> >> +}
> >> +
> >> +static void tasks_rude_scale_read_unlock(int idx)
> >> +{
> >> +}
> >> +
> >>  static struct rcu_scale_ops tasks_rude_ops = {
> >>  	.ptype		= RCU_TASKS_RUDE_FLAVOR,
> >>  	.init		= rcu_sync_scale_init,
> >> -	.readlock	= tasks_scale_read_lock,
> >> -	.readunlock	= tasks_scale_read_unlock,
> >> +	.readlock	= tasks_rude_scale_read_lock,
> >> +	.readunlock	= tasks_rude_scale_read_unlock,
> >>  	.get_gp_seq	= rcu_no_completed,
> >>  	.gp_diff	= rcu_seq_diff,
> >>  	.async		= call_rcu_tasks_rude,
> >> -- 
> >> 2.39.2
> >>
> 
> -- 
> ~Randy

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-06-13 16:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-09 12:05 [PATCH] rcuscale: fix building with RCU_TINY Arnd Bergmann
2023-06-09 22:51 ` Paul E. McKenney
2023-06-13 14:42   ` Randy Dunlap
2023-06-13 16:25     ` 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