From: kernel test robot <lkp@intel.com>
To: Chen Ridong <chenridong@huawei.com>,
tj@kernel.org, lizefan.x@bytedance.com, hannes@cmpxchg.org,
longman@redhat.com, adityakali@google.com, sergeh@kernel.org,
mkoutny@suse.com, guro@fb.com
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
cgroups@vger.kernel.org
Subject: Re: [PATCH v2 -next 3/3] cgroup/freezer: Reduce redundant propagation for cgroup_propagate_frozen
Date: Sun, 15 Sep 2024 02:18:07 +0800 [thread overview]
Message-ID: <202409150216.INlNatES-lkp@intel.com> (raw)
In-Reply-To: <20240912012037.1324165-4-chenridong@huawei.com>
Hi Chen,
kernel test robot noticed the following build warnings:
[auto build test WARNING on next-20240911]
url: https://github.com/intel-lab-lkp/linux/commits/Chen-Ridong/cgroup-freezer-Reduce-redundant-traversal-for-cgroup_freeze/20240912-093141
base: next-20240911
patch link: https://lore.kernel.org/r/20240912012037.1324165-4-chenridong%40huawei.com
patch subject: [PATCH v2 -next 3/3] cgroup/freezer: Reduce redundant propagation for cgroup_propagate_frozen
config: i386-defconfig (https://download.01.org/0day-ci/archive/20240915/202409150216.INlNatES-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/20240915/202409150216.INlNatES-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/202409150216.INlNatES-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> kernel/cgroup/freezer.c:46:12: warning: explicitly assigning value of variable of type 'struct cgroup *' to itself [-Wself-assign]
46 | for (cgrp = cgrp; cgrp; cgrp = cgroup_parent(cgrp)) {
| ~~~~ ^ ~~~~
1 warning generated.
vim +46 kernel/cgroup/freezer.c
32
33 /*
34 * Propagate the cgroup frozen state upwards by the cgroup tree.
35 */
36 static void cgroup_propagate_frozen(struct cgroup *cgrp, bool frozen)
37 {
38 int deta;
39 struct cgroup *parent;
40 /*
41 * If the new state is frozen, some freezing ancestor cgroups may change
42 * their state too, depending on if all their descendants are frozen.
43 *
44 * Otherwise, all ancestor cgroups are forced into the non-frozen state.
45 */
> 46 for (cgrp = cgrp; cgrp; cgrp = cgroup_parent(cgrp)) {
47 if (frozen) {
48 /* If freezer is not set, or cgrp has descendants
49 * that are not frozen, cgrp can't be frozen
50 */
51 if (!test_bit(CGRP_FREEZE, &cgrp->flags) ||
52 (cgrp->freezer.nr_frozen_descendants !=
53 cgrp->nr_descendants))
54 break;
55 deta = cgrp->freezer.nr_frozen_descendants + 1;
56 } else {
57 deta = -(cgrp->freezer.nr_frozen_descendants + 1);
58 }
59
60 /* No change, stop propagate */
61 if (!cgroup_update_frozen_flag(cgrp, frozen))
62 break;
63
64 parent = cgroup_parent(cgrp);
65 parent->freezer.nr_frozen_descendants += deta;
66 }
67 }
68
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
parent reply other threads:[~2024-09-14 18:18 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20240912012037.1324165-4-chenridong@huawei.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=202409150216.INlNatES-lkp@intel.com \
--to=lkp@intel.com \
--cc=adityakali@google.com \
--cc=cgroups@vger.kernel.org \
--cc=chenridong@huawei.com \
--cc=guro@fb.com \
--cc=hannes@cmpxchg.org \
--cc=lizefan.x@bytedance.com \
--cc=llvm@lists.linux.dev \
--cc=longman@redhat.com \
--cc=mkoutny@suse.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=sergeh@kernel.org \
--cc=tj@kernel.org \
/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