* Re: [PATCH v8 06/11] fs: add percpu counters for significant multigrain timestamp events
[not found] <20240914-mgtime-v8-6-5bd872330bed@kernel.org>
@ 2024-09-17 8:10 ` kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-09-17 8:10 UTC (permalink / raw)
To: Jeff Layton; +Cc: llvm, oe-kbuild-all
Hi Jeff,
kernel test robot noticed the following build errors:
[auto build test ERROR on da3ea35007d0af457a0afc87e84fddaebc4e0b63]
url: https://github.com/intel-lab-lkp/linux/commits/Jeff-Layton/timekeeping-move-multigrain-timestamp-floor-handling-into-timekeeper/20240915-010919
base: da3ea35007d0af457a0afc87e84fddaebc4e0b63
patch link: https://lore.kernel.org/r/20240914-mgtime-v8-6-5bd872330bed%40kernel.org
patch subject: [PATCH v8 06/11] fs: add percpu counters for significant multigrain timestamp events
config: x86_64-allnoconfig (https://download.01.org/0day-ci/archive/20240917/202409171602.oeaTIYhc-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240917/202409171602.oeaTIYhc-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202409171602.oeaTIYhc-lkp@intel.com/
All error/warnings (new ones prefixed by >>):
>> fs/inode.c:2755:23: error: too many arguments provided to function-like macro invocation
2755 | mgtime_counter_inc(mg_fine_stamps);
| ^
fs/inode.c:166:9: note: macro 'mgtime_counter_inc' defined here
166 | #define mgtime_counter_inc() do { } while (0)
| ^
>> fs/inode.c:2755:4: error: use of undeclared identifier 'mgtime_counter_inc'; did you mean 'percpu_counter_inc'?
2755 | mgtime_counter_inc(mg_fine_stamps);
| ^~~~~~~~~~~~~~~~~~
| percpu_counter_inc
include/linux/percpu_counter.h:265:20: note: 'percpu_counter_inc' declared here
265 | static inline void percpu_counter_inc(struct percpu_counter *fbc)
| ^
fs/inode.c:2758:21: error: too many arguments provided to function-like macro invocation
2758 | mgtime_counter_inc(mg_ctime_updates);
| ^
fs/inode.c:166:9: note: macro 'mgtime_counter_inc' defined here
166 | #define mgtime_counter_inc() do { } while (0)
| ^
fs/inode.c:2758:2: error: use of undeclared identifier 'mgtime_counter_inc'; did you mean 'percpu_counter_inc'?
2758 | mgtime_counter_inc(mg_ctime_updates);
| ^~~~~~~~~~~~~~~~~~
| percpu_counter_inc
include/linux/percpu_counter.h:265:20: note: 'percpu_counter_inc' declared here
265 | static inline void percpu_counter_inc(struct percpu_counter *fbc)
| ^
fs/inode.c:2772:22: error: too many arguments provided to function-like macro invocation
2772 | mgtime_counter_inc(mg_ctime_swaps);
| ^
fs/inode.c:166:9: note: macro 'mgtime_counter_inc' defined here
166 | #define mgtime_counter_inc() do { } while (0)
| ^
fs/inode.c:2772:3: error: use of undeclared identifier 'mgtime_counter_inc'; did you mean 'percpu_counter_inc'?
2772 | mgtime_counter_inc(mg_ctime_swaps);
| ^~~~~~~~~~~~~~~~~~
| percpu_counter_inc
include/linux/percpu_counter.h:265:20: note: 'percpu_counter_inc' declared here
265 | static inline void percpu_counter_inc(struct percpu_counter *fbc)
| ^
>> fs/inode.c:2755:4: warning: expression result unused [-Wunused-value]
2755 | mgtime_counter_inc(mg_fine_stamps);
| ^~~~~~~~~~~~~~~~~~
fs/inode.c:2758:2: warning: expression result unused [-Wunused-value]
2758 | mgtime_counter_inc(mg_ctime_updates);
| ^~~~~~~~~~~~~~~~~~
fs/inode.c:2772:3: warning: expression result unused [-Wunused-value]
2772 | mgtime_counter_inc(mg_ctime_swaps);
| ^~~~~~~~~~~~~~~~~~
fs/inode.c:2845:22: error: too many arguments provided to function-like macro invocation
2845 | mgtime_counter_inc(mg_ctime_swaps);
| ^
fs/inode.c:166:9: note: macro 'mgtime_counter_inc' defined here
166 | #define mgtime_counter_inc() do { } while (0)
| ^
fs/inode.c:2845:3: error: use of undeclared identifier 'mgtime_counter_inc'; did you mean 'percpu_counter_inc'?
2845 | mgtime_counter_inc(mg_ctime_swaps);
| ^~~~~~~~~~~~~~~~~~
| percpu_counter_inc
include/linux/percpu_counter.h:265:20: note: 'percpu_counter_inc' declared here
265 | static inline void percpu_counter_inc(struct percpu_counter *fbc)
| ^
fs/inode.c:2845:3: warning: expression result unused [-Wunused-value]
2845 | mgtime_counter_inc(mg_ctime_swaps);
| ^~~~~~~~~~~~~~~~~~
4 warnings and 8 errors generated.
--
>> kernel/time/timekeeping.c:2467:22: error: too many arguments provided to function-like macro invocation
2467 | mgtime_counter_inc(mg_floor_swaps);
| ^
kernel/time/timekeeping_internal.h:18:9: note: macro 'mgtime_counter_inc' defined here
18 | #define mgtime_counter_inc() do { } while (0)
| ^
>> kernel/time/timekeeping.c:2467:3: error: use of undeclared identifier 'mgtime_counter_inc'; did you mean 'percpu_counter_inc'?
2467 | mgtime_counter_inc(mg_floor_swaps);
| ^~~~~~~~~~~~~~~~~~
| percpu_counter_inc
include/linux/percpu_counter.h:265:20: note: 'percpu_counter_inc' declared here
265 | static inline void percpu_counter_inc(struct percpu_counter *fbc)
| ^
>> kernel/time/timekeeping.c:2467:3: warning: expression result unused [-Wunused-value]
2467 | mgtime_counter_inc(mg_floor_swaps);
| ^~~~~~~~~~~~~~~~~~
1 warning and 2 errors generated.
vim +2755 fs/inode.c
2713
2714 /**
2715 * inode_set_ctime_current - set the ctime to current_time
2716 * @inode: inode
2717 *
2718 * Set the inode's ctime to the current value for the inode. Returns the
2719 * current value that was assigned. If this is not a multigrain inode, then we
2720 * set it to the later of the coarse time and floor value.
2721 *
2722 * If it is multigrain, then we first see if the coarse-grained timestamp is
2723 * distinct from what we have. If so, then we'll just use that. If we have to
2724 * get a fine-grained timestamp, then do so. After that, we try to swap the new
2725 * value into i_ctime_nsec. We take the resulting ctime, regardless of the
2726 * outcome of the swap.
2727 */
2728 struct timespec64 inode_set_ctime_current(struct inode *inode)
2729 {
2730 struct timespec64 now;
2731 u32 cns, cur;
2732
2733 ktime_get_coarse_real_ts64_mg(&now);
2734 now = timestamp_truncate(now, inode);
2735
2736 /* Just return that if this is not a multigrain fs */
2737 if (!is_mgtime(inode)) {
2738 inode_set_ctime_to_ts(inode, now);
2739 goto out;
2740 }
2741
2742 /*
2743 * We only need a fine-grained time if someone has queried it,
2744 * and the current coarse grained time isn't later than what's
2745 * already there.
2746 */
2747 cns = smp_load_acquire(&inode->i_ctime_nsec);
2748 if (cns & I_CTIME_QUERIED) {
2749 struct timespec64 ctime = { .tv_sec = inode->i_ctime_sec,
2750 .tv_nsec = cns & ~I_CTIME_QUERIED };
2751
2752 if (timespec64_compare(&now, &ctime) <= 0) {
2753 ktime_get_real_ts64_mg(&now);
2754 now = timestamp_truncate(now, inode);
> 2755 mgtime_counter_inc(mg_fine_stamps);
2756 }
2757 }
2758 mgtime_counter_inc(mg_ctime_updates);
2759
2760 /* No need to cmpxchg if it's exactly the same */
2761 if (cns == now.tv_nsec && inode->i_ctime_sec == now.tv_sec) {
2762 trace_ctime_xchg_skip(inode, &now);
2763 goto out;
2764 }
2765 cur = cns;
2766 retry:
2767 /* Try to swap the nsec value into place. */
2768 if (try_cmpxchg(&inode->i_ctime_nsec, &cur, now.tv_nsec)) {
2769 /* If swap occurred, then we're (mostly) done */
2770 inode->i_ctime_sec = now.tv_sec;
2771 trace_ctime_ns_xchg(inode, cns, now.tv_nsec, cur);
2772 mgtime_counter_inc(mg_ctime_swaps);
2773 } else {
2774 /*
2775 * Was the change due to someone marking the old ctime QUERIED?
2776 * If so then retry the swap. This can only happen once since
2777 * the only way to clear I_CTIME_QUERIED is to stamp the inode
2778 * with a new ctime.
2779 */
2780 if (!(cns & I_CTIME_QUERIED) && (cns | I_CTIME_QUERIED) == cur) {
2781 cns = cur;
2782 goto retry;
2783 }
2784 /* Otherwise, keep the existing ctime */
2785 now.tv_sec = inode->i_ctime_sec;
2786 now.tv_nsec = cur & ~I_CTIME_QUERIED;
2787 }
2788 out:
2789 return now;
2790 }
2791 EXPORT_SYMBOL(inode_set_ctime_current);
2792
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-09-17 8:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20240914-mgtime-v8-6-5bd872330bed@kernel.org>
2024-09-17 8:10 ` [PATCH v8 06/11] fs: add percpu counters for significant multigrain timestamp events kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox