[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120816182015.GC12578@dhcp22.suse.cz>
Date: Thu, 16 Aug 2012 20:20:15 +0200
From: Michal Hocko <mhocko@...e.cz>
To: Will Deacon <will.deacon@....com>
Cc: Hugh Dickins <hughd@...gle.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Hillf Danton <dhillf@...il.com>,
Russell King <linux@....linux.org.uk>,
"linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-mm@...ck.org" <linux-mm@...ck.org>
Subject: Re: [PATCH] mm: hugetlb: flush dcache before returning zeroed huge
page to userspace
On Thu 16-08-12 17:09:54, Will Deacon wrote:
> On Wed, Aug 08, 2012 at 05:26:07PM +0100, Michal Hocko wrote:
[...]
> diff --git a/arch/ia64/include/asm/hugetlb.h b/arch/ia64/include/asm/hugetlb.h
> index da55c63..2adaa60 100644
> --- a/arch/ia64/include/asm/hugetlb.h
> +++ b/arch/ia64/include/asm/hugetlb.h
> @@ -1,6 +1,7 @@
> #ifndef _ASM_IA64_HUGETLB_H
> #define _ASM_IA64_HUGETLB_H
>
> +#include <asm/cacheflush.h>
> #include <asm/page.h>
>
>
> @@ -77,4 +78,9 @@ static inline void arch_release_hugepage(struct page *page)
> {
> }
>
> +static inline void arch_clear_hugepage_flags(struct page *page)
> +{
> + flush_dcache_page(page);
> +}
> +
Why do we need the hook for ia64? hugetlb_no_page calls clear_huge_page
and that one calls flush_dcache_page (via clear_user_page), right?
The same applies to copy_huge_page for COW.
> diff --git a/arch/powerpc/include/asm/hugetlb.h b/arch/powerpc/include/asm/hugetlb.h
> index dfdb95b..52696e6 100644
> --- a/arch/powerpc/include/asm/hugetlb.h
> +++ b/arch/powerpc/include/asm/hugetlb.h
> @@ -2,6 +2,7 @@
> #define _ASM_POWERPC_HUGETLB_H
>
> #ifdef CONFIG_HUGETLB_PAGE
> +#include <asm/cacheflush.h>
> #include <asm/page.h>
>
> extern struct kmem_cache *hugepte_cache;
> @@ -151,6 +152,11 @@ static inline void arch_release_hugepage(struct page *page)
> {
> }
>
> +static inline void arch_clear_hugepage_flags(struct page *page)
> +{
> + flush_dcache_page(page);
> +}
> +
Same here
--
Michal Hocko
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists