From: Jan Kara <jack@suse.cz>
To: Ross Zwisler <ross.zwisler@linux.intel.com>
Cc: linux-kernel@vger.kernel.org,
Alexander Viro <viro@zeniv.linux.org.uk>,
Andrew Morton <akpm@linux-foundation.org>,
Arnd Bergmann <arnd@arndb.de>, Christoph Hellwig <hch@lst.de>,
Dan Williams <dan.j.williams@intel.com>,
Dave Chinner <david@fromorbit.com>,
Dave Hansen <dave.hansen@intel.com>, Jan Kara <jack@suse.cz>,
Matthew Wilcox <mawilcox@microsoft.com>,
linux-arch@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-mm@kvack.org, linux-nvdimm@lists.01.org
Subject: Re: [PATCH v2 2/4] dax: add stub for pmdp_huge_clear_flush()
Date: Fri, 23 Dec 2016 14:44:57 +0100 [thread overview]
Message-ID: <20161223134457.GG22679@quack2.suse.cz> (raw)
In-Reply-To: <1482441536-14550-3-git-send-email-ross.zwisler@linux.intel.com>
On Thu 22-12-16 14:18:54, Ross Zwisler wrote:
> Add a pmdp_huge_clear_flush() stub for configs that don't define
> CONFIG_TRANSPARENT_HUGEPAGE.
>
> We use a WARN_ON_ONCE() instead of a BUILD_BUG() because in the DAX code at
> least we do want this compile successfully even for configs without
> CONFIG_TRANSPARENT_HUGEPAGE. It'll be a runtime decision whether we call
> this code gets called, based on whether we find DAX PMD entries in our
> tree. We shouldn't ever find such PMD entries for
> !CONFIG_TRANSPARENT_HUGEPAGE configs, so this function should never be
> called.
>
> Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com>
Looks good. You can add:
Reviewed-by: Jan Kara <jack@suse.cz>
Honza
> ---
> include/asm-generic/pgtable.h | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h
> index 18af2bc..65e9536 100644
> --- a/include/asm-generic/pgtable.h
> +++ b/include/asm-generic/pgtable.h
> @@ -178,9 +178,19 @@ extern pte_t ptep_clear_flush(struct vm_area_struct *vma,
> #endif
>
> #ifndef __HAVE_ARCH_PMDP_HUGE_CLEAR_FLUSH
> +#ifdef CONFIG_TRANSPARENT_HUGEPAGE
> extern pmd_t pmdp_huge_clear_flush(struct vm_area_struct *vma,
> unsigned long address,
> pmd_t *pmdp);
> +#else
> +static inline pmd_t pmdp_huge_clear_flush(struct vm_area_struct *vma,
> + unsigned long address,
> + pmd_t *pmdp)
> +{
> + WARN_ON_ONCE(1);
> + return *pmdp;
> +}
> +#endif /* CONFIG_TRANSPARENT_HUGEPAGE */
> #endif
>
> #ifndef __HAVE_ARCH_PTEP_SET_WRPROTECT
> --
> 2.7.4
>
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
--
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:[~2016-12-23 13:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-22 21:18 [PATCH v2 0/4] Write protect DAX PMDs in *sync path Ross Zwisler
2016-12-22 21:18 ` [PATCH v2 1/4] dax: kill uml support Ross Zwisler
2016-12-23 13:45 ` Jan Kara
2016-12-22 21:18 ` [PATCH v2 2/4] dax: add stub for pmdp_huge_clear_flush() Ross Zwisler
2016-12-23 13:44 ` Jan Kara [this message]
2016-12-22 21:18 ` [PATCH v2 3/4] mm: add follow_pte_pmd() Ross Zwisler
2016-12-22 21:18 ` [PATCH v2 4/4] dax: wrprotect pmd_t in dax_mapping_entry_mkclean Ross Zwisler
2017-01-04 0:13 ` [PATCH v2 0/4] Write protect DAX PMDs in *sync path Ross Zwisler
2017-01-06 1:27 ` Andrew Morton
2017-01-06 18:18 ` Ross Zwisler
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=20161223134457.GG22679@quack2.suse.cz \
--to=jack@suse.cz \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=dan.j.williams@intel.com \
--cc=dave.hansen@intel.com \
--cc=david@fromorbit.com \
--cc=hch@lst.de \
--cc=linux-arch@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-nvdimm@lists.01.org \
--cc=mawilcox@microsoft.com \
--cc=ross.zwisler@linux.intel.com \
--cc=viro@zeniv.linux.org.uk \
/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