[0/8] Misc RCU update for v6.9

Message ID 20240129235646.3171983-1-boqun.feng@gmail.com
Headers
Series Misc RCU update for v6.9 |

Message

Boqun Feng Jan. 29, 2024, 11:56 p.m. UTC
  Hi,

This series contains miscellaneous updates and fixes from RCU v6.9.
You can also find the series at:

	https://github.com/fbq/linux.git rcu-misc.2024.01.29a

The detailed list of the changes:

Frederic Weisbecker (2):
  rcu: Rename jiffies_till_flush to jiffies_lazy_flush
  hrtimer: Report offline hrtimer enqueue

Jiri Wiesner (1):
  clocksource: Skip watchdog check for large watchdog intervals

Joel Fernandes (Google) (1):
  srcu: Improve comments about acceleration leak

Onkarnath (1):
  rcu/sync: remove un-used rcu_sync_enter_start function

Paul E. McKenney (2):
  tsc: Check for sockets instead of CPUs to make code match comment
  rcutorture: Suppress rtort_pipe_count warnings until after stalls

Qais Yousef (1):
  rcu: Provide a boot time parameter to control lazy RCU

 .../admin-guide/kernel-parameters.txt         |  5 ++++
 arch/x86/kernel/tsc.c                         |  2 +-
 include/linux/hrtimer.h                       |  3 ++-
 include/linux/rcu_sync.h                      |  1 -
 kernel/rcu/Kconfig                            | 13 ++++++++++
 kernel/rcu/rcu.h                              |  8 +++---
 kernel/rcu/rcuscale.c                         |  6 ++---
 kernel/rcu/rcutorture.c                       | 13 +++++++---
 kernel/rcu/srcutree.c                         | 24 +++++++++++++++---
 kernel/rcu/sync.c                             | 16 ------------
 kernel/rcu/tree.c                             |  7 +++++-
 kernel/rcu/tree_nocb.h                        | 22 ++++++++--------
 kernel/time/clocksource.c                     | 25 ++++++++++++++++++-
 kernel/time/hrtimer.c                         |  3 +++
 14 files changed, 101 insertions(+), 47 deletions(-)
  

Comments

Paul E. McKenney Feb. 5, 2024, 8:03 p.m. UTC | #1
On Mon, Jan 29, 2024 at 03:56:38PM -0800, Boqun Feng wrote:
> From: "Paul E. McKenney" <paulmck@kernel.org>
> 
> The unsynchronized_tsc() eventually checks num_possible_cpus(), and
> if the system is non-Intel and the number of possible CPUs is greater
> than one, assumes that TSCs are unsynchronized.  This despite the
> comment saying "assume multi socket systems are not synchronized",
> that is, socket rather than CPU.  This behavior was preserved by
> commit 8fbbc4b45ce3 ("x86: merge tsc_init and clocksource code") and
> by the previous relevant commit 7e69f2b1ead2 ("clocksource: Remove the
> update callback").
> 
> The clocksource drivers were added by commit 5d0cf410e94b ("Time: i386
> Clocksource Drivers") back in 2006, and the comment still said "socket"
> rather than "CPU".
> 
> Therefore, bravely (and perhaps foolishly) make the code match the
> comment.
> 
> Note that it is possible to bypass both code and comment by booting
> with tsc=reliable, but this also disables the clocksource watchdog,
> which is undesirable when trust in the TSC is strictly limited.
> 
> Reported-by: Zhengxu Chen <zhxchen17@meta.com>
> Reported-by: Danielle Costantino <dcostantino@meta.com>
> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: Borislav Petkov <bp@alien8.de>
> Cc: Dave Hansen <dave.hansen@linux.intel.com>
> Cc: "H. Peter Anvin" <hpa@zytor.com>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Feng Tang <feng.tang@intel.com>
> Cc: Waiman Long <longman@redhat.com>
> Cc: John Stultz <jstultz@google.com>
> Cc: <x86@kernel.org>

Hello, Boqun,

Please drop this one, as I never got an ack from the maintainers, and
quite possibly for good reason.  ;-)

							Thanx, Paul

> ---
>  arch/x86/kernel/tsc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c
> index 15f97c0abc9d..d45084c6a15e 100644
> --- a/arch/x86/kernel/tsc.c
> +++ b/arch/x86/kernel/tsc.c
> @@ -1287,7 +1287,7 @@ int unsynchronized_tsc(void)
>  	 */
>  	if (boot_cpu_data.x86_vendor != X86_VENDOR_INTEL) {
>  		/* assume multi socket systems are not synchronized: */
> -		if (num_possible_cpus() > 1)
> +		if (nr_online_nodes > 1)
>  			return 1;
>  	}
>  
> -- 
> 2.43.0
>