All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: Re: [RFC PATCH 4/4] sched+mm: Use hazard pointers to track lazy active mm existence
Date: Fri, 4 Oct 2024 18:14:20 +0800	[thread overview]
Message-ID: <202410041810.3seDq730-lkp@intel.com> (raw)
In-Reply-To: <20241002010205.1341915-5-mathieu.desnoyers@efficios.com>

Hi Mathieu,

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

[auto build test WARNING on powerpc/next]
[also build test WARNING on powerpc/fixes akpm-mm/mm-everything linux/master linus/master v6.12-rc1 next-20241004]
[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/Mathieu-Desnoyers/compiler-h-Introduce-ptr_eq-to-preserve-address-dependency/20241002-090631
base:   https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
patch link:    https://lore.kernel.org/r/20241002010205.1341915-5-mathieu.desnoyers%40efficios.com
patch subject: [RFC PATCH 4/4] sched+mm: Use hazard pointers to track lazy active mm existence
config: x86_64-rhel-8.3-rust (https://download.01.org/0day-ci/archive/20241004/202410041810.3seDq730-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/20241004/202410041810.3seDq730-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/202410041810.3seDq730-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from arch/x86/kernel/asm-offsets.c:10:
   In file included from include/crypto/aria.h:22:
   In file included from include/linux/module.h:19:
   In file included from include/linux/elf.h:6:
   In file included from arch/x86/include/asm/elf.h:10:
   In file included from arch/x86/include/asm/ia32.h:7:
   In file included from include/linux/compat.h:17:
   In file included from include/linux/fs.h:13:
   In file included from include/linux/list_lru.h:14:
   In file included from include/linux/xarray.h:21:
   In file included from include/linux/sched/mm.h:12:
>> include/linux/hp.h:137:13: warning: variable 'slot' is uninitialized when used here [-Wuninitialized]
     137 |         ctx.slot = slot;
         |                    ^~~~
   include/linux/hp.h:110:22: note: initialize the variable 'slot' to silence this warning
     110 |         struct hp_slot *slot;
         |                             ^
         |                              = NULL
   1 warning generated.


vim +/slot +137 include/linux/hp.h

5f42d8c10ae4b3 Mathieu Desnoyers 2024-10-01  101  
5f42d8c10ae4b3 Mathieu Desnoyers 2024-10-01  102  /*
5f42d8c10ae4b3 Mathieu Desnoyers 2024-10-01  103   * hp_dereference_allocate: Dereference and allocate a hazard pointer.
5f42d8c10ae4b3 Mathieu Desnoyers 2024-10-01  104   *
5f42d8c10ae4b3 Mathieu Desnoyers 2024-10-01  105   * Returns a hazard pointer context.
5f42d8c10ae4b3 Mathieu Desnoyers 2024-10-01  106   */
5f42d8c10ae4b3 Mathieu Desnoyers 2024-10-01  107  static inline
5f42d8c10ae4b3 Mathieu Desnoyers 2024-10-01  108  struct hp_ctx hp_dereference_allocate(struct hp_slot __percpu *percpu_slots, void * const * addr_p)
5f42d8c10ae4b3 Mathieu Desnoyers 2024-10-01  109  {
5f42d8c10ae4b3 Mathieu Desnoyers 2024-10-01  110  	struct hp_slot *slot;
5f42d8c10ae4b3 Mathieu Desnoyers 2024-10-01  111  	void *addr, *addr2;
5f42d8c10ae4b3 Mathieu Desnoyers 2024-10-01  112  	struct hp_ctx ctx;
5f42d8c10ae4b3 Mathieu Desnoyers 2024-10-01  113  
5f42d8c10ae4b3 Mathieu Desnoyers 2024-10-01  114  	addr = READ_ONCE(*addr_p);
5f42d8c10ae4b3 Mathieu Desnoyers 2024-10-01  115  retry:
5f42d8c10ae4b3 Mathieu Desnoyers 2024-10-01  116  	ctx = hp_allocate(percpu_slots, addr);
5f42d8c10ae4b3 Mathieu Desnoyers 2024-10-01  117  	if (!hp_ctx_addr(ctx))
5f42d8c10ae4b3 Mathieu Desnoyers 2024-10-01  118  		goto fail;
5f42d8c10ae4b3 Mathieu Desnoyers 2024-10-01  119  	/* Memory ordering: Store B before Load A. */
5f42d8c10ae4b3 Mathieu Desnoyers 2024-10-01  120  	smp_mb();
5f42d8c10ae4b3 Mathieu Desnoyers 2024-10-01  121  	/*
5f42d8c10ae4b3 Mathieu Desnoyers 2024-10-01  122  	 * Use RCU dereference without lockdep checks, because
5f42d8c10ae4b3 Mathieu Desnoyers 2024-10-01  123  	 * lockdep is not aware of HP guarantees.
5f42d8c10ae4b3 Mathieu Desnoyers 2024-10-01  124  	 */
5f42d8c10ae4b3 Mathieu Desnoyers 2024-10-01  125  	addr2 = rcu_access_pointer(*addr_p);	/* Load A */
5f42d8c10ae4b3 Mathieu Desnoyers 2024-10-01  126  	/*
5f42d8c10ae4b3 Mathieu Desnoyers 2024-10-01  127  	 * If @addr_p content has changed since the first load,
5f42d8c10ae4b3 Mathieu Desnoyers 2024-10-01  128  	 * clear the hazard pointer and try again.
5f42d8c10ae4b3 Mathieu Desnoyers 2024-10-01  129  	 */
5f42d8c10ae4b3 Mathieu Desnoyers 2024-10-01  130  	if (!ptr_eq(addr2, addr)) {
5f42d8c10ae4b3 Mathieu Desnoyers 2024-10-01  131  		WRITE_ONCE(slot->addr, NULL);
5f42d8c10ae4b3 Mathieu Desnoyers 2024-10-01  132  		if (!addr2)
5f42d8c10ae4b3 Mathieu Desnoyers 2024-10-01  133  			goto fail;
5f42d8c10ae4b3 Mathieu Desnoyers 2024-10-01  134  		addr = addr2;
5f42d8c10ae4b3 Mathieu Desnoyers 2024-10-01  135  		goto retry;
5f42d8c10ae4b3 Mathieu Desnoyers 2024-10-01  136  	}
5f42d8c10ae4b3 Mathieu Desnoyers 2024-10-01 @137  	ctx.slot = slot;
5f42d8c10ae4b3 Mathieu Desnoyers 2024-10-01  138  	ctx.addr = addr2;
5f42d8c10ae4b3 Mathieu Desnoyers 2024-10-01  139  	return ctx;
5f42d8c10ae4b3 Mathieu Desnoyers 2024-10-01  140  
5f42d8c10ae4b3 Mathieu Desnoyers 2024-10-01  141  fail:
5f42d8c10ae4b3 Mathieu Desnoyers 2024-10-01  142  	ctx.slot = NULL;
5f42d8c10ae4b3 Mathieu Desnoyers 2024-10-01  143  	ctx.addr = NULL;
5f42d8c10ae4b3 Mathieu Desnoyers 2024-10-01  144  	return ctx;
5f42d8c10ae4b3 Mathieu Desnoyers 2024-10-01  145  }
5f42d8c10ae4b3 Mathieu Desnoyers 2024-10-01  146  

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

  reply	other threads:[~2024-10-04 10:15 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-02  1:02 [RFC PATCH 0/4] sched+mm: Track lazy active mm existence with hazard pointers Mathieu Desnoyers
2024-10-02  1:02 ` [RFC PATCH 1/4] compiler.h: Introduce ptr_eq() to preserve address dependency Mathieu Desnoyers
2024-10-03  0:08   ` Joel Fernandes
2024-10-03 14:19     ` Mathieu Desnoyers
2024-10-03 22:09       ` Joel Fernandes
2024-10-02  1:02 ` [RFC PATCH 2/4] Documentation: RCU: Refer to ptr_eq() Mathieu Desnoyers
2024-10-02  1:02 ` [RFC PATCH 3/4] hp: Implement Hazard Pointers Mathieu Desnoyers
2024-10-03  0:24   ` Boqun Feng
2024-10-03 13:30     ` Mathieu Desnoyers
2024-10-07 13:47       ` Boqun Feng
2024-10-07 14:52         ` Mathieu Desnoyers
2024-10-02  1:02 ` [RFC PATCH 4/4] sched+mm: Use hazard pointers to track lazy active mm existence Mathieu Desnoyers
2024-10-04 10:14   ` kernel test robot [this message]
2024-10-02 14:09 ` [RFC PATCH 0/4] sched+mm: Track lazy active mm existence with hazard pointers Paul E. McKenney
2024-10-02 15:26   ` Mathieu Desnoyers
2024-10-02 15:33     ` Matthew Wilcox
2024-10-02 15:36       ` Mathieu Desnoyers
2024-10-02 15:53         ` Mathieu Desnoyers
2024-10-02 15:58           ` Jens Axboe
2024-10-02 16:02             ` Mathieu Desnoyers
2024-10-02 16:14               ` Jens Axboe
2024-10-02 17:39 ` Linus Torvalds
2024-10-05 16:15   ` Peter Zijlstra
2024-10-05 16:56     ` Linus Torvalds
2024-10-07  7:06       ` Peter Zijlstra

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=202410041810.3seDq730-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=mathieu.desnoyers@efficios.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.