linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Jordan <daniel.m.jordan@oracle.com>
To: Laurent Dufour <ldufour@linux.vnet.ibm.com>,
	paulmck@linux.vnet.ibm.com, peterz@infradead.org,
	akpm@linux-foundation.org, kirill@shutemov.name,
	ak@linux.intel.com, mhocko@kernel.org, dave@stgolabs.net,
	jack@suse.cz, Matthew Wilcox <willy@infradead.org>,
	benh@kernel.crashing.org, mpe@ellerman.id.au, paulus@samba.org,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>,
	hpa@zytor.com, Will Deacon <will.deacon@arm.com>,
	Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
	Andrea Arcangeli <aarcange@redhat.com>,
	Alexei Starovoitov <alexei.starovoitov@gmail.com>,
	kemi.wang@intel.com, sergey.senozhatsky.work@gmail.com,
	Daniel Jordan <daniel.m.jordan@oracle.com>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	haren@linux.vnet.ibm.com, khandual@linux.vnet.ibm.com,
	npiggin@gmail.com, bsingharora@gmail.com,
	Tim Chen <tim.c.chen@linux.intel.com>,
	linuxppc-dev@lists.ozlabs.org, x86@kernel.org
Subject: Re: [PATCH v8 18/24] mm: Provide speculative fault infrastructure
Date: Mon, 26 Feb 2018 12:16:09 -0500	[thread overview]
Message-ID: <5b16d6ce-6b62-e4ca-2d78-c25bb008e27e@oracle.com> (raw)
In-Reply-To: <1518794738-4186-19-git-send-email-ldufour@linux.vnet.ibm.com>

Hi Laurent,

This series doesn't build for me[*] when CONFIG_TRANSPARENT_HUGEPAGE is unset.

The problem seems to be that the BUILD_BUG() version of pmd_same is called in pte_map_lock:

