cgroups.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [cgroup:test-merge-for-4.4 1/1] mm/vmscan.c:178:6: error: implicit declaration of function 'cgroup_on_dfl'
@ 2015-11-03 22:26 kbuild test robot
       [not found] ` <201511040637.nB1K9bmQ%fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: kbuild test robot @ 2015-11-03 22:26 UTC (permalink / raw)
  To: Tejun Heo; +Cc: kbuild-all-JC7UmRfGjtg, cgroups-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 1894 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git test-merge-for-4.4
head:   1c93277f15d351a4c7244cdcc50c8f80cbd9e84e
commit: 1c93277f15d351a4c7244cdcc50c8f80cbd9e84e [1/1] Merge branch 'for-4.4' into test-merge-for-4.4
config: i386-randconfig-s1-201544 (attached as .config)
reproduce:
        git checkout 1c93277f15d351a4c7244cdcc50c8f80cbd9e84e
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   mm/vmscan.c: In function 'sane_reclaim':
>> mm/vmscan.c:178:6: error: implicit declaration of function 'cgroup_on_dfl' [-Werror=implicit-function-declaration]
     if (cgroup_on_dfl(memcg->css.cgroup))
         ^
   cc1: some warnings being treated as errors

vim +/cgroup_on_dfl +178 mm/vmscan.c

97c9341f Tejun Heo        2015-05-22  172  {
97c9341f Tejun Heo        2015-05-22  173  	struct mem_cgroup *memcg = sc->target_mem_cgroup;
97c9341f Tejun Heo        2015-05-22  174  
97c9341f Tejun Heo        2015-05-22  175  	if (!memcg)
97c9341f Tejun Heo        2015-05-22  176  		return true;
97c9341f Tejun Heo        2015-05-22  177  #ifdef CONFIG_CGROUP_WRITEBACK
d5028f9f Vladimir Davydov 2015-09-22 @178  	if (cgroup_on_dfl(memcg->css.cgroup))
97c9341f Tejun Heo        2015-05-22  179  		return true;
97c9341f Tejun Heo        2015-05-22  180  #endif
97c9341f Tejun Heo        2015-05-22  181  	return false;

:::::: The code at line 178 was first introduced by commit
:::::: d5028f9f7d8de5c375c52b98976b6f310e73398f vmscan: fix sane_reclaim helper for legacy memcg

:::::: TO: Vladimir Davydov <vdavydov-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
:::::: CC: Linus Torvalds <torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 21143 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [cgroup:test-merge-for-4.4 1/1] mm/vmscan.c:178:6: error: implicit declaration of function 'cgroup_on_dfl'
       [not found] ` <201511040637.nB1K9bmQ%fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
@ 2015-11-04  8:56   ` Michal Hocko
       [not found]     ` <20151104085630.GD29607-2MMpYkNvuYDjFM9bn6wA6Q@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Michal Hocko @ 2015-11-04  8:56 UTC (permalink / raw)
  To: Tejun Heo, kbuild test robot
  Cc: kbuild-all-JC7UmRfGjtg, cgroups-u79uwXL29TY76Z2rM5mHXA,
	Johannes Weiner

[CCing Johannes as well]

On Wed 04-11-15 06:26:39, Wu Fengguang wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git test-merge-for-4.4
> head:   1c93277f15d351a4c7244cdcc50c8f80cbd9e84e
> commit: 1c93277f15d351a4c7244cdcc50c8f80cbd9e84e [1/1] Merge branch 'for-4.4' into test-merge-for-4.4
> config: i386-randconfig-s1-201544 (attached as .config)
> reproduce:
>         git checkout 1c93277f15d351a4c7244cdcc50c8f80cbd9e84e
>         # save the attached .config to linux build tree
>         make ARCH=i386 
> 
> All errors (new ones prefixed by >>):
> 
>    mm/vmscan.c: In function 'sane_reclaim':
> >> mm/vmscan.c:178:6: error: implicit declaration of function 'cgroup_on_dfl' [-Werror=implicit-function-declaration]
>      if (cgroup_on_dfl(memcg->css.cgroup))
>          ^
>    cc1: some warnings being treated as errors

Ohh, this seems because CONFIG_CGROUP_WRITEBACK depends on BLK_CGROUP
and MEMCG and none of it depends on CGROUP. Dang. The patch is below
I haven't checked other controllers yet.

