From: Mel Gorman <mel@csn.ul.ie>
To: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Andi Kleen <andi@firstfloor.org>,
Andrew Morton <akpm@linux-foundation.org>,
Wu Fengguang <fengguang.wu@intel.com>
Subject: Re: [PATCH 1/8] hugetlb: move definition of is_vm_hugetlb_page() to hugepage_inline.h
Date: Fri, 28 May 2010 11:03:50 +0100 [thread overview]
Message-ID: <20100528100350.GC9774@csn.ul.ie> (raw)
In-Reply-To: <1275006562-18946-2-git-send-email-n-horiguchi@ah.jp.nec.com>
On Fri, May 28, 2010 at 09:29:15AM +0900, Naoya Horiguchi wrote:
> is_vm_hugetlb_page() is a widely used inline function to insert hooks
> into hugetlb code.
> But we can't use it in pagemap.h because of circular dependency of
> the header files. This patch removes this limitation.
>
> Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
> ---
> include/linux/hugetlb.h | 11 +----------
> include/linux/hugetlb_inline.h | 22 ++++++++++++++++++++++
> include/linux/pagemap.h | 1 +
> 3 files changed, 24 insertions(+), 10 deletions(-)
> create mode 100644 include/linux/hugetlb_inline.h
>
> diff --git v2.6.34/include/linux/hugetlb.h v2.6.34/include/linux/hugetlb.h
> index 78b4bc6..d47a7c4 100644
> --- v2.6.34/include/linux/hugetlb.h
> +++ v2.6.34/include/linux/hugetlb.h
> @@ -2,6 +2,7 @@
> #define _LINUX_HUGETLB_H
>
> #include <linux/fs.h>
> +#include <linux/hugetlb_inline.h>
>
> struct ctl_table;
> struct user_struct;
> @@ -14,11 +15,6 @@ struct user_struct;
>
> int PageHuge(struct page *page);
>
> -static inline int is_vm_hugetlb_page(struct vm_area_struct *vma)
> -{
> - return vma->vm_flags & VM_HUGETLB;
> -}
> -
> void reset_vma_resv_huge_pages(struct vm_area_struct *vma);
> int hugetlb_sysctl_handler(struct ctl_table *, int, void __user *, size_t *, loff_t *);
> int hugetlb_overcommit_handler(struct ctl_table *, int, void __user *, size_t *, loff_t *);
> @@ -77,11 +73,6 @@ static inline int PageHuge(struct page *page)
> return 0;
> }
>
> -static inline int is_vm_hugetlb_page(struct vm_area_struct *vma)
> -{
> - return 0;
> -}
> -
> static inline void reset_vma_resv_huge_pages(struct vm_area_struct *vma)
> {
> }
> diff --git v2.6.34/include/linux/hugetlb_inline.h v2.6.34/include/linux/hugetlb_inline.h
> new file mode 100644
> index 0000000..cf00b6d
> --- /dev/null
> +++ v2.6.34/include/linux/hugetlb_inline.h
> @@ -0,0 +1,22 @@
> +#ifndef _LINUX_HUGETLB_INLINE_H
> +#define _LINUX_HUGETLB_INLINE_H 1
> +
Just #define __LINUX_HUGETLB_INLINE_H is fine. No need for the 1
> +#ifdef CONFIG_HUGETLBFS
> +
Should be CONFIG_HUGETLB_PAGE
With those corrections;
Acked-by: Mel Gorman <mel@csn.ul.ie>
> +#include <linux/mm.h>
> +
> +static inline int is_vm_hugetlb_page(struct vm_area_struct *vma)
> +{
> + return vma->vm_flags & VM_HUGETLB;
> +}
> +
> +#else
> +
> +static inline int is_vm_hugetlb_page(struct vm_area_struct *vma)
> +{
> + return 0;
> +}
> +
> +#endif
> +
> +#endif
> diff --git v2.6.34/include/linux/pagemap.h v2.6.34/include/linux/pagemap.h
> index 3c62ed4..b2bd2ba 100644
> --- v2.6.34/include/linux/pagemap.h
> +++ v2.6.34/include/linux/pagemap.h
> @@ -13,6 +13,7 @@
> #include <linux/gfp.h>
> #include <linux/bitops.h>
> #include <linux/hardirq.h> /* for in_interrupt() */
> +#include <linux/hugetlb_inline.h>
>
> /*
> * Bits in mapping->flags. The lower __GFP_BITS_SHIFT bits are the page
> --
> 1.7.0
>
--
Mel Gorman
Part-time Phd Student Linux Technology Center
University of Limerick IBM Dublin Software Lab
WARNING: multiple messages have this Message-ID (diff)
From: Mel Gorman <mel@csn.ul.ie>
To: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Andi Kleen <andi@firstfloor.org>,
Andrew Morton <akpm@linux-foundation.org>,
Wu Fengguang <fengguang.wu@intel.com>
Subject: Re: [PATCH 1/8] hugetlb: move definition of is_vm_hugetlb_page() to hugepage_inline.h
Date: Fri, 28 May 2010 11:03:50 +0100 [thread overview]
Message-ID: <20100528100350.GC9774@csn.ul.ie> (raw)
In-Reply-To: <1275006562-18946-2-git-send-email-n-horiguchi@ah.jp.nec.com>
On Fri, May 28, 2010 at 09:29:15AM +0900, Naoya Horiguchi wrote:
> is_vm_hugetlb_page() is a widely used inline function to insert hooks
> into hugetlb code.
> But we can't use it in pagemap.h because of circular dependency of
> the header files. This patch removes this limitation.
>
> Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
> ---
> include/linux/hugetlb.h | 11 +----------
> include/linux/hugetlb_inline.h | 22 ++++++++++++++++++++++
> include/linux/pagemap.h | 1 +
> 3 files changed, 24 insertions(+), 10 deletions(-)
> create mode 100644 include/linux/hugetlb_inline.h
>
> diff --git v2.6.34/include/linux/hugetlb.h v2.6.34/include/linux/hugetlb.h
> index 78b4bc6..d47a7c4 100644
> --- v2.6.34/include/linux/hugetlb.h
> +++ v2.6.34/include/linux/hugetlb.h
> @@ -2,6 +2,7 @@
> #define _LINUX_HUGETLB_H
>
> #include <linux/fs.h>
> +#include <linux/hugetlb_inline.h>
>
> struct ctl_table;
> struct user_struct;
> @@ -14,11 +15,6 @@ struct user_struct;
>
> int PageHuge(struct page *page);
>
> -static inline int is_vm_hugetlb_page(struct vm_area_struct *vma)
> -{
> - return vma->vm_flags & VM_HUGETLB;
> -}
> -
> void reset_vma_resv_huge_pages(struct vm_area_struct *vma);
> int hugetlb_sysctl_handler(struct ctl_table *, int, void __user *, size_t *, loff_t *);
> int hugetlb_overcommit_handler(struct ctl_table *, int, void __user *, size_t *, loff_t *);
> @@ -77,11 +73,6 @@ static inline int PageHuge(struct page *page)
> return 0;
> }
>
> -static inline int is_vm_hugetlb_page(struct vm_area_struct *vma)
> -{
> - return 0;
> -}
> -
> static inline void reset_vma_resv_huge_pages(struct vm_area_struct *vma)
> {
> }
> diff --git v2.6.34/include/linux/hugetlb_inline.h v2.6.34/include/linux/hugetlb_inline.h
> new file mode 100644
> index 0000000..cf00b6d
> --- /dev/null
> +++ v2.6.34/include/linux/hugetlb_inline.h
> @@ -0,0 +1,22 @@
> +#ifndef _LINUX_HUGETLB_INLINE_H
> +#define _LINUX_HUGETLB_INLINE_H 1
> +
Just #define __LINUX_HUGETLB_INLINE_H is fine. No need for the 1
> +#ifdef CONFIG_HUGETLBFS
> +
Should be CONFIG_HUGETLB_PAGE
With those corrections;
Acked-by: Mel Gorman <mel@csn.ul.ie>
> +#include <linux/mm.h>
> +
> +static inline int is_vm_hugetlb_page(struct vm_area_struct *vma)
> +{
> + return vma->vm_flags & VM_HUGETLB;
> +}
> +
> +#else
> +
> +static inline int is_vm_hugetlb_page(struct vm_area_struct *vma)
> +{
> + return 0;
> +}
> +
> +#endif
> +
> +#endif
> diff --git v2.6.34/include/linux/pagemap.h v2.6.34/include/linux/pagemap.h
> index 3c62ed4..b2bd2ba 100644
> --- v2.6.34/include/linux/pagemap.h
> +++ v2.6.34/include/linux/pagemap.h
> @@ -13,6 +13,7 @@
> #include <linux/gfp.h>
> #include <linux/bitops.h>
> #include <linux/hardirq.h> /* for in_interrupt() */
> +#include <linux/hugetlb_inline.h>
>
> /*
> * Bits in mapping->flags. The lower __GFP_BITS_SHIFT bits are the page
> --
> 1.7.0
>
--
Mel Gorman
Part-time Phd Student Linux Technology Center
University of Limerick IBM Dublin Software Lab
--
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:[~2010-05-28 10:04 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-28 0:29 [PATCH 0/8] HWPOISON for hugepage (v6) Naoya Horiguchi
2010-05-28 0:29 ` Naoya Horiguchi
2010-05-28 0:29 ` [PATCH 1/8] hugetlb: move definition of is_vm_hugetlb_page() to hugepage_inline.h Naoya Horiguchi
2010-05-28 0:29 ` Naoya Horiguchi
2010-05-28 10:03 ` Mel Gorman [this message]
2010-05-28 10:03 ` Mel Gorman
2010-08-10 19:53 ` Wu Fengguang
2010-08-10 19:53 ` Wu Fengguang
2010-05-28 0:29 ` [PATCH 2/8] hugetlb, rmap: add reverse mapping for hugepage Naoya Horiguchi
2010-05-28 0:29 ` Naoya Horiguchi
2010-05-28 14:48 ` Mel Gorman
2010-05-28 14:48 ` Mel Gorman
2010-08-10 23:23 ` Wu Fengguang
2010-08-10 23:23 ` Wu Fengguang
2010-06-02 18:16 ` Andrew Morton
2010-06-02 18:16 ` Andrew Morton
2010-06-03 1:38 ` [PATCH] replace ifdef CONFIG_HUGETLBFS into ifdef CONFIG_HUGETLB_PAGE (Re: [PATCH 2/8] hugetlb, rmap: add reverse mapping for hugepage) Naoya Horiguchi
2010-06-03 1:38 ` Naoya Horiguchi
2010-05-28 0:29 ` [PATCH 3/8] HWPOISON, hugetlb: enable error handling path for hugepage Naoya Horiguchi
2010-05-28 0:29 ` Naoya Horiguchi
2010-05-28 0:29 ` [PATCH 4/8] HWPOISON, hugetlb: set/clear PG_hwpoison bits on hugepage Naoya Horiguchi
2010-05-28 0:29 ` Naoya Horiguchi
2010-05-28 0:29 ` [PATCH 5/8] HWPOISON, hugetlb: maintain mce_bad_pages in handling hugepage error Naoya Horiguchi
2010-05-28 0:29 ` Naoya Horiguchi
2010-05-28 0:29 ` [PATCH 6/8] HWPOISON, hugetlb: isolate corrupted hugepage Naoya Horiguchi
2010-05-28 0:29 ` Naoya Horiguchi
2010-05-28 0:29 ` [PATCH 7/8] HWPOISON, hugetlb: detect hwpoison in hugetlb code Naoya Horiguchi
2010-05-28 0:29 ` Naoya Horiguchi
2010-05-28 0:29 ` [PATCH 8/8] HWPOISON, hugetlb: support hwpoison injection for hugepage Naoya Horiguchi
2010-05-28 0:29 ` Naoya Horiguchi
2010-05-31 9:30 ` [PATCH 0/8] HWPOISON for hugepage (v6) Andi Kleen
2010-05-31 9:30 ` Andi Kleen
2010-05-31 10:17 ` Naoya Horiguchi
2010-05-31 10:17 ` Naoya Horiguchi
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=20100528100350.GC9774@csn.ul.ie \
--to=mel@csn.ul.ie \
--cc=akpm@linux-foundation.org \
--cc=andi@firstfloor.org \
--cc=fengguang.wu@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=n-horiguchi@ah.jp.nec.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.