From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BE8E6482C5 for ; Wed, 20 Dec 2023 18:01:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="DJWEyTbK" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1703095315; x=1734631315; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=1eHSdKAdcLl3svp/SQeWuGtvxl/d2/uavwjQca5Q4RM=; b=DJWEyTbKt0Hg8P3egbsPWKGTjfbxkycxyW/L3TyMk3Vi6xbc8jSOMd3D xbVDI2MULm2xz1qkBviaqEhAcU+Jk9rMfSVdMz0KRATCUvRixLIX3+b5O ixpLEQwqSAtHczho5ha+uwA4inBpgY189bKPr72UxU1uqSaANufz/klIx O54Ev3hM0z6yo8Q9wptwU0KgvfpaUbUX5vQb4ngHLvN+9rR5RxCyqcmT6 2a07JT4bn1M5RFCKtPilPHDIHDgxbCZT3y1iU/4F5RxjPyxfqW5/TFnbT V2pxFeLeJ/kysJdPL/m1cZLxS1Mbb+wIB7JSuuJwDiKRUiQ/g4htsNtF0 g==; X-IronPort-AV: E=McAfee;i="6600,9927,10930"; a="460192409" X-IronPort-AV: E=Sophos;i="6.04,291,1695711600"; d="scan'208";a="460192409" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Dec 2023 10:01:44 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.04,291,1695711600"; d="scan'208";a="10828878" Received: from lkp-server02.sh.intel.com (HELO b07ab15da5fe) ([10.239.97.151]) by fmviesa002.fm.intel.com with ESMTP; 20 Dec 2023 10:01:41 -0800 Received: from kbuild by b07ab15da5fe with local (Exim 4.96) (envelope-from ) id 1rG0sx-0007IB-2B; Wed, 20 Dec 2023 18:01:36 +0000 Date: Thu, 21 Dec 2023 02:00:35 +0800 From: kernel test robot To: Zeng Heng , longman@redhat.com, boqun.feng@gmail.com, peterz@infradead.org, mingo@redhat.com, will@kernel.org, guohui@uniontech.com Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org, xiexiuqi@huawei.com, liwei391@huawei.com Subject: Re: [PATCH] locking/osq_lock: Avoid false sharing in optimistic_spin_node Message-ID: <202312210155.Wc2HUK8C-lkp@intel.com> References: <20231220070204.2662730-1-zengheng4@huawei.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231220070204.2662730-1-zengheng4@huawei.com> Hi Zeng, kernel test robot noticed the following build errors: [auto build test ERROR on tip/locking/core] [also build test ERROR on linus/master v6.7-rc6 next-20231220] [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/Zeng-Heng/locking-osq_lock-Avoid-false-sharing-in-optimistic_spin_node/20231220-150010 base: tip/locking/core patch link: https://lore.kernel.org/r/20231220070204.2662730-1-zengheng4%40huawei.com patch subject: [PATCH] locking/osq_lock: Avoid false sharing in optimistic_spin_node config: arm-defconfig (https://download.01.org/0day-ci/archive/20231221/202312210155.Wc2HUK8C-lkp@intel.com/config) compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project.git f28c006a5895fc0e329fe15fead81e37457cb1d1) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231221/202312210155.Wc2HUK8C-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 | Closes: https://lore.kernel.org/oe-kbuild-all/202312210155.Wc2HUK8C-lkp@intel.com/ All errors (new ones prefixed by >>): In file included from arch/arm/kernel/asm-offsets.c:11: In file included from include/linux/sched.h:15: In file included from include/linux/sem.h:5: In file included from include/uapi/linux/sem.h:5: In file included from include/linux/ipc.h:7: In file included from include/linux/rhashtable-types.h:14: In file included from include/linux/mutex.h:20: >> include/linux/osq_lock.h:16:9: error: expected ';' at end of declaration list int cpu ____cacheline_aligned; ^ ; In file included from arch/arm/kernel/asm-offsets.c:12: In file included from include/linux/mm.h:1084: In file included from include/linux/huge_mm.h:8: In file included from include/linux/fs.h:33: In file included from include/linux/percpu-rwsem.h:7: In file included from include/linux/rcuwait.h:6: In file included from include/linux/sched/signal.h:6: include/linux/signal.h:97:11: warning: array index 3 is past the end of the array (which contains 2 elements) [-Warray-bounds] return (set->sig[3] | set->sig[2] | ^ ~ arch/arm/include/asm/signal.h:17:2: note: array 'sig' declared here unsigned long sig[_NSIG_WORDS]; ^ In file included from arch/arm/kernel/asm-offsets.c:12: In file included from include/linux/mm.h:1084: In file included from include/linux/huge_mm.h:8: In file included from include/linux/fs.h:33: In file included from include/linux/percpu-rwsem.h:7: In file included from include/linux/rcuwait.h:6: In file included from include/linux/sched/signal.h:6: include/linux/signal.h:97:25: warning: array index 2 is past the end of the array (which contains 2 elements) [-Warray-bounds] return (set->sig[3] | set->sig[2] | ^ ~ arch/arm/include/asm/signal.h:17:2: note: array 'sig' declared here unsigned long sig[_NSIG_WORDS]; ^ In file included from arch/arm/kernel/asm-offsets.c:12: In file included from include/linux/mm.h:1084: In file included from include/linux/huge_mm.h:8: In file included from include/linux/fs.h:33: In file included from include/linux/percpu-rwsem.h:7: In file included from include/linux/rcuwait.h:6: In file included from include/linux/sched/signal.h:6: include/linux/signal.h:113:11: warning: array index 3 is past the end of the array (which contains 2 elements) [-Warray-bounds] return (set1->sig[3] == set2->sig[3]) && ^ ~ arch/arm/include/asm/signal.h:17:2: note: array 'sig' declared here unsigned long sig[_NSIG_WORDS]; ^ In file included from arch/arm/kernel/asm-offsets.c:12: In file included from include/linux/mm.h:1084: In file included from include/linux/huge_mm.h:8: In file included from include/linux/fs.h:33: In file included from include/linux/percpu-rwsem.h:7: In file included from include/linux/rcuwait.h:6: In file included from include/linux/sched/signal.h:6: include/linux/signal.h:113:27: warning: array index 3 is past the end of the array (which contains 2 elements) [-Warray-bounds] return (set1->sig[3] == set2->sig[3]) && ^ ~ arch/arm/include/asm/signal.h:17:2: note: array 'sig' declared here unsigned long sig[_NSIG_WORDS]; ^ In file included from arch/arm/kernel/asm-offsets.c:12: In file included from include/linux/mm.h:1084: In file included from include/linux/huge_mm.h:8: In file included from include/linux/fs.h:33: In file included from include/linux/percpu-rwsem.h:7: In file included from include/linux/rcuwait.h:6: In file included from include/linux/sched/signal.h:6: include/linux/signal.h:114:5: warning: array index 2 is past the end of the array (which contains 2 elements) [-Warray-bounds] (set1->sig[2] == set2->sig[2]) && ^ ~ arch/arm/include/asm/signal.h:17:2: note: array 'sig' declared here unsigned long sig[_NSIG_WORDS]; ^ In file included from arch/arm/kernel/asm-offsets.c:12: In file included from include/linux/mm.h:1084: In file included from include/linux/huge_mm.h:8: In file included from include/linux/fs.h:33: In file included from include/linux/percpu-rwsem.h:7: In file included from include/linux/rcuwait.h:6: In file included from include/linux/sched/signal.h:6: include/linux/signal.h:114:21: warning: array index 2 is past the end of the array (which contains 2 elements) [-Warray-bounds] (set1->sig[2] == set2->sig[2]) && ^ ~ arch/arm/include/asm/signal.h:17:2: note: array 'sig' declared here unsigned long sig[_NSIG_WORDS]; ^ In file included from arch/arm/kernel/asm-offsets.c:12: In file included from include/linux/mm.h:1084: In file included from include/linux/huge_mm.h:8: In file included from include/linux/fs.h:33: In file included from include/linux/percpu-rwsem.h:7: In file included from include/linux/rcuwait.h:6: In file included from include/linux/sched/signal.h:6: include/linux/signal.h:156:1: warning: array index 3 is past the end of the array (which contains 2 elements) [-Warray-bounds] _SIG_SET_BINOP(sigorsets, _sig_or) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/signal.h:137:8: note: expanded from macro '_SIG_SET_BINOP' a3 = a->sig[3]; a2 = a->sig[2]; \ ^ ~ arch/arm/include/asm/signal.h:17:2: note: array 'sig' declared here unsigned long sig[_NSIG_WORDS]; ^ In file included from arch/arm/kernel/asm-offsets.c:12: In file included from include/linux/mm.h:1084: In file included from include/linux/huge_mm.h:8: vim +16 include/linux/osq_lock.h 4 5 /* 6 * An MCS like lock especially tailored for optimistic spinning for sleeping 7 * lock implementations (mutex, rwsem, etc). 8 */ 9 struct optimistic_spin_node { 10 struct optimistic_spin_node *next, *prev; 11 int locked; /* 1 if lock acquired */ 12 /* 13 * Stores an encoded CPU # + 1 value. 14 * Only read by other cpus, so split into different cache lines. 15 */ > 16 int cpu ____cacheline_aligned; 17 }; 18 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki