All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V4 0/6] RCU get_user_pages_fast and __get_user_pages_fast
@ 2014-09-26 14:03 ` Steve Capper
  0 siblings, 0 replies; 103+ messages in thread
From: Steve Capper @ 2014-09-26 14:03 UTC (permalink / raw)
  To: linux-arm-kernel, catalin.marinas, linux, linux-arch, linux-mm
  Cc: will.deacon, gary.robertson, christoffer.dall, peterz,
	anders.roxell, akpm, dann.frazier, mark.rutland, mgorman, hughd,
	Steve Capper

Hello,
This series implements general forms of get_user_pages_fast and
__get_user_pages_fast in core code and activates them for arm and arm64.

These are required for Transparent HugePages to function correctly, as
a futex on a THP tail will otherwise result in an infinite loop (due to
the core implementation of __get_user_pages_fast always returning 0).

Unfortunately, a futex on THP tail can be quite common for certain
workloads; thus THP is unreliable without a __get_user_pages_fast
implementation.

This series may also be beneficial for direct-IO heavy workloads and
certain KVM workloads.

I appreciate that the merge window is coming very soon, and am posting
this revision on the off-chance that it gets the nod for 3.18. (The changes
thus far have been minimal and the feedback I've got has been mainly
positive).

Changes since PATCH V3 are
(mainly addressing comments from Hugh Dickins):
 * Added pte_numa and pmd_numa calls.
 * Added comments to clarify what assumptions are being made by the
   implementation.
 * Cleaned up formatting for checkpatch.
 * As these changes are mainly cosmetic, I've retained the Tested-by
   and Reviewed-by tags.

Changes since PATCH V2 are:
 * spelt `PATCH' correctly in the subject prefix this time. :-(
 * Added acks, tested-bys and reviewed-bys.
 * Cleanup of patch #6 with pud_pte and pud_pmd helpers.
 * Switched config option from HAVE_RCU_GUP to HAVE_GENERIC_RCU_GUP.

Changes since PATCH V1 are:
 * Rebase to 3.17-rc1
 * Switched to kick_all_cpus_sync as suggested by Mark Rutland.

The main changes since RFC V5 are:
 * Rebased against 3.16-rc1.
 * pmd_present no longer tested for by gup_huge_pmd and gup_huge_pud,
   because the entry must be present for these leaf functions to be
   called. 
 * Rather than assume puds can be re-cast as pmds, a separate
   function pud_write is instead used by the core gup.
 * ARM activation logic changed, now it will only activate
   RCU_TABLE_FREE and RCU_GUP when running with LPAE.

The main changes since RFC V4 are:
 * corrected the arm64 logic so it now correctly rcu-frees page
   table backing pages.
 * rcu free logic relaxed for pre-ARMv7 ARM as we need an IPI to
   invalidate TLBs anyway.
 * rebased to 3.15-rc3 (some minor changes were needed to allow it to merge).
 * dropped Catalin's mmu_gather patch as that's been merged already.

This series has been tested with LTP mm tests and some custom futex tests
that exacerbate the futex on THP tail case; on both an Arndale board and
a Juno board. Also debug counters were temporarily employed to ensure that
the RCU_TABLE_FREE logic was behaving as expected.

Cheers,
--
Steve


Steve Capper (6):
  mm: Introduce a general RCU get_user_pages_fast.
  arm: mm: Introduce special ptes for LPAE
  arm: mm: Enable HAVE_RCU_TABLE_FREE logic
  arm: mm: Enable RCU fast_gup
  arm64: mm: Enable HAVE_RCU_TABLE_FREE logic
  arm64: mm: Enable RCU fast_gup

 arch/arm/Kconfig                      |   5 +
 arch/arm/include/asm/pgtable-2level.h |   2 +
 arch/arm/include/asm/pgtable-3level.h |  15 ++
 arch/arm/include/asm/pgtable.h        |   6 +-
 arch/arm/include/asm/tlb.h            |  38 +++-
 arch/arm/mm/flush.c                   |  15 ++
 arch/arm64/Kconfig                    |   4 +
 arch/arm64/include/asm/pgtable.h      |  21 +-
 arch/arm64/include/asm/tlb.h          |  20 +-
 arch/arm64/mm/flush.c                 |  15 ++
 mm/Kconfig                            |   3 +
 mm/gup.c                              | 354 ++++++++++++++++++++++++++++++++++
 12 files changed, 488 insertions(+), 10 deletions(-)

-- 
1.9.3

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

^ permalink raw reply	[flat|nested] 103+ messages in thread

end of thread, other threads:[~2015-03-03 17:05 UTC | newest]

