From: kernel test robot <lkp@intel.com>
To: chengkaitao <chengkaitao@didiglobal.com>,
tj@kernel.org, lizefan.x@bytedance.com, hannes@cmpxchg.org,
corbet@lwn.net, mhocko@kernel.org, roman.gushchin@linux.dev,
shakeelb@google.com, akpm@linux-foundation.org,
brauner@kernel.org, muchun.song@linux.dev
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
viro@zeniv.linux.org.uk, zhengqi.arch@bytedance.com,
ebiederm@xmission.com, Liam.Howlett@oracle.com,
chengzhihao1@huawei.com, pilgrimtao@gmail.com,
haolee.swjtu@gmail.com, yuzhao@google.com, willy@infradead.org,
vasily.averin@linux.dev, vbabka@suse.cz, surenb@google.com,
sfr@canb.auug.org.au, mcgrof@kernel.org, sujiaxun@uniontech.com,
feng.tang@intel.com, cgroups@vger.kernel.org,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH v3 1/2] mm: memcontrol: protect the memory in cgroup from being oom killed
Date: Sat, 6 May 2023 22:27:12 +0800 [thread overview]
Message-ID: <202305062204.ob5SRKVX-lkp@intel.com> (raw)
In-Reply-To: <20230506114948.6862-2-chengkaitao@didiglobal.com>
Hi chengkaitao,
kernel test robot noticed the following build warnings:
[auto build test WARNING on akpm-mm/mm-everything]
[also build test WARNING on tj-cgroup/for-next linus/master v6.3 next-20230505]
[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/chengkaitao/mm-memcontrol-protect-the-memory-in-cgroup-from-being-oom-killed/20230506-195043
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link: https://lore.kernel.org/r/20230506114948.6862-2-chengkaitao%40didiglobal.com
patch subject: [PATCH v3 1/2] mm: memcontrol: protect the memory in cgroup from being oom killed
config: i386-randconfig-a011-20230501 (https://download.01.org/0day-ci/archive/20230506/202305062204.ob5SRKVX-lkp@intel.com/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
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
# https://github.com/intel-lab-lkp/linux/commit/a2779b308166286f77728f04043cb7a17a16dd46
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review chengkaitao/mm-memcontrol-protect-the-memory-in-cgroup-from-being-oom-killed/20230506-195043
git checkout a2779b308166286f77728f04043cb7a17a16dd46
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202305062204.ob5SRKVX-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> mm/page_counter.c:44:36: warning: overflow in expression; result is -2147483648 with type 'long' [-Winteger-overflow]
if (protected == PAGE_COUNTER_MAX + 1)
^
1 warning generated.
--
mm/memcontrol.c:1739:2: error: implicit declaration of function 'seq_buf_do_printk' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
seq_buf_do_printk(&s, KERN_INFO);
^
>> mm/memcontrol.c:6445:37: warning: overflow in expression; result is -2147483648 with type 'long' [-Winteger-overflow]
else if (value == PAGE_COUNTER_MAX + 1)
^
mm/memcontrol.c:6743:34: warning: overflow in expression; result is -2147483648 with type 'long' [-Winteger-overflow]
oom_protect = PAGE_COUNTER_MAX + 1;
^
2 warnings and 1 error generated.
vim +/long +44 mm/page_counter.c
15
16 static void propagate_protected_usage(struct page_counter *c,
17 unsigned long usage)
18 {
19 unsigned long protected, old_protected;
20 long delta;
21
22 if (!c->parent)
23 return;
24
25 protected = min(usage, READ_ONCE(c->min));
26 old_protected = atomic_long_read(&c->min_usage);
27 if (protected != old_protected) {
28 old_protected = atomic_long_xchg(&c->min_usage, protected);
29 delta = protected - old_protected;
30 if (delta)
31 atomic_long_add(delta, &c->parent->children_min_usage);
32 }
33
34 protected = min(usage, READ_ONCE(c->low));
35 old_protected = atomic_long_read(&c->low_usage);
36 if (protected != old_protected) {
37 old_protected = atomic_long_xchg(&c->low_usage, protected);
38 delta = protected - old_protected;
39 if (delta)
40 atomic_long_add(delta, &c->parent->children_low_usage);
41 }
42
43 protected = READ_ONCE(c->oom_protect);
> 44 if (protected == PAGE_COUNTER_MAX + 1)
45 protected = atomic_long_read(&c->children_oom_protect_usage);
46 else
47 protected = min(usage, protected);
48 old_protected = atomic_long_read(&c->oom_protect_usage);
49 if (protected != old_protected) {
50 old_protected = atomic_long_xchg(&c->oom_protect_usage, protected);
51 delta = protected - old_protected;
52 if (delta)
53 atomic_long_add(delta, &c->parent->children_oom_protect_usage);
54 }
55 }
56
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
parent reply other threads:[~2023-05-06 14:27 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20230506114948.6862-2-chengkaitao@didiglobal.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=202305062204.ob5SRKVX-lkp@intel.com \
--to=lkp@intel.com \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=brauner@kernel.org \
--cc=cgroups@vger.kernel.org \
--cc=chengkaitao@didiglobal.com \
--cc=chengzhihao1@huawei.com \
--cc=corbet@lwn.net \
--cc=ebiederm@xmission.com \
--cc=feng.tang@intel.com \
--cc=hannes@cmpxchg.org \
--cc=haolee.swjtu@gmail.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan.x@bytedance.com \
--cc=llvm@lists.linux.dev \
--cc=mcgrof@kernel.org \
--cc=mhocko@kernel.org \
--cc=muchun.song@linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=pilgrimtao@gmail.com \
--cc=roman.gushchin@linux.dev \
--cc=sfr@canb.auug.org.au \
--cc=shakeelb@google.com \
--cc=sujiaxun@uniontech.com \
--cc=surenb@google.com \
--cc=tj@kernel.org \
--cc=vasily.averin@linux.dev \
--cc=vbabka@suse.cz \
--cc=viro@zeniv.linux.org.uk \
--cc=willy@infradead.org \
--cc=yuzhao@google.com \
--cc=zhengqi.arch@bytedance.com \
/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;
as well as URLs for NNTP newsgroup(s).