linux-stable/drivers/clocksource
Linus Torvalds ed3b7923a8 Scheduler changes for v6.5:
- Scheduler SMP load-balancer improvements:
 
     - Avoid unnecessary migrations within SMT domains on hybrid systems.
 
       Problem:
 
         On hybrid CPU systems, (processors with a mixture of higher-frequency
 	SMT cores and lower-frequency non-SMT cores), under the old code
 	lower-priority CPUs pulled tasks from the higher-priority cores if
 	more than one SMT sibling was busy - resulting in many unnecessary
 	task migrations.
 
       Solution:
 
         The new code improves the load balancer to recognize SMT cores with more
         than one busy sibling and allows lower-priority CPUs to pull tasks, which
         avoids superfluous migrations and lets lower-priority cores inspect all SMT
         siblings for the busiest queue.
 
     - Implement the 'runnable boosting' feature in the EAS balancer: consider CPU
       contention in frequency, EAS max util & load-balance busiest CPU selection.
 
       This improves CPU utilization for certain workloads, while leaves other key
       workloads unchanged.
 
 - Scheduler infrastructure improvements:
 
     - Rewrite the scheduler topology setup code by consolidating it
       into the build_sched_topology() helper function and building
       it dynamically on the fly.
 
     - Resolve the local_clock() vs. noinstr complications by rewriting
       the code: provide separate sched_clock_noinstr() and
       local_clock_noinstr() functions to be used in instrumentation code,
       and make sure it is all instrumentation-safe.
 
 - Fixes:
 
     - Fix a kthread_park() race with wait_woken()
 
     - Fix misc wait_task_inactive() bugs unearthed by the -rt merge:
        - Fix UP PREEMPT bug by unifying the SMP and UP implementations.
        - Fix task_struct::saved_state handling.
 
     - Fix various rq clock update bugs, unearthed by turning on the rq clock
       debugging code.
 
     - Fix the PSI WINDOW_MIN_US trigger limit, which was easy to trigger by
       creating enough cgroups, by removing the warnign and restricting
       window size triggers to PSI file write-permission or CAP_SYS_RESOURCE.
 
     - Propagate SMT flags in the topology when removing degenerate domain
 
     - Fix grub_reclaim() calculation bug in the deadline scheduler code
 
     - Avoid resetting the min update period when it is unnecessary, in
       psi_trigger_destroy().
 
     - Don't balance a task to its current running CPU in load_balance(),
       which was possible on certain NUMA topologies with overlapping
       groups.
 
     - Fix the sched-debug printing of rq->nr_uninterruptible
 
 - Cleanups:
 
     - Address various -Wmissing-prototype warnings, as a preparation
       to (maybe) enable this warning in the future.
 
     - Remove unused code
 
     - Mark more functions __init
 
     - Fix shadow-variable warnings
 
 Signed-off-by: Ingo Molnar <mingo@kernel.org>
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCgAvFiEEBpT5eoXrXCwVQwEKEnMQ0APhK1gFAmSatWQRHG1pbmdvQGtl
 cm5lbC5vcmcACgkQEnMQ0APhK1j62xAAuGOx1LcDfRGC6WGQzp1zOdlsVQtnDvlS
 qL58zYSHgizprpVQ3j87SBaG4CHCdvd2Bo36yW0lNZS4nd203qdq7fkrMb3hPP/w
 egUQUzMegf5fF6BWldKeMjuHSt+twFQz/ZAKK8iSbAir6CHNAqbNst1oL0i/+Tyk
 o33hBs1hT5tnbFb1NSVZkX4k+qT3LzTW4K2QgjjGtkScr6yHh2BdEVefyigWOjdo
 9s02d00ll9a2r+F5txlN7Dnw6TN7rmTXGMOJU5bZvBE90/anNiAorMXHJdEKCyUR
 u9+JtBdJWiCplGa/tSRcxT16ZW1VdtTnd9q66TDhXREd2UNDFqBEyg5Wl77K4Tlf
 vKFajmj/to+cTbuv6m6TVR+zyXpdEpdL6F04P44U3qiJvDobBqeDNKHHIqpmbHXl
 AXUXcPWTVAzXX1Ce5M+BeAgTBQ1T7C5tELILrTNQHJvO1s9VVBRFZ/l65Ps4vu7T
 wIZ781IFuopk0zWqHovNvgKrJ7oFmOQQZFttQEe8n6nafkjI7u+IZ8FayiGaUMRr
 4GawFGUCEdYh8z9qyslGKe8Q/Rphfk6hxMFRYUJpDmubQ0PkMeDjDGq77jDGl1PF
 VqwSDEyOaBJs7Gqf/mem00JtzBmXhkhm1SEjggHMI2IQbr/eeBXoLQOn3CDapO/N
 PiDbtX760ic=
 =EWQA
 -----END PGP SIGNATURE-----