Thread overview: 103+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-26 14:03 [PATCH V4 0/6] RCU get_user_pages_fast and __get_user_pages_fast Steve Capper
2014-09-26 14:03 ` Steve Capper
2014-09-26 14:03 ` Steve Capper
2014-09-26 14:03 ` [PATCH V4 1/6] mm: Introduce a general RCU get_user_pages_fast Steve Capper
2014-09-26 14:03   ` Steve Capper
2014-09-26 14:03   ` Steve Capper
2014-09-29 21:51   ` Hugh Dickins
2014-09-29 21:51     ` Hugh Dickins
2014-09-29 21:51     ` Hugh Dickins
2014-10-01 11:11     ` Catalin Marinas
2014-10-01 11:11       ` Catalin Marinas
2014-10-01 11:11       ` Catalin Marinas
2014-10-01 11:11       ` Catalin Marinas
2014-10-02 16:00     ` Steve Capper
2014-10-02 16:00       ` Steve Capper
2014-10-02 16:00       ` Steve Capper
2014-10-02 12:19   ` Andrea Arcangeli
2014-10-02 12:19     ` Andrea Arcangeli
2014-10-02 12:19     ` Andrea Arcangeli
2014-10-02 16:18     ` Steve Capper
2014-10-02 16:18       ` Steve Capper
2014-10-02 16:18       ` Steve Capper
2014-10-02 16:54       ` Andrea Arcangeli
2014-10-02 16:54         ` Andrea Arcangeli
2014-10-02 16:54         ` Andrea Arcangeli
2014-10-13  5:15     ` Aneesh Kumar K.V
2014-10-13  5:15       ` Aneesh Kumar K.V
2014-10-13  5:15       ` Aneesh Kumar K.V
2014-10-13  5:21       ` David Miller
2014-10-13  5:21         ` David Miller
2014-10-13  5:21         ` David Miller
2014-10-13 11:44         ` Steve Capper
2014-10-13 11:44           ` Steve Capper
2014-10-13 11:44           ` Steve Capper
2014-10-13 16:06           ` David Miller
2014-10-13 16:06             ` David Miller
2014-10-13 16:06             ` David Miller
2014-10-14 12:38             ` Steve Capper
2014-10-14 12:38               ` Steve Capper
2014-10-14 12:38               ` Steve Capper
2014-10-14 16:30               ` David Miller
2014-10-14 16:30                 ` David Miller
2014-10-14 16:30                 ` David Miller
2014-10-13 17:04           ` Aneesh Kumar K.V
2014-10-13 17:04             ` Aneesh Kumar K.V
2014-10-13 17:04             ` Aneesh Kumar K.V
2014-10-13  6:22   ` Aneesh Kumar K.V
2014-10-13  6:22     ` Aneesh Kumar K.V
2014-10-13  6:22     ` Aneesh Kumar K.V
2014-10-13  6:22     ` Aneesh Kumar K.V
2014-09-26 14:03 ` [PATCH V4 2/6] arm: mm: Introduce special ptes for LPAE Steve Capper
2014-09-26 14:03   ` Steve Capper
2014-09-26 14:03   ` Steve Capper
2014-09-26 14:03 ` [PATCH V4 3/6] arm: mm: Enable HAVE_RCU_TABLE_FREE logic Steve Capper
2014-09-26 14:03   ` Steve Capper
2014-09-26 14:03   ` Steve Capper
2014-09-26 14:03 ` [PATCH V4 4/6] arm: mm: Enable RCU fast_gup Steve Capper
2014-09-26 14:03   ` Steve Capper
2014-09-26 14:03   ` Steve Capper
2014-09-26 14:03 ` [PATCH V4 5/6] arm64: mm: Enable HAVE_RCU_TABLE_FREE logic Steve Capper
2014-09-26 14:03   ` Steve Capper
2014-09-26 14:03   ` Steve Capper
2014-09-26 14:03 ` [PATCH V4 6/6] arm64: mm: Enable RCU fast_gup Steve Capper
2014-09-26 14:03   ` Steve Capper
2014-09-26 14:03   ` Steve Capper
2015-02-27 12:42 ` [PATCH V4 0/6] RCU get_user_pages_fast and __get_user_pages_fast Jon Masters
2015-02-27 12:42   ` Jon Masters
2015-02-27 12:42   ` Jon Masters
2015-02-27 13:20   ` Mark Rutland
2015-02-27 13:20     ` Mark Rutland
2015-02-27 13:20     ` Mark Rutland
2015-03-02 14:16     ` Mark Rutland
2015-03-02 14:16       ` Mark Rutland
2015-03-02 14:16       ` Mark Rutland
2015-03-02  2:10   ` PMD update corruption (sync question) Jon Masters
2015-03-02  2:10     ` Jon Masters
2015-03-02  5:58     ` Jon Masters
2015-03-02  5:58       ` Jon Masters
2015-03-02  5:58       ` Jon Masters
2015-03-02 10:50       ` Catalin Marinas
2015-03-02 10:50         ` Catalin Marinas
2015-03-02 10:50         ` Catalin Marinas
2015-03-02 11:06         ` Jon Masters
2015-03-02 11:06           ` Jon Masters
2015-03-02 11:06           ` Jon Masters
2015-03-02 12:31           ` Peter Zijlstra
2015-03-02 12:31             ` Peter Zijlstra
2015-03-02 12:31             ` Peter Zijlstra
2015-03-02 12:40             ` Geert Uytterhoeven
2015-03-02 12:40               ` Geert Uytterhoeven
2015-03-02 12:40               ` Geert Uytterhoeven
2015-03-02 22:21         ` Jon Masters
2015-03-02 22:21           ` Jon Masters
2015-03-02 22:21           ` Jon Masters
2015-03-02 22:29           ` Jon Masters
2015-03-02 22:29             ` Jon Masters
2015-03-02 22:29             ` Jon Masters
2015-03-03  9:06           ` Arnd Bergmann
2015-03-03  9:06             ` Arnd Bergmann
2015-03-03  9:06             ` Arnd Bergmann
2015-03-03 15:46             ` Jon Masters
2015-03-03 15:46               ` Jon Masters
2015-03-03 15:46               ` Jon Masters

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.