On 02/16/2018 10:25 AM, Laurent Dufour wrote:
> +static bool pte_map_lock(struct vm_fault *vmf)
> +{
...snip...
> +	if (!pmd_same(pmdval, vmf->orig_pmd))
> +		goto out;

Since SPF can now call pmd_same without THP, maybe the way to fix it is just

diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h
index 2cfa3075d148..e130692db24a 100644
--- a/include/asm-generic/pgtable.h
+++ b/include/asm-generic/pgtable.h
@@ -375,7 +375,8 @@ static inline int pte_unused(pte_t pte)
  #endif
  
  #ifndef __HAVE_ARCH_PMD_SAME
-#ifdef CONFIG_TRANSPARENT_HUGEPAGE
+#if defined(CONFIG_TRANSPARENT_HUGEPAGE) || \
+    defined(CONFIG_SPECULATIVE_PAGE_FAULT)
  static inline int pmd_same(pmd_t pmd_a, pmd_t pmd_b)
  {
         return pmd_val(pmd_a) == pmd_val(pmd_b);

?

Daniel


[*]  The errors are:

In file included from /home/dmjordan/src/linux/include/linux/kernel.h:10:0,
                  from /home/dmjordan/src/linux/include/linux/list.h:9,
                  from /home/dmjordan/src/linux/include/linux/smp.h:12,
                  from /home/dmjordan/src/linux/include/linux/kernel_stat.h:5,
                  from /home/dmjordan/src/linux/mm/memory.c:41:
In function a??pmd_same.isra.104a??,
     inlined from a??pte_map_locka?? at /home/dmjordan/src/linux/mm/memory.c:2380:7:
/home/dmjordan/src/linux/include/linux/compiler.h:324:38: error: call to a??__compiletime_assert_391a?? declared with attribute error: BUILD_BUG failed
   _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
                                       ^
/home/dmjordan/src/linux/include/linux/compiler.h:304:4: note: in definition of macro a??__compiletime_asserta??
     prefix ## suffix();    \
     ^~~~~~
/home/dmjordan/src/linux/include/linux/compiler.h:324:2: note: in expansion of macro a??_compiletime_asserta??
   _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
   ^~~~~~~~~~~~~~~~~~~
/home/dmjordan/src/linux/include/linux/build_bug.h:45:37: note: in expansion of macro a??compiletime_asserta??
  #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
                                      ^~~~~~~~~~~~~~~~~~
/home/dmjordan/src/linux/include/linux/build_bug.h:79:21: note: in expansion of macro a??BUILD_BUG_ON_MSGa??
  #define BUILD_BUG() BUILD_BUG_ON_MSG(1, "BUILD_BUG failed")
                      ^~~~~~~~~~~~~~~~
/home/dmjordan/src/linux/include/asm-generic/pgtable.h:391:2: note: in expansion of macro a??BUILD_BUGa??
   BUILD_BUG();
   ^~~~~~~~~
   CC      block/elevator.o
   CC      crypto/crypto_wq.o
In function a??pmd_same.isra.104a??,
     inlined from a??pte_spinlocka?? at /home/dmjordan/src/linux/mm/memory.c:2326:7,
     inlined from a??handle_pte_faulta?? at /home/dmjordan/src/linux/mm/memory.c:4181:7:
/home/dmjordan/src/linux/include/linux/compiler.h:324:38: error: call to a??__compiletime_assert_391a?? declared with attribute error: BUILD_BUG failed
   _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
                                       ^
/home/dmjordan/src/linux/include/linux/compiler.h:304:4: note: in definition of macro a??__compiletime_asserta??
     prefix ## suffix();    \
     ^~~~~~
/home/dmjordan/src/linux/include/linux/compiler.h:324:2: note: in expansion of macro a??_compiletime_asserta??
   _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
   ^~~~~~~~~~~~~~~~~~~
/home/dmjordan/src/linux/include/linux/build_bug.h:45:37: note: in expansion of macro a??compiletime_asserta??
  #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
                                      ^~~~~~~~~~~~~~~~~~
/home/dmjordan/src/linux/include/linux/build_bug.h:79:21: note: in expansion of macro a??BUILD_BUG_ON_MSGa??
  #define BUILD_BUG() BUILD_BUG_ON_MSG(1, "BUILD_BUG failed")
                      ^~~~~~~~~~~~~~~~
/home/dmjordan/src/linux/include/asm-generic/pgtable.h:391:2: note: in expansion of macro a??BUILD_BUGa??
   BUILD_BUG();
   ^~~~~~~~~
...
make[2]: *** [/home/dmjordan/src/linux/scripts/Makefile.build:316: mm/memory.o] Error 1
make[1]: *** [/home/dmjordan/src/linux/Makefile:1047: mm] Error 2

--
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>

  reply	other threads:[~2018-02-26 17:16 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-16 15:25 [PATCH v8 00/24] Speculative page faults Laurent Dufour
2018-02-16 15:25 ` [PATCH v8 01/24] mm: Introduce CONFIG_SPECULATIVE_PAGE_FAULT Laurent Dufour
2018-02-16 15:25 ` [PATCH v8 02/24] x86/mm: Define CONFIG_SPECULATIVE_PAGE_FAULT Laurent Dufour
2018-02-16 15:25 ` [PATCH v8 03/24] powerpc/mm: " Laurent Dufour
2018-02-16 15:25 ` [PATCH v8 04/24] mm: Prepare for FAULT_FLAG_SPECULATIVE Laurent Dufour
2018-02-16 15:25 ` [PATCH v8 05/24] mm: Introduce pte_spinlock " Laurent Dufour
2018-02-16 15:25 ` [PATCH v8 06/24] mm: make pte_unmap_same compatible with SPF Laurent Dufour
2018-02-16 15:25 ` [PATCH v8 07/24] mm: VMA sequence count Laurent Dufour
2018-02-16 15:25 ` [PATCH v8 08/24] mm: Protect VMA modifications using " Laurent Dufour
2018-02-16 15:25 ` [PATCH v8 09/24] mm: protect mremap() against SPF hanlder Laurent Dufour
2018-02-16 15:25 ` [PATCH v8 10/24] mm: Protect SPF handler against anon_vma changes Laurent Dufour
2018-02-16 15:25 ` [PATCH v8 11/24] mm: Cache some VMA fields in the vm_fault structure Laurent Dufour
2018-02-16 15:25 ` [PATCH v8 12/24] mm/migrate: Pass vm_fault pointer to migrate_misplaced_page() Laurent Dufour
2018-02-16 15:25 ` [PATCH v8 13/24] mm: Introduce __lru_cache_add_active_or_unevictable Laurent Dufour
2018-02-16 15:25 ` [PATCH v8 14/24] mm: Introduce __maybe_mkwrite() Laurent Dufour
2018-02-16 15:25 ` [PATCH v8 15/24] mm: Introduce __vm_normal_page() Laurent Dufour
2018-02-16 15:25 ` [PATCH v8 16/24] mm: Introduce __page_add_new_anon_rmap() Laurent Dufour
2018-02-16 15:25 ` [PATCH v8 17/24] mm: Protect mm_rb tree with a rwlock Laurent Dufour
2018-02-16 15:25 ` [PATCH v8 18/24] mm: Provide speculative fault infrastructure Laurent Dufour
2018-02-26 17:16   ` Daniel Jordan [this message]
2018-03-05 10:50     ` Laurent Dufour
2018-02-16 15:25 ` [PATCH v8 19/24] mm: Adding speculative page fault failure trace events Laurent Dufour
2018-02-16 15:25 ` [PATCH v8 20/24] perf: Add a speculative page fault sw event Laurent Dufour
2018-02-16 15:25 ` [PATCH v8 21/24] perf tools: Add support for the SPF perf event Laurent Dufour
2018-02-16 15:25 ` [PATCH v8 22/24] mm: Speculative page fault handler return VMA Laurent Dufour
2018-03-29  2:26   ` Ganesh Mahendran
2018-03-29  3:06     ` Ganesh Mahendran
2018-03-29  7:50       ` Laurent Dufour
2018-05-02  8:10         ` Ganesh Mahendran
2018-02-16 15:25 ` [PATCH v8 23/24] x86/mm: Add speculative pagefault handling Laurent Dufour
2018-02-16 15:25 ` [PATCH v8 24/24] powerpc/mm: Add speculative page fault Laurent Dufour

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=5b16d6ce-6b62-e4ca-2d78-c25bb008e27e@oracle.com \
    --to=daniel.m.jordan@oracle.com \
    --cc=aarcange@redhat.com \
    --cc=ak@linux.intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=alexei.starovoitov@gmail.com \
    --cc=benh@kernel.crashing.org \
    --cc=bsingharora@gmail.com \
    --cc=dave@stgolabs.net \
    --cc=haren@linux.vnet.ibm.com \
    --cc=hpa@zytor.com \
    --cc=jack@suse.cz \
    --cc=kemi.wang@intel.com \
    --cc=khandual@linux.vnet.ibm.com \
    --cc=kirill@shutemov.name \
    --cc=ldufour@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mhocko@kernel.org \
    --cc=mingo@redhat.com \
    --cc=mpe@ellerman.id.au \
    --cc=npiggin@gmail.com \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=paulus@samba.org \
    --cc=peterz@infradead.org \
    --cc=sergey.senozhatsky.work@gmail.com \
    --cc=sergey.senozhatsky@gmail.com \
    --cc=tglx@linutronix.de \
    --cc=tim.c.chen@linux.intel.com \
    --cc=will.deacon@arm.com \
    --cc=willy@infradead.org \
    --cc=x86@kernel.org \
    /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