Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Neeraj Upadhyay <Neeraj.Upadhyay@amd.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: Re: [RFC 3/6] percpu-refcount: Extend managed mode to allow runtime switching
Date: Tue, 17 Sep 2024 03:07:27 +0800	[thread overview]
Message-ID: <202409170250.ukGxk6pH-lkp@intel.com> (raw)
In-Reply-To: <20240916050811.473556-4-Neeraj.Upadhyay@amd.com>

Hi Neeraj,

[This is a private test report for your RFC patch.]
kernel test robot noticed the following build errors:

[auto build test ERROR on akpm-mm/mm-nonmm-unstable]
[also build test ERROR on linus/master dennis-percpu/for-next v6.11]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Neeraj-Upadhyay/percpu-refcount-Add-managed-mode-for-RCU-released-objects/20240916-131210
base:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-nonmm-unstable
patch link:    https://lore.kernel.org/r/20240916050811.473556-4-Neeraj.Upadhyay%40amd.com
patch subject: [RFC 3/6] percpu-refcount: Extend managed mode to allow runtime switching
config: x86_64-rhel-8.3-rust (https://download.01.org/0day-ci/archive/20240917/202409170250.ukGxk6pH-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/202409170250.ukGxk6pH-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/202409170250.ukGxk6pH-lkp@intel.com/

All errors (new ones prefixed by >>):

>> lib/percpu-refcount.c:741:19: error: use of undeclared identifier 'last_percpu_ref_node'; did you mean 'next_percpu_ref_node'?
     741 |         while (READ_ONCE(last_percpu_ref_node) != NULL && max_count--)
         |                          ^~~~~~~~~~~~~~~~~~~~
         |                          next_percpu_ref_node
   include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE'
      49 |         compiletime_assert_rwonce_type(x);                              \
         |                                        ^
   include/asm-generic/rwonce.h:36:35: note: expanded from macro 'compiletime_assert_rwonce_type'
      36 |         compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long),  \
         |                                          ^
   include/linux/compiler_types.h:477:10: note: expanded from macro '__native_word'
     477 |         (sizeof(t) == sizeof(char) || sizeof(t) == sizeof(short) || \
         |                 ^
   include/linux/compiler_types.h:510:22: note: expanded from macro 'compiletime_assert'
     510 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |                             ^
   include/linux/compiler_types.h:498:23: note: expanded from macro '_compiletime_assert'
     498 |         __compiletime_assert(condition, msg, prefix, suffix)
         |                              ^
   include/linux/compiler_types.h:490:9: note: expanded from macro '__compiletime_assert'
     490 |                 if (!(condition))                                       \
         |                       ^
   lib/percpu-refcount.c:51:26: note: 'next_percpu_ref_node' declared here
      51 | static struct list_head *next_percpu_ref_node = &percpu_ref_manage_head;
         |                          ^
>> lib/percpu-refcount.c:741:19: error: use of undeclared identifier 'last_percpu_ref_node'; did you mean 'next_percpu_ref_node'?
     741 |         while (READ_ONCE(last_percpu_ref_node) != NULL && max_count--)
         |                          ^~~~~~~~~~~~~~~~~~~~
         |                          next_percpu_ref_node
   include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE'
      49 |         compiletime_assert_rwonce_type(x);                              \
         |                                        ^
   include/asm-generic/rwonce.h:36:35: note: expanded from macro 'compiletime_assert_rwonce_type'
      36 |         compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long),  \
         |                                          ^
   include/linux/compiler_types.h:477:39: note: expanded from macro '__native_word'
     477 |         (sizeof(t) == sizeof(char) || sizeof(t) == sizeof(short) || \
         |                                              ^
   include/linux/compiler_types.h:510:22: note: expanded from macro 'compiletime_assert'
     510 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |                             ^
   include/linux/compiler_types.h:498:23: note: expanded from macro '_compiletime_assert'
     498 |         __compiletime_assert(condition, msg, prefix, suffix)
         |                              ^
   include/linux/compiler_types.h:490:9: note: expanded from macro '__compiletime_assert'
     490 |                 if (!(condition))                                       \
         |                       ^
   lib/percpu-refcount.c:51:26: note: 'next_percpu_ref_node' declared here
      51 | static struct list_head *next_percpu_ref_node = &percpu_ref_manage_head;
         |                          ^
>> lib/percpu-refcount.c:741:19: error: use of undeclared identifier 'last_percpu_ref_node'; did you mean 'next_percpu_ref_node'?
     741 |         while (READ_ONCE(last_percpu_ref_node) != NULL && max_count--)
         |                          ^~~~~~~~~~~~~~~~~~~~
         |                          next_percpu_ref_node
   include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE'
      49 |         compiletime_assert_rwonce_type(x);                              \
         |                                        ^
   include/asm-generic/rwonce.h:36:35: note: expanded from macro 'compiletime_assert_rwonce_type'
      36 |         compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long),  \
         |                                          ^
   include/linux/compiler_types.h:478:10: note: expanded from macro '__native_word'
     478 |          sizeof(t) == sizeof(int) || sizeof(t) == sizeof(long))
         |                 ^
   include/linux/compiler_types.h:510:22: note: expanded from macro 'compiletime_assert'
     510 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |                             ^
   include/linux/compiler_types.h:498:23: note: expanded from macro '_compiletime_assert'
     498 |         __compiletime_assert(condition, msg, prefix, suffix)
         |                              ^
   include/linux/compiler_types.h:490:9: note: expanded from macro '__compiletime_assert'
     490 |                 if (!(condition))                                       \
         |                       ^
   lib/percpu-refcount.c:51:26: note: 'next_percpu_ref_node' declared here
      51 | static struct list_head *next_percpu_ref_node = &percpu_ref_manage_head;
         |                          ^