Merge tag 'sched-core-2023-06-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull scheduler updates from Ingo Molnar:
 "Scheduler SMP load-balancer improvements:

   - Avoid unnecessary migrations within SMT domains on hybrid systems.

     Problem:

        On hybrid CPU systems, (processors with a mixture of
        higher-frequency SMT cores and lower-frequency non-SMT cores),
        under the old code lower-priority CPUs pulled tasks from the
        higher-priority cores if more than one SMT sibling was busy -
        resulting in many unnecessary task migrations.

     Solution:

        The new code improves the load balancer to recognize SMT cores
        with more than one busy sibling and allows lower-priority CPUs
        to pull tasks, which avoids superfluous migrations and lets
        lower-priority cores inspect all SMT siblings for the busiest
        queue.

   - Implement the 'runnable boosting' feature in the EAS balancer:
     consider CPU contention in frequency, EAS max util & load-balance
     busiest CPU selection.

     This improves CPU utilization for certain workloads, while leaves
     other key workloads unchanged.

  Scheduler infrastructure improvements:

   - Rewrite the scheduler topology setup code by consolidating it into
     the build_sched_topology() helper function and building it
     dynamically on the fly.

   - Resolve the local_clock() vs. noinstr complications by rewriting
     the code: provide separate sched_clock_noinstr() and
     local_clock_noinstr() functions to be used in instrumentation code,
     and make sure it is all instrumentation-safe.

  Fixes:

   - Fix a kthread_park() race with wait_woken()

   - Fix misc wait_task_inactive() bugs unearthed by the -rt merge:
       - Fix UP PREEMPT bug by unifying the SMP and UP implementations
       - Fix task_struct::saved_state handling

   - Fix various rq clock update bugs, unearthed by turning on the rq
     clock debugging code.

   - Fix the PSI WINDOW_MIN_US trigger limit, which was easy to trigger
     by creating enough cgroups, by removing the warnign and restricting
     window size triggers to PSI file write-permission or
     CAP_SYS_RESOURCE.

   - Propagate SMT flags in the topology when removing degenerate domain

   - Fix grub_reclaim() calculation bug in the deadline scheduler code

   - Avoid resetting the min update period when it is unnecessary, in
     psi_trigger_destroy().

   - Don't balance a task to its current running CPU in load_balance(),
     which was possible on certain NUMA topologies with overlapping
     groups.

   - Fix the sched-debug printing of rq->nr_uninterruptible

  Cleanups:

   - Address various -Wmissing-prototype warnings, as a preparation to
     (maybe) enable this warning in the future.

   - Remove unused code

   - Mark more functions __init

   - Fix shadow-variable warnings"

