[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202104080359.9IYiD2fj-lkp@intel.com>
Date: Thu, 8 Apr 2021 03:28:35 +0800
From: kernel test robot <lkp@...el.com>
To: Marcelo Tosatti <mtosatti@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>
Cc: kbuild-all@...ts.01.org, clang-built-linux@...glegroups.com,
linux-kernel@...r.kernel.org,
Frederic Weisbecker <frederic@...nel.org>,
Peter Xu <peterx@...hat.com>,
Nitesh Narayan Lal <nitesh@...hat.com>,
Alex Belits <abelits@...vell.com>
Subject: Re: [PATCH] hrtimer: avoid retrigger_next_event IPI
Hi Marcelo,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on tip/timers/core]
[also build test WARNING on linux/master linus/master v5.12-rc6 next-20210407]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Marcelo-Tosatti/hrtimer-avoid-retrigger_next_event-IPI/20210407-233005
base: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git d4c7c28806616809e3baa0b7cd8c665516b2726d
config: arm64-randconfig-r032-20210407 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project c060945b23a1c54d4b2a053ff4b093a2277b303d)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://github.com/0day-ci/linux/commit/defd4db9d63d1f16e3e21862bd9c9105a9f6a7e9
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Marcelo-Tosatti/hrtimer-avoid-retrigger_next_event-IPI/20210407-233005
git checkout defd4db9d63d1f16e3e21862bd9c9105a9f6a7e9
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
kernel/time/hrtimer.c:120:21: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides]
[CLOCK_REALTIME] = HRTIMER_BASE_REALTIME,
^~~~~~~~~~~~~~~~~~~~~
kernel/time/hrtimer.c:118:27: note: previous initialization is here
[0 ... MAX_CLOCKS - 1] = HRTIMER_MAX_CLOCK_BASES,
^~~~~~~~~~~~~~~~~~~~~~~
kernel/time/hrtimer.c:121:22: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides]
[CLOCK_MONOTONIC] = HRTIMER_BASE_MONOTONIC,
^~~~~~~~~~~~~~~~~~~~~~
kernel/time/hrtimer.c:118:27: note: previous initialization is here
[0 ... MAX_CLOCKS - 1] = HRTIMER_MAX_CLOCK_BASES,
^~~~~~~~~~~~~~~~~~~~~~~
kernel/time/hrtimer.c:122:21: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides]
[CLOCK_BOOTTIME] = HRTIMER_BASE_BOOTTIME,
^~~~~~~~~~~~~~~~~~~~~
kernel/time/hrtimer.c:118:27: note: previous initialization is here
[0 ... MAX_CLOCKS - 1] = HRTIMER_MAX_CLOCK_BASES,
^~~~~~~~~~~~~~~~~~~~~~~
kernel/time/hrtimer.c:123:17: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides]
[CLOCK_TAI] = HRTIMER_BASE_TAI,
^~~~~~~~~~~~~~~~
kernel/time/hrtimer.c:118:27: note: previous initialization is here
[0 ... MAX_CLOCKS - 1] = HRTIMER_MAX_CLOCK_BASES,
^~~~~~~~~~~~~~~~~~~~~~~
>> kernel/time/hrtimer.c:944:1: warning: unused label 'set_timerfd' [-Wunused-label]
set_timerfd:
^~~~~~~~~~~~
kernel/time/hrtimer.c:147:20: warning: unused function 'is_migration_base' [-Wunused-function]
static inline bool is_migration_base(struct hrtimer_clock_base *base)
^
kernel/time/hrtimer.c:650:19: warning: unused function 'hrtimer_hres_active' [-Wunused-function]
static inline int hrtimer_hres_active(void)
^
kernel/time/hrtimer.c:881:13: warning: unused function 'need_reprogram_timer' [-Wunused-function]
static bool need_reprogram_timer(struct hrtimer_cpu_base *cpu_base)
^
kernel/time/hrtimer.c:1793:20: warning: unused function '__hrtimer_peek_ahead_timers' [-Wunused-function]
static inline void __hrtimer_peek_ahead_timers(void) { }
^
9 warnings generated.
vim +/set_timerfd +944 kernel/time/hrtimer.c
895
896 /*
897 * Clock realtime was set
898 *
899 * Change the offset of the realtime clock vs. the monotonic
900 * clock.
901 *
902 * We might have to reprogram the high resolution timer interrupt. On
903 * SMP we call the architecture specific code to retrigger _all_ high
904 * resolution timer interrupts. On UP we just disable interrupts and
905 * call the high resolution interrupt code.
906 */
907 void clock_was_set(void)
908 {
909 #ifdef CONFIG_HIGH_RES_TIMERS
910 cpumask_var_t mask;
911 int cpu;
912
913 if (!tick_nohz_full_enabled()) {
914 /* Retrigger the CPU local events everywhere */
915 on_each_cpu(retrigger_next_event, NULL, 1);
916 goto set_timerfd;
917 }
918
919 if (!zalloc_cpumask_var(&mask, GFP_KERNEL)) {
920 on_each_cpu(retrigger_next_event, NULL, 1);
921 goto set_timerfd;
922 }
923
924 /* Avoid interrupting nohz_full CPUs if possible */
925 preempt_disable();
926 for_each_online_cpu(cpu) {
927 if (tick_nohz_full_cpu(cpu)) {
928 unsigned long flags;
929 struct hrtimer_cpu_base *cpu_base = &per_cpu(hrtimer_bases, cpu);
930
931 raw_spin_lock_irqsave(&cpu_base->lock, flags);
932 if (need_reprogram_timer(cpu_base))
933 cpumask_set_cpu(cpu, mask);
934 else
935 hrtimer_update_base(cpu_base);
936 raw_spin_unlock_irqrestore(&cpu_base->lock, flags);
937 }
938 }
939
940 smp_call_function_many(mask, retrigger_next_event, NULL, 1);
941 preempt_enable();
942 free_cpumask_var(mask);
943 #endif
> 944 set_timerfd:
945 timerfd_clock_was_set();
946 }
947
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (27570 bytes)
Powered by blists - more mailing lists