# git rev-parse -q --verify d08c407f715f651e7ea40b3a037be46dd2b11e4c^{commit} d08c407f715f651e7ea40b3a037be46dd2b11e4c already have revision, skipping fetch # git checkout -q -f -B kisskb d08c407f715f651e7ea40b3a037be46dd2b11e4c # git clean -qxdf # < git log -1 # commit d08c407f715f651e7ea40b3a037be46dd2b11e4c # Merge: 80a76c60e5f6 8ca1836769d7 # Author: Linus Torvalds # Date: Mon Mar 11 14:38:26 2024 -0700 # # Merge tag 'timers-core-2024-03-10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip # # Pull timer updates from Thomas Gleixner: # "A large set of updates and features for timers and timekeeping: # # - The hierarchical timer pull model # # When timer wheel timers are armed they are placed into the timer # wheel of a CPU which is likely to be busy at the time of expiry. # This is done to avoid wakeups on potentially idle CPUs. # # This is wrong in several aspects: # # 1) The heuristics to select the target CPU are wrong by # definition as the chance to get the prediction right is # close to zero. # # 2) Due to #1 it is possible that timers are accumulated on # a single target CPU # # 3) The required computation in the enqueue path is just overhead # for dubious value especially under the consideration that the # vast majority of timer wheel timers are either canceled or # rearmed before they expire. # # The timer pull model avoids the above by removing the target # computation on enqueue and queueing timers always on the CPU on # which they get armed. # # This is achieved by having separate wheels for CPU pinned timers # and global timers which do not care about where they expire. # # As long as a CPU is busy it handles both the pinned and the global # timers which are queued on the CPU local timer wheels. # # When a CPU goes idle it evaluates its own timer wheels: # # - If the first expiring timer is a pinned timer, then the global # timers can be ignored as the CPU will wake up before they # expire. # # - If the first expiring timer is a global timer, then the expiry # time is propagated into the timer pull hierarchy and the CPU # makes sure to wake up for the first pinned timer. # # The timer pull hierarchy organizes CPUs in groups of eight at the # lowest level and at the next levels groups of eight groups up to # the point where no further aggregation of groups is required, i.e. # the number of levels is log8(NR_CPUS). The magic number of eight # has been established by experimention, but can be adjusted if # needed. # # In each group one busy CPU acts as the migrator. It's only one CPU # to avoid lock contention on remote timer wheels. # # The migrator CPU checks in its own timer wheel handling whether # there are other CPUs in the group which have gone idle and have # global timers to expire. If there are global timers to expire, the # migrator locks the remote CPU timer wheel and handles the expiry. # # Depending on the group level in the hierarchy this handling can # require to walk the hierarchy downwards to the CPU level. # # Special care is taken when the last CPU goes idle. At this point # the CPU is the systemwide migrator at the top of the hierarchy and # it therefore cannot delegate to the hierarchy. It needs to arm its # own timer device to expire either at the first expiring timer in # the hierarchy or at the first CPU local timer, which ever expires # first. # # This completely removes the overhead from the enqueue path, which # is e.g. for networking a true hotpath and trades it for a slightly # more complex idle path. # # This has been in development for a couple of years and the final # series has been extensively tested by various teams from silicon # vendors and ran through extensive CI. # # There have been slight performance improvements observed on network # centric workloads and an Intel team confirmed that this allows them # to power down a die completely on a mult-die socket for the first # time in a mostly idle scenario. # # There is only one outstanding ~1.5% regression on a specific # overloaded netperf test which is currently investigated, but the # rest is either positive or neutral performance wise and positive on # the power management side. # # - Fixes for the timekeeping interpolation code for cross-timestamps: # # cross-timestamps are used for PTP to get snapshots from hardware # timers and interpolated them back to clock MONOTONIC. The changes # address a few corner cases in the interpolation code which got the # math and logic wrong. # # - Simplifcation of the clocksource watchdog retry logic to # automatically adjust to handle larger systems correctly instead of # having more incomprehensible command line parameters. # # - Treewide consolidation of the VDSO data structures. # # - The usual small improvements and cleanups all over the place" # # * tag 'timers-core-2024-03-10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (62 commits) # timer/migration: Fix quick check reporting late expiry # tick/sched: Fix build failure for CONFIG_NO_HZ_COMMON=n # vdso/datapage: Quick fix - use asm/page-def.h for ARM64 # timers: Assert no next dyntick timer look-up while CPU is offline # tick: Assume timekeeping is correctly handed over upon last offline idle call # tick: Shut down low-res tick from dying CPU # tick: Split nohz and highres features from nohz_mode # tick: Move individual bit features to debuggable mask accesses # tick: Move got_idle_tick away from common flags # tick: Assume the tick can't be stopped in NOHZ_MODE_INACTIVE mode # tick: Move broadcast cancellation up to CPUHP_AP_TICK_DYING # tick: Move tick cancellation up to CPUHP_AP_TICK_DYING # tick: Start centralizing tick related CPU hotplug operations # tick/sched: Don't clear ts::next_tick again in can_stop_idle_tick() # tick/sched: Rename tick_nohz_stop_sched_tick() to tick_nohz_full_stop_tick() # tick: Use IS_ENABLED() whenever possible # tick/sched: Remove useless oneshot ifdeffery # tick/nohz: Remove duplicate between lowres and highres handlers # tick/nohz: Remove duplicate between tick_nohz_switch_to_nohz() and tick_setup_sched_timer() # hrtimer: Select housekeeping CPU during migration # ... # < /opt/cross/kisskb/x86-64--glibc--bleeding-edge-2022.08-1/bin/x86_64-linux-gcc --version # < /opt/cross/kisskb/x86-64--glibc--bleeding-edge-2022.08-1/bin/x86_64-linux-ld --version # < git log --format=%s --max-count=1 d08c407f715f651e7ea40b3a037be46dd2b11e4c # make -s -j 40 ARCH=um O=/kisskb/build/linus_defconfig_um-x86_64-gcc12 CROSS_COMPILE=/opt/cross/kisskb/x86-64--glibc--bleeding-edge-2022.08-1/bin/x86_64-linux- SUBARCH=x86_64 defconfig # < make -s -j 40 ARCH=um O=/kisskb/build/linus_defconfig_um-x86_64-gcc12 CROSS_COMPILE=/opt/cross/kisskb/x86-64--glibc--bleeding-edge-2022.08-1/bin/x86_64-linux- SUBARCH=x86_64 help # make -s -j 40 ARCH=um O=/kisskb/build/linus_defconfig_um-x86_64-gcc12 CROSS_COMPILE=/opt/cross/kisskb/x86-64--glibc--bleeding-edge-2022.08-1/bin/x86_64-linux- SUBARCH=x86_64 olddefconfig # make -s -j 40 ARCH=um O=/kisskb/build/linus_defconfig_um-x86_64-gcc12 CROSS_COMPILE=/opt/cross/kisskb/x86-64--glibc--bleeding-edge-2022.08-1/bin/x86_64-linux- SUBARCH=x86_64 /kisskb/src/arch/x86/um/user-offsets.c:17:6: warning: no previous prototype for ‘foo’ [-Wmissing-prototypes] 17 | void foo(void) | ^~~ In file included from /kisskb/src/arch/um/kernel/asm-offsets.c:1: /kisskb/src/arch/x86/um/shared/sysdep/kernel-offsets.h:9:6: warning: no previous prototype for ‘foo’ [-Wmissing-prototypes] 9 | void foo(void) | ^~~ /kisskb/src/arch/x86/um/bugs_64.c:9:6: warning: no previous prototype for ‘arch_check_bugs’ [-Wmissing-prototypes] 9 | void arch_check_bugs(void) | ^~~~~~~~~~~~~~~ /kisskb/src/arch/x86/um/bugs_64.c:13:6: warning: no previous prototype for ‘arch_examine_signal’ [-Wmissing-prototypes] 13 | void arch_examine_signal(int sig, struct uml_pt_regs *regs) | ^~~~~~~~~~~~~~~~~~~ /kisskb/src/arch/x86/um/fault.c:18:5: warning: no previous prototype for ‘arch_fixup’ [-Wmissing-prototypes] 18 | int arch_fixup(unsigned long address, struct uml_pt_regs *regs) | ^~~~~~~~~~ /kisskb/src/arch/x86/um/vdso/um_vdso.c:16:5: warning: no previous prototype for ‘__vdso_clock_gettime’ [-Wmissing-prototypes] 16 | int __vdso_clock_gettime(clockid_t clock, struct __kernel_old_timespec *ts) | ^~~~~~~~~~~~~~~~~~~~ /kisskb/src/arch/x86/um/vdso/um_vdso.c:30:5: warning: no previous prototype for ‘__vdso_gettimeofday’ [-Wmissing-prototypes] 30 | int __vdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz) | ^~~~~~~~~~~~~~~~~~~ /kisskb/src/arch/x86/um/vdso/um_vdso.c:44:21: warning: no previous prototype for ‘__vdso_time’ [-Wmissing-prototypes] 44 | __kernel_old_time_t __vdso_time(__kernel_old_time_t *t) | ^~~~~~~~~~~ /kisskb/src/arch/x86/um/vdso/um_vdso.c:57:1: warning: no previous prototype for ‘__vdso_getcpu’ [-Wmissing-prototypes] 57 | __vdso_getcpu(unsigned *cpu, unsigned *node, struct getcpu_cache *unused) | ^~~~~~~~~~~~~ /kisskb/src/arch/x86/um/os-Linux/mcontext.c:7:6: warning: no previous prototype for ‘get_regs_from_mc’ [-Wmissing-prototypes] 7 | void get_regs_from_mc(struct uml_pt_regs *regs, mcontext_t *mc) | ^~~~~~~~~~~~~~~~ /kisskb/src/arch/x86/um/os-Linux/registers.c:146:15: warning: no previous prototype for ‘get_thread_reg’ [-Wmissing-prototypes] 146 | unsigned long get_thread_reg(int reg, jmp_buf *buf) | ^~~~~~~~~~~~~~ /kisskb/src/arch/um/os-Linux/skas/process.c:107:6: warning: no previous prototype for ‘wait_stub_done’ [-Wmissing-prototypes] 107 | void wait_stub_done(int pid) | ^~~~~~~~~~~~~~ /kisskb/src/arch/um/os-Linux/skas/process.c:683:6: warning: no previous prototype for ‘__switch_mm’ [-Wmissing-prototypes] 683 | void __switch_mm(struct mm_id *mm_idp) | ^~~~~~~~~~~ /kisskb/src/arch/um/kernel/skas/process.c:36:12: warning: no previous prototype for ‘start_uml’ [-Wmissing-prototypes] 36 | int __init start_uml(void) | ^~~~~~~~~ /kisskb/src/arch/um/kernel/skas/mmu.c:17:5: warning: no previous prototype for ‘init_new_context’ [-Wmissing-prototypes] 17 | int init_new_context(struct task_struct *task, struct mm_struct *mm) | ^~~~~~~~~~~~~~~~ /kisskb/src/arch/um/kernel/skas/mmu.c:60:6: warning: no previous prototype for ‘destroy_context’ [-Wmissing-prototypes] 60 | void destroy_context(struct mm_struct *mm) | ^~~~~~~~~~~~~~~ /kisskb/src/arch/x86/um/ptrace_64.c:111:5: warning: no previous prototype for ‘poke_user’ [-Wmissing-prototypes] 111 | int poke_user(struct task_struct *child, long addr, long data) | ^~~~~~~~~ /kisskb/src/arch/x86/um/ptrace_64.c:171:5: warning: no previous prototype for ‘peek_user’ [-Wmissing-prototypes] 171 | int peek_user(struct task_struct *child, long addr, long data) | ^~~~~~~~~ /kisskb/src/arch/um/os-Linux/drivers/ethertap_kern.c:66:5: warning: no previous prototype for ‘ethertap_setup’ [-Wmissing-prototypes] 66 | int ethertap_setup(char *str, char **mac_out, void *data) | ^~~~~~~~~~~~~~ /kisskb/src/arch/um/os-Linux/drivers/tuntap_kern.c:56:5: warning: no previous prototype for ‘tuntap_setup’ [-Wmissing-prototypes] 56 | int tuntap_setup(char *str, char **mac_out, void *data) | ^~~~~~~~~~~~ /kisskb/src/arch/x86/um/signal.c:560:6: warning: no previous prototype for ‘sys_rt_sigreturn’ [-Wmissing-prototypes] 560 | long sys_rt_sigreturn(void) | ^~~~~~~~~~~~~~~~ /kisskb/src/arch/um/os-Linux/main.c:187:7: warning: no previous prototype for ‘__wrap_malloc’ [-Wmissing-prototypes] 187 | void *__wrap_malloc(int size) | ^~~~~~~~~~~~~ /kisskb/src/arch/um/os-Linux/main.c:208:7: warning: no previous prototype for ‘__wrap_calloc’ [-Wmissing-prototypes] 208 | void *__wrap_calloc(int n, int size) | ^~~~~~~~~~~~~ /kisskb/src/arch/um/os-Linux/main.c:222:6: warning: no previous prototype for ‘__wrap_free’ [-Wmissing-prototypes] 222 | void __wrap_free(void *ptr) | ^~~~~~~~~~~ /kisskb/src/arch/um/os-Linux/mem.c:28:6: warning: no previous prototype for ‘kasan_map_memory’ [-Wmissing-prototypes] 28 | void kasan_map_memory(void *start, size_t len) | ^~~~~~~~~~~~~~~~ /kisskb/src/arch/um/os-Linux/mem.c:212:13: warning: no previous prototype for ‘check_tmpexec’ [-Wmissing-prototypes] 212 | void __init check_tmpexec(void) | ^~~~~~~~~~~~~ /kisskb/src/arch/um/os-Linux/signal.c:75:6: warning: no previous prototype for ‘sig_handler’ [-Wmissing-prototypes] 75 | void sig_handler(int sig, struct siginfo *si, mcontext_t *mc) | ^~~~~~~~~~~ /kisskb/src/arch/um/os-Linux/signal.c:111:6: warning: no previous prototype for ‘timer_alarm_handler’ [-Wmissing-prototypes] 111 | void timer_alarm_handler(int sig, struct siginfo *unused_si, mcontext_t *mc) | ^~~~~~~~~~~~~~~~~~~ /kisskb/src/arch/um/os-Linux/start_up.c:301:12: warning: no previous prototype for ‘parse_iomem’ [-Wmissing-prototypes] 301 | int __init parse_iomem(char *str, int *add) | ^~~~~~~~~~~ /kisskb/src/arch/um/kernel/mem.c:202:8: warning: no previous prototype for ‘pgd_alloc’ [-Wmissing-prototypes] 202 | pgd_t *pgd_alloc(struct mm_struct *mm) | ^~~~~~~~~ /kisskb/src/arch/um/kernel/mem.c:215:7: warning: no previous prototype for ‘uml_kmalloc’ [-Wmissing-prototypes] 215 | void *uml_kmalloc(int size, int flags) | ^~~~~~~~~~~ /kisskb/src/arch/um/kernel/process.c:51:5: warning: no previous prototype for ‘pid_to_processor_id’ [-Wmissing-prototypes] 51 | int pid_to_processor_id(int pid) | ^~~~~~~~~~~~~~~~~~~ /kisskb/src/arch/um/kernel/process.c:87:7: warning: no previous prototype for ‘__switch_to’ [-Wmissing-prototypes] 87 | void *__switch_to(struct task_struct *from, struct task_struct *to) | ^~~~~~~~~~~ /kisskb/src/arch/um/kernel/process.c:140:6: warning: no previous prototype for ‘fork_handler’ [-Wmissing-prototypes] 140 | void fork_handler(void) | ^~~~~~~~~~~~ /kisskb/src/arch/um/kernel/process.c:217:6: warning: no previous prototype for ‘arch_cpu_idle’ [-Wmissing-prototypes] 217 | void arch_cpu_idle(void) | ^~~~~~~~~~~~~ /kisskb/src/arch/um/kernel/process.c:253:5: warning: no previous prototype for ‘copy_to_user_proc’ [-Wmissing-prototypes] 253 | int copy_to_user_proc(void __user *to, void *from, int size) | ^~~~~~~~~~~~~~~~~ /kisskb/src/arch/um/kernel/process.c:263:5: warning: no previous prototype for ‘clear_user_proc’ [-Wmissing-prototypes] 263 | int clear_user_proc(void __user *buf, int size) | ^~~~~~~~~~~~~~~ /kisskb/src/arch/um/kernel/process.c:271:6: warning: no previous prototype for ‘set_using_sysemu’ [-Wmissing-prototypes] 271 | void set_using_sysemu(int value) | ^~~~~~~~~~~~~~~~ /kisskb/src/arch/um/kernel/process.c:278:5: warning: no previous prototype for ‘get_using_sysemu’ [-Wmissing-prototypes] 278 | int get_using_sysemu(void) | ^~~~~~~~~~~~~~~~ /kisskb/src/arch/um/kernel/process.c:316:12: warning: no previous prototype for ‘make_proc_sysemu’ [-Wmissing-prototypes] 316 | int __init make_proc_sysemu(void) | ^~~~~~~~~~~~~~~~ /kisskb/src/arch/um/kernel/process.c:348:15: warning: no previous prototype for ‘arch_align_stack’ [-Wmissing-prototypes] 348 | unsigned long arch_align_stack(unsigned long sp) | ^~~~~~~~~~~~~~~~ /kisskb/src/arch/x86/um/syscalls_64.c:48:6: warning: no previous prototype for ‘arch_switch_to’ [-Wmissing-prototypes] 48 | void arch_switch_to(struct task_struct *to) | ^~~~~~~~~~~~~~ /kisskb/src/arch/um/kernel/reboot.c:45:6: warning: no previous prototype for ‘machine_restart’ [-Wmissing-prototypes] 45 | void machine_restart(char * __unused) | ^~~~~~~~~~~~~~~ /kisskb/src/arch/um/kernel/reboot.c:51:6: warning: no previous prototype for ‘machine_power_off’ [-Wmissing-prototypes] 51 | void machine_power_off(void) | ^~~~~~~~~~~~~~~~~ /kisskb/src/arch/um/kernel/reboot.c:57:6: warning: no previous prototype for ‘machine_halt’ [-Wmissing-prototypes] 57 | void machine_halt(void) | ^~~~~~~~~~~~ /kisskb/src/arch/um/kernel/tlb.c:579:6: warning: no previous prototype for ‘flush_tlb_mm_range’ [-Wmissing-prototypes] 579 | void flush_tlb_mm_range(struct mm_struct *mm, unsigned long start, | ^~~~~~~~~~~~~~~~~~ /kisskb/src/arch/um/kernel/tlb.c:594:6: warning: no previous prototype for ‘force_flush_all’ [-Wmissing-prototypes] 594 | void force_flush_all(void) | ^~~~~~~~~~~~~~~ /kisskb/src/arch/um/kernel/um_arch.c:408:19: warning: no previous prototype for ‘read_initrd’ [-Wmissing-prototypes] 408 | int __init __weak read_initrd(void) | ^~~~~~~~~~~ /kisskb/src/arch/um/kernel/um_arch.c:461:7: warning: no previous prototype for ‘text_poke’ [-Wmissing-prototypes] 461 | void *text_poke(void *addr, const void *opcode, size_t len) | ^~~~~~~~~ /kisskb/src/arch/um/kernel/um_arch.c:473:6: warning: no previous prototype for ‘text_poke_sync’ [-Wmissing-prototypes] 473 | void text_poke_sync(void) | ^~~~~~~~~~~~~~ /kisskb/src/arch/um/kernel/kmsg_dump.c:60:12: warning: no previous prototype for ‘kmsg_dumper_stdout_init’ [-Wmissing-prototypes] 60 | int __init kmsg_dumper_stdout_init(void) | ^~~~~~~~~~~~~~~~~~~~~~~ LINK linux Completed OK # rm -rf /kisskb/build/linus_defconfig_um-x86_64-gcc12 # Build took: 0:00:38.436514