From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id A305DC433EF for ; Sat, 27 Nov 2021 02:43:58 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6E7186B0075; Fri, 26 Nov 2021 21:43:47 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 696FA6B007B; Fri, 26 Nov 2021 21:43:47 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 55EC16B007D; Fri, 26 Nov 2021 21:43:47 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0167.hostedemail.com [216.40.44.167]) by kanga.kvack.org (Postfix) with ESMTP id 48E8D6B0075 for ; Fri, 26 Nov 2021 21:43:47 -0500 (EST) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id F0C2218021845 for ; Sat, 27 Nov 2021 02:43:36 +0000 (UTC) X-FDA: 78853164516.10.9DD5935 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by imf15.hostedemail.com (Postfix) with ESMTP id 4F099D00009A for ; Sat, 27 Nov 2021 02:43:30 +0000 (UTC) X-IronPort-AV: E=McAfee;i="6200,9189,10180"; a="233230649" X-IronPort-AV: E=Sophos;i="5.87,267,1631602800"; d="scan'208";a="233230649" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Nov 2021 18:43:34 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,267,1631602800"; d="scan'208";a="675707630" Received: from lkp-server02.sh.intel.com (HELO 9e1e9f9b3bcb) ([10.239.97.151]) by orsmga005.jf.intel.com with ESMTP; 26 Nov 2021 18:43:31 -0800 Received: from kbuild by 9e1e9f9b3bcb with local (Exim 4.92) (envelope-from ) id 1mqngY-0008xH-9s; Sat, 27 Nov 2021 02:43:30 +0000 Date: Sat, 27 Nov 2021 10:43:14 +0800 From: kernel test robot To: Muchun Song Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org, linux-kernel@vger.kernel.org, Shakeel Butt , Miaohe Lin , Andrew Morton , Linux Memory Management List Subject: mm/memcontrol.c:1058:29: warning: unused function 'memcg_kmem_bypass' Message-ID: <202111271029.EeYluWMG-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 4F099D00009A X-Stat-Signature: si34o49jko1yj8t7bn4q7yunwm3bpe8f Authentication-Results: imf15.hostedemail.com; dkim=none; spf=none (imf15.hostedemail.com: domain of lkp@intel.com has no SPF policy when checking 192.55.52.93) smtp.mailfrom=lkp@intel.com; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=intel.com (policy=none) X-HE-Tag: 1637981010-960939 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: c5c17547b778975b3d83a73c8d84e8fb5ecf3ba5 commit: b4e0b68fbd9d1fd7e31cbe8adca3ad6cf556e2ee mm: memcontrol: use obj_cgroup APIs to charge kmem pages date: 7 months ago config: mips-randconfig-r022-20211122 (https://download.01.org/0day-ci/archive/20211127/202111271029.EeYluWMG-lkp@intel.com/config) compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project c133fb321f7ca6083ce15b6aa5bf89de6600e649) 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 mips cross compiling tool for clang build # apt-get install binutils-mips-linux-gnu # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b4e0b68fbd9d1fd7e31cbe8adca3ad6cf556e2ee git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git fetch --no-tags linus master git checkout b4e0b68fbd9d1fd7e31cbe8adca3ad6cf556e2ee # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): >> mm/memcontrol.c:1058:29: warning: unused function 'memcg_kmem_bypass' static __always_inline bool memcg_kmem_bypass(void) ^ fatal error: error in backend: Nested variants found in inline asm string: ' .set push .set noat .set push .set arch=r4000 .if ( 0x00 ) != -1)) 0x00 ) != -1)) : ($( static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((__section__("_ftrace_branch"))) __if_trace = $( .func = __func__, .file = "arch/mips/include/asm/cmpxchg.h", .line = 163, $); 0x00 ) != -1)) : $))) ) && ( 0 ); .set push; .set mips64r2; .rept 1; sync 0x00; .endr; .set pop; .else; ; .endif 1: ll $0, $2 # __cmpxchg_asm bne $0, ${3:z}, 2f .set pop move $$1, ${4:z} .set arch=r4000 sc $$1, $1 beqz $$1, 1b .set pop 2: .if ( 0x00 ) != -1)) 0x00 ) != -1)) : ($( static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((__section__("_ftrace_branch"))) __if_trace = $( .func = __func__, .file = "arch/mips/include/asm/cmpxchg.h", .line = 163, $); 0x00 ) != -1)) : $))) ) && ( 0 ); .set push; .set mips64r2; .rept 1; sync 0x00; .endr; .set pop; .else; ; .endif ' clang-14: error: clang frontend command failed with exit code 70 (use -v to see invocation) clang version 14.0.0 (git://gitmirror/llvm_project 5162b558d8c0b542e752b037e72a69d5fd51eb1e) Target: mips-unknown-linux Thread model: posix InstalledDir: /opt/cross/clang-5162b558d8/bin clang-14: note: diagnostic msg: Makefile arch block certs crypto drivers fs include init ipc kernel lib mm net nr_bisected scripts security sound source usr virt vim +/memcg_kmem_bypass +1058 mm/memcontrol.c 279c3393e2c1133 Roman Gushchin 2020-10-17 1057 4127c6504f25c4f Roman Gushchin 2020-10-17 @1058 static __always_inline bool memcg_kmem_bypass(void) 4127c6504f25c4f Roman Gushchin 2020-10-17 1059 { 4127c6504f25c4f Roman Gushchin 2020-10-17 1060 /* Allow remote memcg charging from any context. */ 4127c6504f25c4f Roman Gushchin 2020-10-17 1061 if (unlikely(active_memcg())) 4127c6504f25c4f Roman Gushchin 2020-10-17 1062 return false; 4127c6504f25c4f Roman Gushchin 2020-10-17 1063 4127c6504f25c4f Roman Gushchin 2020-10-17 1064 /* Memcg to charge can't be determined. */ 4127c6504f25c4f Roman Gushchin 2020-10-17 1065 if (in_interrupt() || !current->mm || (current->flags & PF_KTHREAD)) 4127c6504f25c4f Roman Gushchin 2020-10-17 1066 return true; 4127c6504f25c4f Roman Gushchin 2020-10-17 1067 4127c6504f25c4f Roman Gushchin 2020-10-17 1068 return false; 4127c6504f25c4f Roman Gushchin 2020-10-17 1069 } 4127c6504f25c4f Roman Gushchin 2020-10-17 1070 :::::: The code at line 1058 was first introduced by commit :::::: 4127c6504f25c4fcff52dc996efda2ef859dd661 mm: kmem: enable kernel memcg accounting from interrupt contexts :::::: TO: Roman Gushchin :::::: CC: Linus Torvalds --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org