>> lib/percpu-refcount.c:741:19: error: use of undeclared identifier 'last_percpu_ref_node'; did you mean 'next_percpu_ref_node'?
     741 |         while (READ_ONCE(last_percpu_ref_node) != NULL && max_count--)
         |                          ^~~~~~~~~~~~~~~~~~~~
         |                          next_percpu_ref_node
   include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE'
      49 |         compiletime_assert_rwonce_type(x);                              \
         |                                        ^
   include/asm-generic/rwonce.h:36:35: note: expanded from macro 'compiletime_assert_rwonce_type'
      36 |         compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long),  \
         |                                          ^
   include/linux/compiler_types.h:478:38: note: expanded from macro '__native_word'
     478 |          sizeof(t) == sizeof(int) || sizeof(t) == sizeof(long))
         |                                             ^
   include/linux/compiler_types.h:510:22: note: expanded from macro 'compiletime_assert'
     510 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |                             ^
   include/linux/compiler_types.h:498:23: note: expanded from macro '_compiletime_assert'
     498 |         __compiletime_assert(condition, msg, prefix, suffix)
         |                              ^
   include/linux/compiler_types.h:490:9: note: expanded from macro '__compiletime_assert'
     490 |                 if (!(condition))                                       \
         |                       ^
   lib/percpu-refcount.c:51:26: note: 'next_percpu_ref_node' declared here
      51 | static struct list_head *next_percpu_ref_node = &percpu_ref_manage_head;
         |                          ^
>> lib/percpu-refcount.c:741:19: error: use of undeclared identifier 'last_percpu_ref_node'; did you mean 'next_percpu_ref_node'?
     741 |         while (READ_ONCE(last_percpu_ref_node) != NULL && max_count--)
         |                          ^~~~~~~~~~~~~~~~~~~~
         |                          next_percpu_ref_node
   include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE'
      49 |         compiletime_assert_rwonce_type(x);                              \
         |                                        ^
   include/asm-generic/rwonce.h:36:48: note: expanded from macro 'compiletime_assert_rwonce_type'
      36 |         compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long),  \
         |                                                       ^
   include/linux/compiler_types.h:510:22: note: expanded from macro 'compiletime_assert'
     510 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |                             ^
   include/linux/compiler_types.h:498:23: note: expanded from macro '_compiletime_assert'
     498 |         __compiletime_assert(condition, msg, prefix, suffix)
         |                              ^
   include/linux/compiler_types.h:490:9: note: expanded from macro '__compiletime_assert'
     490 |                 if (!(condition))                                       \
         |                       ^
   lib/percpu-refcount.c:51:26: note: 'next_percpu_ref_node' declared here
      51 | static struct list_head *next_percpu_ref_node = &percpu_ref_manage_head;
         |                          ^
>> lib/percpu-refcount.c:741:19: error: use of undeclared identifier 'last_percpu_ref_node'; did you mean 'next_percpu_ref_node'?
     741 |         while (READ_ONCE(last_percpu_ref_node) != NULL && max_count--)
         |                          ^~~~~~~~~~~~~~~~~~~~
         |                          next_percpu_ref_node
   include/asm-generic/rwonce.h:50:14: note: expanded from macro 'READ_ONCE'
      50 |         __READ_ONCE(x);                                                 \
         |                     ^
   include/asm-generic/rwonce.h:44:65: note: expanded from macro '__READ_ONCE'
      44 | #define __READ_ONCE(x)  (*(const volatile __unqual_scalar_typeof(x) *)&(x))
         |                                                                  ^
   include/linux/compiler_types.h:466:13: note: expanded from macro '__unqual_scalar_typeof'
     466 |                 _Generic((x),                                           \
         |                           ^
   lib/percpu-refcount.c:51:26: note: 'next_percpu_ref_node' declared here
      51 | static struct list_head *next_percpu_ref_node = &percpu_ref_manage_head;
         |                          ^
>> lib/percpu-refcount.c:741:19: error: use of undeclared identifier 'last_percpu_ref_node'; did you mean 'next_percpu_ref_node'?
     741 |         while (READ_ONCE(last_percpu_ref_node) != NULL && max_count--)
         |                          ^~~~~~~~~~~~~~~~~~~~
         |                          next_percpu_ref_node
   include/asm-generic/rwonce.h:50:14: note: expanded from macro 'READ_ONCE'
      50 |         __READ_ONCE(x);                                                 \
         |                     ^
   include/asm-generic/rwonce.h:44:65: note: expanded from macro '__READ_ONCE'
      44 | #define __READ_ONCE(x)  (*(const volatile __unqual_scalar_typeof(x) *)&(x))
         |                                                                  ^
   include/linux/compiler_types.h:473:15: note: expanded from macro '__unqual_scalar_typeof'
     473 |                          default: (x)))
         |                                    ^
   lib/percpu-refcount.c:51:26: note: 'next_percpu_ref_node' declared here
      51 | static struct list_head *next_percpu_ref_node = &percpu_ref_manage_head;
         |                          ^