* tag 'sched-core-2023-06-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (50 commits)
  sched/core: Avoid multiple calling update_rq_clock() in __cfsb_csd_unthrottle()
  sched/core: Avoid double calling update_rq_clock() in __balance_push_cpu_stop()
  sched/core: Fixed missing rq clock update before calling set_rq_offline()
  sched/deadline: Update GRUB description in the documentation
  sched/deadline: Fix bandwidth reclaim equation in GRUB
  sched/wait: Fix a kthread_park race with wait_woken()
  sched/topology: Mark set_sched_topology() __init
  sched/fair: Rename variable cpu_util eff_util
  arm64/arch_timer: Fix MMIO byteswap
  sched/fair, cpufreq: Introduce 'runnable boosting'
  sched/fair: Refactor CPU utilization functions
  cpuidle: Use local_clock_noinstr()
  sched/clock: Provide local_clock_noinstr()
  x86/tsc: Provide sched_clock_noinstr()
  clocksource: hyper-v: Provide noinstr sched_clock()
  clocksource: hyper-v: Adjust hv_read_tsc_page_tsc() to avoid special casing U64_MAX
  x86/vdso: Fix gettimeofday masking
  math64: Always inline u128 version of mul_u64_u64_shr()
  s390/time: Provide sched_clock_noinstr()
  loongarch: Provide noinstr sched_clock_read()
  ...
