* mainline build failure due to d1d4ff5d11a5 ("cgroup: put cgroup_tryget_css() inside CONFIG_CGROUP_SCHED")
@ 2023-09-02 11:32 Sudip Mukherjee (Codethink)
2023-09-02 15:37 ` Linus Torvalds
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Sudip Mukherjee (Codethink) @ 2023-09-02 11:32 UTC (permalink / raw)
To: Miaohe Lin, Tejun Heo
Cc: Zefan Li, Johannes Weiner, cgroups, linux-kernel, Linus Torvalds,
regressions
Hi All,
The latest mainline kernel branch fails to build mips sb1250_swarm_defconfig with
the error:
kernel/cgroup/cgroup.c: In function 'cgroup_local_stat_show':
kernel/cgroup/cgroup.c:3699:15: error: implicit declaration of function 'cgroup_tryget_css'; did you mean 'cgroup_tryget'? [-Werror=implicit-function-declaration]
3699 | css = cgroup_tryget_css(cgrp, ss);
| ^~~~~~~~~~~~~~~~~
| cgroup_tryget
kernel/cgroup/cgroup.c:3699:13: warning: assignment to 'struct cgroup_subsys_state *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
3699 | css = cgroup_tryget_css(cgrp, ss);
| ^
git bisect pointed to d1d4ff5d11a5 ("cgroup: put cgroup_tryget_css() inside CONFIG_CGROUP_SCHED").
Reverting the commit has fixed the build failure.
I will be happy to test any patch or provide any extra log if needed.
#regzbot introduced: d1d4ff5d11a5887a9c4cfc00294bc68ba03e7c16
--
Regards
Sudip
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: mainline build failure due to d1d4ff5d11a5 ("cgroup: put cgroup_tryget_css() inside CONFIG_CGROUP_SCHED") 2023-09-02 11:32 mainline build failure due to d1d4ff5d11a5 ("cgroup: put cgroup_tryget_css() inside CONFIG_CGROUP_SCHED") Sudip Mukherjee (Codethink) @ 2023-09-02 15:37 ` Linus Torvalds 2023-09-02 15:44 ` Tejun Heo 2023-09-02 15:42 ` [PATCH cgroup/for-6.6-fixes] cgroup: Put cgroup_local_stat_show() inside CONFIG_CGROUP_SCHED Tejun Heo 2023-09-03 6:24 ` mainline build failure due to d1d4ff5d11a5 ("cgroup: put cgroup_tryget_css() inside CONFIG_CGROUP_SCHED") Linux regression tracking #update (Thorsten Leemhuis) 2 siblings, 1 reply; 7+ messages in thread From: Linus Torvalds @ 2023-09-02 15:37 UTC (permalink / raw) To: Sudip Mukherjee (Codethink) Cc: Miaohe Lin, Tejun Heo, Zefan Li, Johannes Weiner, cgroups, linux-kernel, regressions On Sat, 2 Sept 2023 at 04:32, Sudip Mukherjee (Codethink) <sudipm.mukherjee@gmail.com> wrote: > > git bisect pointed to d1d4ff5d11a5 ("cgroup: put cgroup_tryget_css() inside CONFIG_CGROUP_SCHED"). I pushed out a commit that should fix it (76be05d4fd6c: "cgroup: fix build when CGROUP_SCHED is not enabled") Linus ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: mainline build failure due to d1d4ff5d11a5 ("cgroup: put cgroup_tryget_css() inside CONFIG_CGROUP_SCHED") 2023-09-02 15:37 ` Linus Torvalds @ 2023-09-02 15:44 ` Tejun Heo 0 siblings, 0 replies; 7+ messages in thread From: Tejun Heo @ 2023-09-02 15:44 UTC (permalink / raw) To: Linus Torvalds Cc: Sudip Mukherjee (Codethink), Miaohe Lin, Zefan Li, Johannes Weiner, cgroups, linux-kernel, regressions On Sat, Sep 02, 2023 at 08:37:38AM -0700, Linus Torvalds wrote: > On Sat, 2 Sept 2023 at 04:32, Sudip Mukherjee (Codethink) > <sudipm.mukherjee@gmail.com> wrote: > > > > git bisect pointed to d1d4ff5d11a5 ("cgroup: put cgroup_tryget_css() inside CONFIG_CGROUP_SCHED"). > > I pushed out a commit that should fix it (76be05d4fd6c: "cgroup: fix > build when CGROUP_SCHED is not enabled") Ah, you beat me to it. I'll drop my fix branch. Thanks. -- tejun ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH cgroup/for-6.6-fixes] cgroup: Put cgroup_local_stat_show() inside CONFIG_CGROUP_SCHED 2023-09-02 11:32 mainline build failure due to d1d4ff5d11a5 ("cgroup: put cgroup_tryget_css() inside CONFIG_CGROUP_SCHED") Sudip Mukherjee (Codethink) 2023-09-02 15:37 ` Linus Torvalds @ 2023-09-02 15:42 ` Tejun Heo 2023-09-02 15:45 ` Linus Torvalds 2023-09-02 19:43 ` kernel test robot 2023-09-03 6:24 ` mainline build failure due to d1d4ff5d11a5 ("cgroup: put cgroup_tryget_css() inside CONFIG_CGROUP_SCHED") Linux regression tracking #update (Thorsten Leemhuis) 2 siblings, 2 replies; 7+ messages in thread From: Tejun Heo @ 2023-09-02 15:42 UTC (permalink / raw) To: Sudip Mukherjee (Codethink) Cc: Miaohe Lin, Zefan Li, Johannes Weiner, cgroups, linux-kernel, Linus Torvalds, regressions From d8416c5d2a38e36651f022be01bb234a404b8f01 Mon Sep 17 00:00:00 2001 From: Tejun Heo <tj@kernel.org> Date: Sat, 2 Sep 2023 05:28:06 -1000 677ea015f231 ("sched: add throttled time stat for throttled children") which was merged through the sched branch added cgroup_local_stat_show() which is marked with __maybe_unused and used iff CONFIG_CGROUP_SCHED is set. This was following the existing pattern of cgroup_extra_stat_show(). However, in the cgroup tree, 1299eb2b0ad5 ("cgroup: minor cleanup for cgroup_extra_stat_show()") moved cgroup_extra_stat_show() inside CONFIG_CGROUP_SCHED and dropped __maybe_unused and subsequently d1d4ff5d11a5 ("cgroup: put cgroup_tryget_css() inside CONFIG_CGROUP_SCHED") moved cgroup_tryget_css() inside the config option too as cgroup_extra_stat_show() was the only user. When the tree commits met in mainline, this led to a build breakage when !CONFIG_CGROUP_SCHED as cgroup_tryget_css() was no longer available for the __maybe_unused cgroup_local_stat_show(). Fix it by moving cgroup_local_stat_show() inside CONFIG_CGROUP_SCHED and also drop __maybe_unused. Signed-off-by: Tejun Heo <tj@kernel.org> Reported-by: "Sudip Mukherjee (Codethink)" <sudipm.mukherjee@gmail.com> Link: http://lkml.kernel.org/r/ZPMdTJ7zwrCkdMTu@debian Fixes: 677ea015f231 ("sched: add throttled time stat for throttled children") Cc: Josh Don <joshdon@google.com> Cc: Miaohe Lin <linmiaohe@huawei.com> --- Sorry about that. This should fix it. Guess nobody is building linux-next w/ !CONFIG_CGROUP_SCHED. I'll send the pull request to Linus soon. Thanks. kernel/cgroup/cgroup.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c index babb34a643ea..156eb96d7cc5 100644 --- a/kernel/cgroup/cgroup.c +++ b/kernel/cgroup/cgroup.c @@ -3686,8 +3686,9 @@ static int cpu_stat_show(struct seq_file *seq, void *v) return ret; } -static int __maybe_unused cgroup_local_stat_show(struct seq_file *seq, - struct cgroup *cgrp, int ssid) +#ifdef CONFIG_CGROUP_SCHED +static int cgroup_local_stat_show(struct seq_file *seq, struct cgroup *cgrp, + int ssid) { struct cgroup_subsys *ss = cgroup_subsys[ssid]; struct cgroup_subsys_state *css; @@ -3704,6 +3705,7 @@ static int __maybe_unused cgroup_local_stat_show(struct seq_file *seq, css_put(css); return ret; } +#endif static int cpu_local_stat_show(struct seq_file *seq, void *v) { -- 2.42.0 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH cgroup/for-6.6-fixes] cgroup: Put cgroup_local_stat_show() inside CONFIG_CGROUP_SCHED 2023-09-02 15:42 ` [PATCH cgroup/for-6.6-fixes] cgroup: Put cgroup_local_stat_show() inside CONFIG_CGROUP_SCHED Tejun Heo @ 2023-09-02 15:45 ` Linus Torvalds 2023-09-02 19:43 ` kernel test robot 1 sibling, 0 replies; 7+ messages in thread From: Linus Torvalds @ 2023-09-02 15:45 UTC (permalink / raw) To: Tejun Heo Cc: Sudip Mukherjee (Codethink), Miaohe Lin, Zefan Li, Johannes Weiner, cgroups, linux-kernel, regressions On Sat, 2 Sept 2023 at 08:42, Tejun Heo <tj@kernel.org> wrote: > > Sorry about that. This should fix it. Guess nobody is building linux-next w/ > !CONFIG_CGROUP_SCHED. I'll send the pull request to Linus soon. I solved it slightly differently by moving the whole function around rather than adding yet another #ifdef. See 76be05d4fd6c ("cgroup: fix build when CGROUP_SCHED is not enabled") Linus ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH cgroup/for-6.6-fixes] cgroup: Put cgroup_local_stat_show() inside CONFIG_CGROUP_SCHED 2023-09-02 15:42 ` [PATCH cgroup/for-6.6-fixes] cgroup: Put cgroup_local_stat_show() inside CONFIG_CGROUP_SCHED Tejun Heo 2023-09-02 15:45 ` Linus Torvalds @ 2023-09-02 19:43 ` kernel test robot 1 sibling, 0 replies; 7+ messages in thread From: kernel test robot @ 2023-09-02 19:43 UTC (permalink / raw) To: Tejun Heo, Sudip Mukherjee (Codethink) Cc: oe-kbuild-all, Miaohe Lin, Zefan Li, Johannes Weiner, cgroups, linux-kernel, regressions Hi Tejun, kernel test robot noticed the following build warnings: [auto build test WARNING on next-20230831] [cannot apply to linus/master v6.5 v6.5-rc7 v6.5-rc6 v6.5] [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/Tejun-Heo/cgroup-Put-cgroup_local_stat_show-inside-CONFIG_CGROUP_SCHED/20230902-234358 base: next-20230831 patch link: https://lore.kernel.org/r/ZPNX-jZAZbebizXA%40slm.duckdns.org patch subject: [PATCH cgroup/for-6.6-fixes] cgroup: Put cgroup_local_stat_show() inside CONFIG_CGROUP_SCHED config: arm-defconfig (https://download.01.org/0day-ci/archive/20230903/202309030303.qSTfRgZC-lkp@intel.com/config) compiler: arm-linux-gnueabi-gcc (GCC) 13.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230903/202309030303.qSTfRgZC-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/202309030303.qSTfRgZC-lkp@intel.com/ All warnings (new ones prefixed by >>): >> kernel/cgroup/cgroup.c:503:36: warning: 'cgroup_tryget_css' defined but not used [-Wunused-function] 503 | static struct cgroup_subsys_state *cgroup_tryget_css(struct cgroup *cgrp, | ^~~~~~~~~~~~~~~~~ vim +/cgroup_tryget_css +503 kernel/cgroup/cgroup.c 42809dd4225b2f kernel/cgroup.c Tejun Heo 2012-11-19 494 d41bf8c9deaed1 kernel/cgroup/cgroup.c Tejun Heo 2017-10-23 495 /** d41bf8c9deaed1 kernel/cgroup/cgroup.c Tejun Heo 2017-10-23 496 * cgroup_tryget_css - try to get a cgroup's css for the specified subsystem d41bf8c9deaed1 kernel/cgroup/cgroup.c Tejun Heo 2017-10-23 497 * @cgrp: the cgroup of interest d41bf8c9deaed1 kernel/cgroup/cgroup.c Tejun Heo 2017-10-23 498 * @ss: the subsystem of interest d41bf8c9deaed1 kernel/cgroup/cgroup.c Tejun Heo 2017-10-23 499 * 08b2b6fdf6b260 kernel/cgroup/cgroup.c Zhen Lei 2021-05-24 500 * Find and get @cgrp's css associated with @ss. If the css doesn't exist d41bf8c9deaed1 kernel/cgroup/cgroup.c Tejun Heo 2017-10-23 501 * or is offline, %NULL is returned. d41bf8c9deaed1 kernel/cgroup/cgroup.c Tejun Heo 2017-10-23 502 */ d41bf8c9deaed1 kernel/cgroup/cgroup.c Tejun Heo 2017-10-23 @503 static struct cgroup_subsys_state *cgroup_tryget_css(struct cgroup *cgrp, d41bf8c9deaed1 kernel/cgroup/cgroup.c Tejun Heo 2017-10-23 504 struct cgroup_subsys *ss) d41bf8c9deaed1 kernel/cgroup/cgroup.c Tejun Heo 2017-10-23 505 { d41bf8c9deaed1 kernel/cgroup/cgroup.c Tejun Heo 2017-10-23 506 struct cgroup_subsys_state *css; d41bf8c9deaed1 kernel/cgroup/cgroup.c Tejun Heo 2017-10-23 507 d41bf8c9deaed1 kernel/cgroup/cgroup.c Tejun Heo 2017-10-23 508 rcu_read_lock(); d41bf8c9deaed1 kernel/cgroup/cgroup.c Tejun Heo 2017-10-23 509 css = cgroup_css(cgrp, ss); a581563f1bef03 kernel/cgroup/cgroup.c Peng Wang 2019-07-03 510 if (css && !css_tryget_online(css)) d41bf8c9deaed1 kernel/cgroup/cgroup.c Tejun Heo 2017-10-23 511 css = NULL; d41bf8c9deaed1 kernel/cgroup/cgroup.c Tejun Heo 2017-10-23 512 rcu_read_unlock(); d41bf8c9deaed1 kernel/cgroup/cgroup.c Tejun Heo 2017-10-23 513 d41bf8c9deaed1 kernel/cgroup/cgroup.c Tejun Heo 2017-10-23 514 return css; d41bf8c9deaed1 kernel/cgroup/cgroup.c Tejun Heo 2017-10-23 515 } d41bf8c9deaed1 kernel/cgroup/cgroup.c Tejun Heo 2017-10-23 516 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: mainline build failure due to d1d4ff5d11a5 ("cgroup: put cgroup_tryget_css() inside CONFIG_CGROUP_SCHED") 2023-09-02 11:32 mainline build failure due to d1d4ff5d11a5 ("cgroup: put cgroup_tryget_css() inside CONFIG_CGROUP_SCHED") Sudip Mukherjee (Codethink) 2023-09-02 15:37 ` Linus Torvalds 2023-09-02 15:42 ` [PATCH cgroup/for-6.6-fixes] cgroup: Put cgroup_local_stat_show() inside CONFIG_CGROUP_SCHED Tejun Heo @ 2023-09-03 6:24 ` Linux regression tracking #update (Thorsten Leemhuis) 2 siblings, 0 replies; 7+ messages in thread From: Linux regression tracking #update (Thorsten Leemhuis) @ 2023-09-03 6:24 UTC (permalink / raw) To: Sudip Mukherjee (Codethink); +Cc: cgroups, linux-kernel, regressions [TLDR: This mail in primarily relevant for Linux kernel regression tracking. See link in footer if these mails annoy you.] On 02.09.23 13:32, Sudip Mukherjee (Codethink) wrote: > Hi All, > > The latest mainline kernel branch fails to build mips sb1250_swarm_defconfig with > the error: > > kernel/cgroup/cgroup.c: In function 'cgroup_local_stat_show': > kernel/cgroup/cgroup.c:3699:15: error: implicit declaration of function 'cgroup_tryget_css'; did you mean 'cgroup_tryget'? [-Werror=implicit-function-declaration] > 3699 | css = cgroup_tryget_css(cgrp, ss); > | ^~~~~~~~~~~~~~~~~ > | cgroup_tryget > kernel/cgroup/cgroup.c:3699:13: warning: assignment to 'struct cgroup_subsys_state *' from 'int' makes pointer from integer without a cast [-Wint-conversion] > 3699 | css = cgroup_tryget_css(cgrp, ss); > | ^ > > > git bisect pointed to d1d4ff5d11a5 ("cgroup: put cgroup_tryget_css() inside CONFIG_CGROUP_SCHED"). > > Reverting the commit has fixed the build failure. > > I will be happy to test any patch or provide any extra log if needed. > > #regzbot introduced: d1d4ff5d11a5887a9c4cfc00294bc68ba03e7c16 #regzbot fix: 76be05d4fd6c91a3885298f1dc3efeef32846 #regzbot ignore-activity Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat) -- Everything you wanna know about Linux kernel regression tracking: https://linux-regtracking.leemhuis.info/about/#tldr That page also explains what to do if mails like this annoy you. ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-09-03 6:24 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-02 11:32 mainline build failure due to d1d4ff5d11a5 ("cgroup: put cgroup_tryget_css() inside CONFIG_CGROUP_SCHED") Sudip Mukherjee (Codethink)
2023-09-02 15:37 ` Linus Torvalds
2023-09-02 15:44 ` Tejun Heo
2023-09-02 15:42 ` [PATCH cgroup/for-6.6-fixes] cgroup: Put cgroup_local_stat_show() inside CONFIG_CGROUP_SCHED Tejun Heo
2023-09-02 15:45 ` Linus Torvalds
2023-09-02 19:43 ` kernel test robot
2023-09-03 6:24 ` mainline build failure due to d1d4ff5d11a5 ("cgroup: put cgroup_tryget_css() inside CONFIG_CGROUP_SCHED") Linux regression tracking #update (Thorsten Leemhuis)
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox