* [PATCH] mm/mapping_dirty_helpers: Guard hugepage pud's usage
@ 2021-04-08 19:15 Zack Rusin
2021-04-09 7:43 ` Thomas Hellström (Intel)
0 siblings, 1 reply; 2+ messages in thread
From: Zack Rusin @ 2021-04-08 19:15 UTC (permalink / raw)
To: linux-kernel; +Cc: Andrew Morton, Thomas Hellström, linux-mm
Lets make sure we don't use pud hugepage helpers on architectures
which do not support it. This fixes the code on arm64.
Signed-off-by: Zack Rusin <zackr@vmware.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Thomas Hellström (Intel) <thomas_os@shipmail.org>
Cc: linux-mm@kvack.org
Cc: linux-kernel@vger.kernel.org
---
mm/mapping_dirty_helpers.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/mm/mapping_dirty_helpers.c b/mm/mapping_dirty_helpers.c
index b59054ef2e10..b890854ec761 100644
--- a/mm/mapping_dirty_helpers.c
+++ b/mm/mapping_dirty_helpers.c
@@ -165,10 +165,12 @@ static int wp_clean_pud_entry(pud_t *pud, unsigned long addr, unsigned long end,
return 0;
}
+#ifdef CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD
/* Huge pud */
walk->action = ACTION_CONTINUE;
if (pud_trans_huge(pudval) || pud_devmap(pudval))
WARN_ON(pud_write(pudval) || pud_dirty(pudval));
+#endif
return 0;
}
--
2.27.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mm/mapping_dirty_helpers: Guard hugepage pud's usage
2021-04-08 19:15 [PATCH] mm/mapping_dirty_helpers: Guard hugepage pud's usage Zack Rusin
@ 2021-04-09 7:43 ` Thomas Hellström (Intel)
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Hellström (Intel) @ 2021-04-09 7:43 UTC (permalink / raw)
To: Zack Rusin, linux-kernel; +Cc: Andrew Morton, linux-mm
On 4/8/21 9:15 PM, Zack Rusin wrote:
> Lets make sure we don't use pud hugepage helpers on architectures
> which do not support it. This fixes the code on arm64.
nits:
Perhaps be a little more specific about what it fixes? I figure it's a
compilation failure?
Also please use imperative form: "Fix the code arm64" rather than "This
fixes the code on arm64"
Other than that LGTM.
Reviewed-by: Thomas Hellström (Intel) <thomas_os@shipmail.org>
>
> Signed-off-by: Zack Rusin <zackr@vmware.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Thomas Hellström (Intel) <thomas_os@shipmail.org>
> Cc: linux-mm@kvack.org
> Cc: linux-kernel@vger.kernel.org
> ---
> mm/mapping_dirty_helpers.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/mm/mapping_dirty_helpers.c b/mm/mapping_dirty_helpers.c
> index b59054ef2e10..b890854ec761 100644
> --- a/mm/mapping_dirty_helpers.c
> +++ b/mm/mapping_dirty_helpers.c
> @@ -165,10 +165,12 @@ static int wp_clean_pud_entry(pud_t *pud, unsigned long addr, unsigned long end,
> return 0;
> }
>
> +#ifdef CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD
> /* Huge pud */
> walk->action = ACTION_CONTINUE;
> if (pud_trans_huge(pudval) || pud_devmap(pudval))
> WARN_ON(pud_write(pudval) || pud_dirty(pudval));
> +#endif
>
> return 0;
> }
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-04-09 7:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-08 19:15 [PATCH] mm/mapping_dirty_helpers: Guard hugepage pud's usage Zack Rusin
2021-04-09 7:43 ` Thomas Hellström (Intel)
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).