2023-06-27 14:03:21 -07:00
..
acpi_pm.c clocksource: Verify HPET and PMTMR when TSC unverified 2023-02-02 14:23:02 -08:00
arc_timer.c clocksource/drivers/arc_timer: Eliminate redefined macro error 2021-10-16 22:15:01 +02:00
arm_arch_timer.c arm64/arch_timer: Fix MMIO byteswap 2023-06-06 10:19:51 +02:00
arm_global_timer.c clocksource/drivers/arm_global_timer: Remove duplicated argument in arm_global_timer 2021-06-16 17:33:04 +02:00
armv7m_systick.c
asm9260_timer.c
bcm2835_timer.c clocksource: Replace setup_irq() by request_irq() 2020-02-27 12:15:24 +01:00
bcm_kona_timer.c clocksource/drivers/bcm_kona: Convert to SPDX identifier 2022-05-18 11:08:59 +02:00
clksrc-dbx500-prcmu.c timekeeping, clocksource: Fix various typos in comments 2021-03-22 23:06:48 +01:00
clksrc_st_lpc.c
clps711x-timer.c
dummy_timer.c
dw_apb_timer.c clocksource: dw_apb_timer: Make CPU-affiliation being optional 2020-05-23 00:02:41 +02:00
dw_apb_timer_of.c clocksource/drivers/dw_apb_timer_of: Fix probe failure 2021-12-10 17:46:54 +01:00
em_sti.c clocksource: remove MODULE_LICENSE in non-modules 2023-04-13 13:13:51 -07:00
exynos_mct.c clocksource/drivers/exynos_mct: Explicitly return 0 for shared timer 2023-04-24 16:56:13 +02:00
hyperv_timer.c Scheduler changes for v6.5: 2023-06-27 14:03:21 -07:00
i8253.c
ingenic-ost.c clocksource/drivers/ingenic-ost: Define pm functions properly in platform_driver struct 2022-12-01 11:56:36 +01:00
ingenic-sysost.c clocksource/drivers/ingenic: Use bitfield macro helpers 2021-08-14 02:44:35 +02:00
ingenic-timer.c clocksource/drivers/ingenic-timer: Use pm_sleep_ptr() macro 2023-06-19 16:17:42 +02:00
jcore-pit.c clocksource/drivers/jcore: Convert to SPDX identifier 2022-05-18 11:08:59 +02:00
Kconfig clocksource/drivers/loongson1: Move PWM timer to clocksource framework 2023-06-19 17:07:03 +02:00
Makefile clocksource/drivers/loongson1: Move PWM timer to clocksource framework 2023-06-19 17:07:03 +02:00
mips-gic-timer.c clocksource/drivers/mips-gic-timer: Convert to SPDX identifier 2022-05-18 11:08:59 +02:00
mmio.c
mps2-timer.c clocksource/drivers/mps2-timer: Use semicolons rather than commas to separate statements 2020-10-01 10:07:26 +02:00
mxs_timer.c clocksource/drivers/mxs_timer: Add missing semicolon when DEBUG is defined 2021-01-18 22:28:59 +01:00
nomadik-mtu.c clocksource/drivers/nomadik-mtu: Handle 32kHz clock 2020-07-23 16:57:43 +02:00
numachip.c
renesas-ostm.c clocksource/drivers/renesas-ostm: Add support for RZ/V2L SoC 2022-09-07 10:12:56 +02:00
samsung_pwm_timer.c clocksource/drivers/samsung_pwm: Constify source IO memory 2021-06-04 10:12:13 +02:00
scx200_hrt.c
sh_cmt.c clocksource: remove MODULE_LICENSE in non-modules 2023-04-13 13:13:51 -07:00
sh_mtu2.c Timekeeping and clocksource/event driver updates the second batch: 2023-04-29 10:24:30 -07:00
sh_tmu.c clocksource: remove MODULE_LICENSE in non-modules 2023-04-13 13:13:51 -07:00
timer-armada-370-xp.c clocksource/drivers/armada-370-xp: Convert to SPDX identifier 2022-05-18 11:08:59 +02:00
timer-atmel-pit.c
timer-atmel-st.c clocksource/drivers/atmel-st: Remove useless 'status' 2020-04-15 10:57:15 +02:00
timer-atmel-tcb.c timekeeping, clocksource: Fix various typos in comments 2021-03-22 23:06:48 +01:00
timer-cadence-ttc.c clocksource/drivers/cadence-ttc: Fix memory leak in ttc_timer_probe 2023-06-23 09:33:44 +02:00
timer-clint.c RISC-V: Allow marking IPIs as suitable for remote FENCEs 2023-04-08 11:26:24 +01:00
timer-cs5535.c clocksource/drivers/timer-cs5535: Request irq with non-NULL dev_id 2020-03-12 19:23:06 +01:00
timer-davinci.c clocksource/drivers/davinci: Fix memory leak in davinci_timer_register when init fails 2023-04-24 16:56:13 +02:00
timer-digicolor.c clocksource/drivers/digicolor: Convert to SPDX identifier 2022-05-18 11:08:59 +02:00
timer-fsl-ftm.c timekeeping, clocksource: Fix various typos in comments 2021-03-22 23:06:48 +01:00
timer-fttmr010.c clocksource/drivers/fttmr010: Pass around less pointers 2021-08-14 10:49:49 +02:00
timer-goldfish.c clocksource/drivers: Add a goldfish-timer clocksource 2022-04-11 11:48:01 +02:00
timer-gx6605s.c clocksource/drivers/timer-gx6605s: Fixup counter reload 2020-08-24 13:01:39 +02:00
timer-gxp.c clocksource/drivers/timer-gxp: Add missing error handling in gxp_timer_probe 2022-09-20 10:49:45 +02:00
timer-imx-gpt.c clocksource/drivers/imx-gpt: Fold <soc/imx/timer.h> into its only user 2023-06-23 09:33:43 +02:00
timer-imx-sysctr.c clocksource/drivers/imx-sysctr: handle nxp,no-divider property 2022-09-20 10:49:46 +02:00
timer-imx-tpm.c clocksource/drivers/imx-tpm: Move tpm_read_sched_clock() under CONFIG_ARM 2022-03-07 18:27:22 +01:00
timer-integrator-ap.c clocksource: Replace setup_irq() by request_irq() 2020-02-27 12:15:24 +01:00
timer-ixp4xx.c clocksource/drivers/ixp4xx: Drop boardfile probe path 2022-05-18 11:08:52 +02:00
timer-keystone.c
timer-loongson1-pwm.c clocksource/drivers/loongson1: Move PWM timer to clocksource framework 2023-06-19 17:07:03 +02:00
timer-lpc32xx.c clocksource/drivers/lpc32xx: Convert to SPDX identifier 2022-05-18 11:08:59 +02:00
timer-mediatek-cpux.c clocksource/drivers/timer-mediatek: Split out CPUXGPT timers 2023-04-24 16:56:13 +02:00
timer-mediatek.c clocksource/drivers/timer-mediatek: Split out CPUXGPT timers 2023-04-24 16:56:13 +02:00
timer-meson6.c clocksource: Replace setup_irq() by request_irq() 2020-02-27 12:15:24 +01:00
timer-microchip-pit64b.c clocksource/drivers/timer-microchip-pit64b: Add delay timer 2023-02-13 13:10:17 +01:00
timer-milbeaut.c
timer-mp-csky.c
timer-msc313e.c clocksource/drivers/msc313e: Add support for ssd20xd-based platforms 2021-12-20 13:28:39 +01:00
timer-npcm7xx.c clocksource/drivers/timer-npcm7xx: Enable timer 1 clock before use 2022-12-02 12:48:28 +01:00
timer-of.c clocksource/drivers/timer-of: Check return value of of_iomap in timer_of_base_init() 2022-03-07 19:21:25 +01:00
timer-of.h
timer-orion.c clocksource/drivers/orion: Convert to SPDX identifier 2022-05-18 11:08:59 +02:00
timer-owl.c
timer-oxnas-rps.c clocksource/drivers/oxnas-rps: Fix irq_of_parse_and_map() return value 2022-05-24 09:16:29 +02:00
timer-pistachio.c clocksource/drivers/pistachio: Convert to SPDX identifier 2022-05-18 11:08:59 +02:00
timer-probe.c treewide: Convert macro and uses of __section(foo) to __section("foo") 2020-10-25 14:51:49 -07:00
timer-pxa.c clocksource: Replace setup_irq() by request_irq() 2020-02-27 12:15:24 +01:00
timer-qcom.c
timer-rda.c
timer-riscv.c clocksource/drivers/riscv: Patch riscv_clock_next_event() jump before first use 2023-02-13 13:10:17 +01:00
timer-rockchip.c
timer-sp.h clocksource/drivers/sp804: Enable Hisilicon sp804 timer 64bit mode 2020-09-24 10:51:04 +02:00
timer-sp804.c clocksource/drivers/sp804: Do not use timer namespace for timer_shutdown() function 2022-11-24 15:09:10 +01:00
timer-sprd.c
timer-stm32-lp.c Timekeeping and clocksource/event driver updates the second batch: 2023-04-29 10:24:30 -07:00
timer-stm32.c
timer-sun4i.c clocksource/drivers/timer-sun4i: Add CLOCK_EVT_FEAT_DYNIRQ 2023-02-13 13:10:17 +01:00
timer-sun5i.c clocksource/drivers/sun5i: Remove unnecessary (void*) conversions 2022-07-27 17:01:52 +02:00
timer-tegra.c
timer-tegra186.c Timekeeping and clocksource/event driver updates the second batch: 2023-04-29 10:24:30 -07:00
timer-ti-32k.c clocksource/drivers: Replace HTTP links with HTTPS ones 2020-07-23 16:57:43 +02:00
timer-ti-dm-systimer.c clocksource/drivers/ti: Use of_property_read_bool() for boolean properties 2023-04-24 16:56:14 +02:00
timer-ti-dm.c Timekeeping and clocksource/event driver updates the second batch: 2023-04-29 10:24:30 -07:00
timer-versatile.c clocksource/drivers/timer-versatile: Clear OF_POPULATED flag 2020-05-23 00:03:25 +02:00
timer-vf-pit.c timekeeping, clocksource: Fix various typos in comments 2021-03-22 23:06:48 +01:00
timer-vt8500.c clocksource: Replace setup_irq() by request_irq() 2020-02-27 12:15:24 +01:00
timer-zevio.c clocksource: Replace setup_irq() by request_irq() 2020-02-27 12:15:24 +01:00