> vim +/cgroup_on_dfl +178 mm/vmscan.c
> 
> 97c9341f Tejun Heo        2015-05-22  172  {
> 97c9341f Tejun Heo        2015-05-22  173  	struct mem_cgroup *memcg = sc->target_mem_cgroup;
> 97c9341f Tejun Heo        2015-05-22  174  
> 97c9341f Tejun Heo        2015-05-22  175  	if (!memcg)
> 97c9341f Tejun Heo        2015-05-22  176  		return true;
> 97c9341f Tejun Heo        2015-05-22  177  #ifdef CONFIG_CGROUP_WRITEBACK
> d5028f9f Vladimir Davydov 2015-09-22 @178  	if (cgroup_on_dfl(memcg->css.cgroup))
> 97c9341f Tejun Heo        2015-05-22  179  		return true;
> 97c9341f Tejun Heo        2015-05-22  180  #endif
> 97c9341f Tejun Heo        2015-05-22  181  	return false;
---
From 509ebecf457b852b3d83af04be258833a434db16 Mon Sep 17 00:00:00 2001
From: Michal Hocko <mhocko-IBi9RG/b67k@public.gmane.org>
Date: Wed, 4 Nov 2015 09:45:20 +0100
Subject: [PATCH] make CONFIG_MEMCG and CONFIG_BLK_CGROUP depend on CGROUPS

Neither CONFIG_MEMCG nor CONFIG_BLK_CGROUP depend on CGROUPS which
doesn't really make much sense because none of them are usable without
all the infrastructure. This even leads to compilation problems as
reported by 0-day compile test:

   mm/vmscan.c: In function 'sane_reclaim':
>> mm/vmscan.c:178:6: error: implicit declaration of function 'cgroup_on_dfl' [-Werror=implicit-function-declaration]
     if (cgroup_on_dfl(memcg->css.cgroup))
         ^
   cc1: some warnings being treated as errors

Reported-by: kbuild test robot <fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Michal Hocko <mhocko-IBi9RG/b67k@public.gmane.org>
---
 init/Kconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/init/Kconfig b/init/Kconfig
index 287674421294..47fea987b82d 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1014,6 +1014,7 @@ config PAGE_COUNTER
 
 config MEMCG
 	bool "Memory Resource Controller for Control Groups"
+	depends on CGROUPS
 	select PAGE_COUNTER
 	select EVENTFD
 	help
@@ -1128,6 +1129,7 @@ endif #CGROUP_SCHED
 
 config BLK_CGROUP
 	bool "Block IO controller"
+	depends on CGROUPS
 	depends on BLOCK
 	default n
 	---help---
-- 
2.6.1



-- 
Michal Hocko
SUSE Labs

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [cgroup:test-merge-for-4.4 1/1] mm/vmscan.c:178:6: error: implicit declaration of function 'cgroup_on_dfl'
       [not found]     ` <20151104085630.GD29607-2MMpYkNvuYDjFM9bn6wA6Q@public.gmane.org>
@ 2015-11-04 17:22       ` Tejun Heo
       [not found]         ` <20151104172238.GJ5749-qYNAdHglDFBN0TnZuCh8vA@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Tejun Heo @ 2015-11-04 17:22 UTC (permalink / raw)
  To: Michal Hocko
  Cc: kbuild test robot, kbuild-all-JC7UmRfGjtg,
	cgroups-u79uwXL29TY76Z2rM5mHXA, Johannes Weiner

On Wed, Nov 04, 2015 at 09:56:30AM +0100, Michal Hocko wrote:
> Ohh, this seems because CONFIG_CGROUP_WRITEBACK depends on BLK_CGROUP
> and MEMCG and none of it depends on CGROUP. Dang. The patch is below
> I haven't checked other controllers yet.

They are inside if CGROUPS block.  It's just me not fixing up
cgroup_on_dfl() -> cgroup_subsys_on_dfl() on the test merge branch.
Please ignore.

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [cgroup:test-merge-for-4.4 1/1] mm/vmscan.c:178:6: error: implicit declaration of function 'cgroup_on_dfl'
       [not found]         ` <20151104172238.GJ5749-qYNAdHglDFBN0TnZuCh8vA@public.gmane.org>
@ 2015-11-05  8:06           ` Michal Hocko
  0 siblings, 0 replies; 4+ messages in thread
From: Michal Hocko @ 2015-11-05  8:06 UTC (permalink / raw)
  To: Tejun Heo
  Cc: kbuild test robot, kbuild-all-JC7UmRfGjtg,
	cgroups-u79uwXL29TY76Z2rM5mHXA, Johannes Weiner

On Wed 04-11-15 12:22:38, Tejun Heo wrote:
> On Wed, Nov 04, 2015 at 09:56:30AM +0100, Michal Hocko wrote:
> > Ohh, this seems because CONFIG_CGROUP_WRITEBACK depends on BLK_CGROUP
> > and MEMCG and none of it depends on CGROUP. Dang. The patch is below
> > I haven't checked other controllers yet.
> 
> They are inside if CGROUPS block.

I managed to completely miss that. Sorry about the noise

-- 
Michal Hocko
SUSE Labs

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-11-05  8:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-03 22:26 [cgroup:test-merge-for-4.4 1/1] mm/vmscan.c:178:6: error: implicit declaration of function 'cgroup_on_dfl' kbuild test robot
     [not found] ` <201511040637.nB1K9bmQ%fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-11-04  8:56   ` Michal Hocko
     [not found]     ` <20151104085630.GD29607-2MMpYkNvuYDjFM9bn6wA6Q@public.gmane.org>
2015-11-04 17:22       ` Tejun Heo
     [not found]         ` <20151104172238.GJ5749-qYNAdHglDFBN0TnZuCh8vA@public.gmane.org>
2015-11-05  8:06           ` Michal Hocko

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).