1. 29 Feb, 2024 1 commit
    • Arnd Bergmann's avatar
      tick/sched: Fix build failure for CONFIG_NO_HZ_COMMON=n · a184d983
      Arnd Bergmann authored
      In configurations with CONFIG_TICK_ONESHOT but no CONFIG_NO_HZ or
      CONFIG_HIGH_RES_TIMERS, tick_sched_timer_dying() is stubbed out,
      but still defined as a global function as well:
      
      kernel/time/tick-sched.c:1599:6: error: redefinition of 'tick_sched_timer_dying'
       1599 | void tick_sched_timer_dying(int cpu)
            |      ^
      kernel/time/tick-sched.h:111:20: note: previous definition is here
        111 | static inline void tick_sched_timer_dying(int cpu) { }
            |                    ^
      
      This configuration only appears with ARM CONFIG_ARCH_BCM_MOBILE,
      which should not actually select CONFIG_TICK_ONESHOT.
      
      Adjust the #ifdef for the stub to match the condition for building the
      tick-sched.c file for consistency with the definition and to avoid
      the build regression.
      
      Fixes: 3aedb7fc ("tick/sched: Remove useless oneshot ifdeffery")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Link: https://lore.kernel.org/r/20240228123850.3499024-1-arnd@kernel.org
      a184d983
  2. 26 Feb, 2024 17 commits
  3. 22 Feb, 2024 21 commits
  4. 21 Feb, 2024 1 commit
    • Feng Tang's avatar
      clocksource: Scale the watchdog read retries automatically · 2ed08e4b
      Feng Tang authored
      On a 8-socket server the TSC is wrongly marked as 'unstable' and disabled
      during boot time on about one out of 120 boot attempts:
      
          clocksource: timekeeping watchdog on CPU227: wd-tsc-wd excessive read-back delay of 153560ns vs. limit of 125000ns,
          wd-wd read-back delay only 11440ns, attempt 3, marking tsc unstable
          tsc: Marking TSC unstable due to clocksource watchdog
          TSC found unstable after boot, most likely due to broken BIOS. Use 'tsc=unstable'.
          sched_clock: Marking unstable (119294969739, 159204297)<-(125446229205, -5992055152)
          clocksource: Checking clocksource tsc synchronization from CPU 319 to CPUs 0,99,136,180,210,542,601,896.
          clocksource: Switched to clocksource hpet
      
      The reason is that for platform with a large number of CPUs, there are
      sporadic big or huge read latencies while reading the watchog/clocksource
      during boot or when system is under stress work load, and the frequency and
      maximum value of the latency goes up with the number of online CPUs.
      
      The cCurrent code already has logic to detect and filter such high latency
      case by reading the watchdog twice and checking the two deltas. Due to the
      randomness of the latency, there is a low probabilty that the first delta
      (latency) is big, but the second delta is small and looks valid. The
      watchdog code retries the readouts by default twice, which is not
      necessarily sufficient for systems with a large number of CPUs.
      
      There is a command line parameter 'max_cswd_read_retries' which allows to
      increase the number of retries, but that's not user friendly as it needs to
      be tweaked per system. As the number of required retries is proportional to
      the number of online CPUs, this parameter can be calculated at runtime.
      
      Scale and enlarge the number of retries according to the number of online
      CPUs and remove the command line parameter completely.
      
      [ tglx: Massaged change log and comments ]
      Signed-off-by: default avatarFeng Tang <feng.tang@intel.com>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Tested-by: default avatarJin Wang <jin1.wang@intel.com>
      Tested-by: default avatarPaul E. McKenney <paulmck@kernel.org>
      Reviewed-by: default avatarWaiman Long <longman@redhat.com>
      Reviewed-by: default avatarPaul E. McKenney <paulmck@kernel.org>
      Link: https://lore.kernel.org/r/20240221060859.1027450-1-feng.tang@intel.com
      2ed08e4b