From mboxrd@z Thu Jan 1 00:00:00 1970 From: KAMEZAWA Hiroyuki Subject: [RFC][PATCH 1/7 v2] temporal compile-fix in linux-next Date: Fri, 27 Apr 2012 14:49:24 +0900 Message-ID: <4F9A3364.4090009@jp.fujitsu.com> References: <4F9A327A.6050409@jp.fujitsu.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4F9A327A.6050409-+CUm20s59erQFUHtdCDX3A@public.gmane.org> Sender: cgroups-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Content-Type: text/plain; charset="us-ascii" To: Linux Kernel Cc: "linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org" , "cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Michal Hocko , Johannes Weiner , Frederic Weisbecker , Glauber Costa , Tejun Heo , Han Ying , "Aneesh Kumar K.V" , Andrew Morton , kamezawa.hiroyuki-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Maybe Aneesh will post his own version. This is just for my work. >From eaf25c555ec809006220ef22ef152aa04c30c1af Mon Sep 17 00:00:00 2001 From: KAMEZAWA Hiroyuki Date: Thu, 26 Apr 2012 17:51:52 +0900 Subject: [PATCH 1/9] compile-fix My version of compile fix for linux-next, discussed between Andrew and Aneesh. Signed-off-by: KAMEZAWA Hiroyuki --- include/linux/hugetlb.h | 4 ---- include/linux/memcontrol.h | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index 828b073..fc226be 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h @@ -343,8 +343,4 @@ static inline unsigned int pages_per_huge_page(struct hstate *h) #define hstate_index(h) 0 #endif -#ifdef CONFIG_MEM_RES_CTLR_HUGETLB -extern int hugetlb_force_memcg_empty(struct cgroup *cgroup); -#endif - #endif /* _LINUX_HUGETLB_H */ diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index f173811..ca0914a 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h @@ -450,9 +450,14 @@ extern int mem_cgroup_move_hugetlb_parent(int idx, struct cgroup *cgroup, struct page *page); extern bool mem_cgroup_have_hugetlb_usage(struct cgroup *cgroup); +extern int hugetlb_force_memcg_empty(struct cgroup *cgroup); + extern void mem_cgroup_hugetlb_migrate(struct page *oldhpage, struct page *newhpage); #else +struct cgroup; +struct mem_cgroup; + static inline int mem_cgroup_hugetlb_charge_page(int idx, unsigned long nr_pages, struct mem_cgroup **ptr) @@ -494,6 +499,16 @@ mem_cgroup_move_hugetlb_parent(int idx, struct cgroup *cgroup, return 0; } +static inline void mem_cgroup_hugetlb_migrate(struct page *oldhpage, + struct page *newhpage) +{ + return; +} + +static inline int hugetlb_force_memcg_empty(struct cgroup *cgroup) +{ + return 0; +} #endif /* CONFIG_MEM_RES_CTLR_HUGETLB */ #endif /* _LINUX_MEMCONTROL_H */ -- 1.7.4.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx125.postini.com [74.125.245.125]) by kanga.kvack.org (Postfix) with SMTP id 8B8CE6B004A for ; Fri, 27 Apr 2012 01:51:23 -0400 (EDT) Received: from m1.gw.fujitsu.co.jp (unknown [10.0.50.71]) by fgwmail6.fujitsu.co.jp (Postfix) with ESMTP id 1B5293EE0BB for ; Fri, 27 Apr 2012 14:51:22 +0900 (JST) Received: from smail (m1 [127.0.0.1]) by outgoing.m1.gw.fujitsu.co.jp (Postfix) with ESMTP id F16DC45DE5A for ; Fri, 27 Apr 2012 14:51:21 +0900 (JST) Received: from s1.gw.fujitsu.co.jp (s1.gw.fujitsu.co.jp [10.0.50.91]) by m1.gw.fujitsu.co.jp (Postfix) with ESMTP id D8FC945DE58 for ; Fri, 27 Apr 2012 14:51:21 +0900 (JST) Received: from s1.gw.fujitsu.co.jp (localhost.localdomain [127.0.0.1]) by s1.gw.fujitsu.co.jp (Postfix) with ESMTP id C2D01E38007 for ; Fri, 27 Apr 2012 14:51:21 +0900 (JST) Received: from m105.s.css.fujitsu.com (m105.s.css.fujitsu.com [10.240.81.145]) by s1.gw.fujitsu.co.jp (Postfix) with ESMTP id 75FF8E38002 for ; Fri, 27 Apr 2012 14:51:21 +0900 (JST) Message-ID: <4F9A3364.4090009@jp.fujitsu.com> Date: Fri, 27 Apr 2012 14:49:24 +0900 From: KAMEZAWA Hiroyuki MIME-Version: 1.0 Subject: [RFC][PATCH 1/7 v2] temporal compile-fix in linux-next References: <4F9A327A.6050409@jp.fujitsu.com> In-Reply-To: <4F9A327A.6050409@jp.fujitsu.com> Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Linux Kernel Cc: "linux-mm@kvack.org" , "cgroups@vger.kernel.org" , Michal Hocko , Johannes Weiner , Frederic Weisbecker , Glauber Costa , Tejun Heo , Han Ying , "Aneesh Kumar K.V" , Andrew Morton , kamezawa.hiroyuki@gmail.com Maybe Aneesh will post his own version. This is just for my work. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754532Ab2D0FvZ (ORCPT ); Fri, 27 Apr 2012 01:51:25 -0400 Received: from fgwmail6.fujitsu.co.jp ([192.51.44.36]:51723 "EHLO fgwmail6.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752057Ab2D0FvX (ORCPT ); Fri, 27 Apr 2012 01:51:23 -0400 X-SecurityPolicyCheck: OK by SHieldMailChecker v1.7.4 Message-ID: <4F9A3364.4090009@jp.fujitsu.com> Date: Fri, 27 Apr 2012 14:49:24 +0900 From: KAMEZAWA Hiroyuki User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:12.0) Gecko/20120420 Thunderbird/12.0 MIME-Version: 1.0 To: Linux Kernel CC: "linux-mm@kvack.org" , "cgroups@vger.kernel.org" , Michal Hocko , Johannes Weiner , Frederic Weisbecker , Glauber Costa , Tejun Heo , Han Ying , "Aneesh Kumar K.V" , Andrew Morton , kamezawa.hiroyuki@gmail.com Subject: [RFC][PATCH 1/7 v2] temporal compile-fix in linux-next References: <4F9A327A.6050409@jp.fujitsu.com> In-Reply-To: <4F9A327A.6050409@jp.fujitsu.com> Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Maybe Aneesh will post his own version. This is just for my work. >>From eaf25c555ec809006220ef22ef152aa04c30c1af Mon Sep 17 00:00:00 2001 From: KAMEZAWA Hiroyuki Date: Thu, 26 Apr 2012 17:51:52 +0900 Subject: [PATCH 1/9] compile-fix My version of compile fix for linux-next, discussed between Andrew and Aneesh. Signed-off-by: KAMEZAWA Hiroyuki --- include/linux/hugetlb.h | 4 ---- include/linux/memcontrol.h | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index 828b073..fc226be 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h @@ -343,8 +343,4 @@ static inline unsigned int pages_per_huge_page(struct hstate *h) #define hstate_index(h) 0 #endif -#ifdef CONFIG_MEM_RES_CTLR_HUGETLB -extern int hugetlb_force_memcg_empty(struct cgroup *cgroup); -#endif - #endif /* _LINUX_HUGETLB_H */ diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index f173811..ca0914a 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h @@ -450,9 +450,14 @@ extern int mem_cgroup_move_hugetlb_parent(int idx, struct cgroup *cgroup, struct page *page); extern bool mem_cgroup_have_hugetlb_usage(struct cgroup *cgroup); +extern int hugetlb_force_memcg_empty(struct cgroup *cgroup); + extern void mem_cgroup_hugetlb_migrate(struct page *oldhpage, struct page *newhpage); #else +struct cgroup; +struct mem_cgroup; + static inline int mem_cgroup_hugetlb_charge_page(int idx, unsigned long nr_pages, struct mem_cgroup **ptr) @@ -494,6 +499,16 @@ mem_cgroup_move_hugetlb_parent(int idx, struct cgroup *cgroup, return 0; } +static inline void mem_cgroup_hugetlb_migrate(struct page *oldhpage, + struct page *newhpage) +{ + return; +} + +static inline int hugetlb_force_memcg_empty(struct cgroup *cgroup) +{ + return 0; +} #endif /* CONFIG_MEM_RES_CTLR_HUGETLB */ #endif /* _LINUX_MEMCONTROL_H */ -- 1.7.4.1