From: Michal Hocko <mhocko@kernel.org>
To: "Kirill A. Shutemov" <kirill@shutemov.name>
Cc: Vladimir Davydov <vdavydov@virtuozzo.com>,
Andrew Morton <akpm@linux-foundation.org>,
Johannes Weiner <hannes@cmpxchg.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] memcg: simplify and inline __mem_cgroup_from_kmem
Date: Fri, 16 Oct 2015 16:36:30 +0200 [thread overview]
Message-ID: <20151016143629.GE19597@dhcp22.suse.cz> (raw)
In-Reply-To: <20151016131726.GA602@node.shutemov.name>
On Fri 16-10-15 16:17:26, Kirill A. Shutemov wrote:
[...]
I've just encountered the same while updating mmotm git tree. Thanks for
the fix. All other configs which I am testing are good as well.
> virt_to_head_page() is defined in <linux/mm.h> but you don't include it,
> and the commit breaks build for me (on v4.3-rc5-mmotm-2015-10-15-15-20).
>
> CC arch/x86/kernel/asm-offsets.s
> In file included from /home/kas/linux/mm/include/linux/swap.h:8:0,
> from /home/kas/linux/mm/include/linux/suspend.h:4,
> from /home/kas/linux/mm/arch/x86/kernel/asm-offsets.c:12:
> /home/kas/linux/mm/include/linux/memcontrol.h: In function a??mem_cgroup_from_kmema??:
> /home/kas/linux/mm/include/linux/memcontrol.h:841:9: error: implicit declaration of function a??virt_to_head_pagea?? [-Werror=implicit-function-declaration]
> page = virt_to_head_page(ptr);
> ^
> /home/kas/linux/mm/include/linux/memcontrol.h:841:7: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
> page = virt_to_head_page(ptr);
> ^
> In file included from /home/kas/linux/mm/include/linux/suspend.h:8:0,
> from /home/kas/linux/mm/arch/x86/kernel/asm-offsets.c:12:
> /home/kas/linux/mm/include/linux/mm.h: At top level:
> /home/kas/linux/mm/include/linux/mm.h:452:28: error: conflicting types for a??virt_to_head_pagea??
> static inline struct page *virt_to_head_page(const void *x)
> ^
> In file included from /home/kas/linux/mm/include/linux/swap.h:8:0,
> from /home/kas/linux/mm/include/linux/suspend.h:4,
> from /home/kas/linux/mm/arch/x86/kernel/asm-offsets.c:12:
> /home/kas/linux/mm/include/linux/memcontrol.h:841:9: note: previous implicit declaration of a??virt_to_head_pagea?? was here
> page = virt_to_head_page(ptr);
> ^
> cc1: some warnings being treated as errors
>
> The patch below fixes it for me (and for allmodconfig on x86-64), but I'm not
> sure if it have any side effects on other configurations.
>
> diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
> index 47677acb4516..e8e52e502c20 100644
> --- a/include/linux/memcontrol.h
> +++ b/include/linux/memcontrol.h
> @@ -26,6 +26,7 @@
> #include <linux/page_counter.h>
> #include <linux/vmpressure.h>
> #include <linux/eventfd.h>
> +#include <linux/mm.h>
> #include <linux/mmzone.h>
> #include <linux/writeback.h>
>
> --
> Kirill A. Shutemov
>
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo@kvack.org. For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
--
Michal Hocko
SUSE Labs
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2015-10-16 14:36 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-04 22:21 [PATCH 1/3] memcg: simplify charging kmem pages Vladimir Davydov
2015-10-04 22:21 ` [PATCH 2/3] memcg: unify slab and other kmem pages charging Vladimir Davydov
2015-10-08 15:10 ` Michal Hocko
2015-10-17 0:19 ` Johannes Weiner
2015-10-17 15:05 ` Vladimir Davydov
2015-10-19 8:09 ` Michal Hocko
2015-10-04 22:21 ` [PATCH 3/3] memcg: simplify and inline __mem_cgroup_from_kmem Vladimir Davydov
2015-10-08 15:13 ` Michal Hocko
2015-10-16 13:17 ` Kirill A. Shutemov
2015-10-16 13:51 ` Vladimir Davydov
2015-10-16 22:12 ` Hugh Dickins
2015-10-16 22:19 ` Johannes Weiner
2015-10-16 22:21 ` Andrew Morton
2015-10-17 14:58 ` Vladimir Davydov
2015-10-19 8:08 ` Michal Hocko
2015-10-16 14:36 ` Michal Hocko [this message]
2015-10-08 14:40 ` [PATCH 1/3] memcg: simplify charging kmem pages Michal Hocko
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=20151016143629.GE19597@dhcp22.suse.cz \
--to=mhocko@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=hannes@cmpxchg.org \
--cc=kirill@shutemov.name \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=vdavydov@virtuozzo.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