>> lib/percpu-refcount.c:741:19: error: use of undeclared identifier 'last_percpu_ref_node'; did you mean 'next_percpu_ref_node'?
     741 |         while (READ_ONCE(last_percpu_ref_node) != NULL && max_count--)
         |                          ^~~~~~~~~~~~~~~~~~~~
         |                          next_percpu_ref_node
   include/asm-generic/rwonce.h:50:14: note: expanded from macro 'READ_ONCE'
      50 |         __READ_ONCE(x);                                                 \
         |                     ^
   include/asm-generic/rwonce.h:44:72: note: expanded from macro '__READ_ONCE'
      44 | #define __READ_ONCE(x)  (*(const volatile __unqual_scalar_typeof(x) *)&(x))
         |                                                                         ^
   lib/percpu-refcount.c:51:26: note: 'next_percpu_ref_node' declared here
      51 | static struct list_head *next_percpu_ref_node = &percpu_ref_manage_head;
         |                          ^
   8 errors generated.


vim +741 lib/percpu-refcount.c

377193f4f16a1b Neeraj Upadhyay 2024-09-16  722  
377193f4f16a1b Neeraj Upadhyay 2024-09-16  723  void percpu_ref_test_flush_release_work(void)
377193f4f16a1b Neeraj Upadhyay 2024-09-16  724  {
377193f4f16a1b Neeraj Upadhyay 2024-09-16  725  	int max_flush = READ_ONCE(max_scan_count);
377193f4f16a1b Neeraj Upadhyay 2024-09-16  726  	int max_count = 1000;
377193f4f16a1b Neeraj Upadhyay 2024-09-16  727  
377193f4f16a1b Neeraj Upadhyay 2024-09-16  728  	/* Complete any executing release work */
377193f4f16a1b Neeraj Upadhyay 2024-09-16  729  	flush_delayed_work(&percpu_ref_release_work);
377193f4f16a1b Neeraj Upadhyay 2024-09-16  730  	/* Scan till the end of the llist */
377193f4f16a1b Neeraj Upadhyay 2024-09-16  731  	WRITE_ONCE(max_scan_count, INT_MAX);
377193f4f16a1b Neeraj Upadhyay 2024-09-16  732  	/* max scan count update visible to release work */
377193f4f16a1b Neeraj Upadhyay 2024-09-16  733  	smp_mb();
377193f4f16a1b Neeraj Upadhyay 2024-09-16  734  	flush_delayed_work(&percpu_ref_release_work);
377193f4f16a1b Neeraj Upadhyay 2024-09-16  735  	/* max scan count update visible to release work */
377193f4f16a1b Neeraj Upadhyay 2024-09-16  736  	smp_mb();
377193f4f16a1b Neeraj Upadhyay 2024-09-16  737  	WRITE_ONCE(max_scan_count, 1);
377193f4f16a1b Neeraj Upadhyay 2024-09-16  738  	/* max scan count update visible to work */
377193f4f16a1b Neeraj Upadhyay 2024-09-16  739  	smp_mb();
377193f4f16a1b Neeraj Upadhyay 2024-09-16  740  	flush_delayed_work(&percpu_ref_release_work);
377193f4f16a1b Neeraj Upadhyay 2024-09-16 @741  	while (READ_ONCE(last_percpu_ref_node) != NULL && max_count--)
377193f4f16a1b Neeraj Upadhyay 2024-09-16  742  		flush_delayed_work(&percpu_ref_release_work);
377193f4f16a1b Neeraj Upadhyay 2024-09-16  743  	/* max scan count update visible to work */
377193f4f16a1b Neeraj Upadhyay 2024-09-16  744  	smp_mb();
377193f4f16a1b Neeraj Upadhyay 2024-09-16  745  	WRITE_ONCE(max_scan_count, max_flush);
377193f4f16a1b Neeraj Upadhyay 2024-09-16  746  }
377193f4f16a1b Neeraj Upadhyay 2024-09-16  747  EXPORT_SYMBOL_GPL(percpu_ref_test_flush_release_work);
377193f4f16a1b Neeraj Upadhyay 2024-09-16  748  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

           reply	other threads:[~2024-09-16 19:08 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20240916050811.473556-4-Neeraj.Upadhyay@amd.com>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202409170250.ukGxk6pH-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=Neeraj.Upadhyay@amd.com \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox