From: Dan Williams <dan.j.williams@intel.com>
To: akpm@linux-foundation.org
Cc: Dave Hansen <dave@sr71.net>, Toshi Kani <toshi.kani@hpe.com>,
David Airlie <airlied@linux.ie>,
Dave Hansen <dave.hansen@linux.intel.com>,
Dave Chinner <david@fromorbit.com>,
linux-mm@kvack.org, "H. Peter Anvin" <hpa@zytor.com>,
Christoph Hellwig <hch@lst.de>,
Andrea Arcangeli <aarcange@redhat.com>,
kbuild test robot <lkp@intel.com>,
linux-nvdimm@lists.01.org, Richard Weinberger <richard@nod.at>,
Peter Zijlstra <peterz@infradead.org>,
Jeff Moyer <jmoyer@redhat.com>, Ingo Molnar <mingo@redhat.com>,
Mel Gorman <mgorman@suse.de>,
Matthew Wilcox <willy@linux.intel.com>,
Ross Zwisler <ross.zwisler@linux.intel.com>,
Jeff Dike <jdike@addtoit.com>, Jens Axboe <axboe@fb.com>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Christoffer Dall <christoffer.dall@linaro.org>,
Jan Kara <jack@suse.com>, Paolo Bonzini <pbonzini@redhat.com>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Subject: [PATCH -mm 00/25] get_user_pages() for dax pte and pmd mappings
Date: Mon, 07 Dec 2015 17:32:36 -0800 [thread overview]
Message-ID: <20151208013236.25030.68781.stgit@dwillia2-desk3.jf.intel.com> (raw)
Andrew, please pull dax-gup support into -mm.
This series, based on next-20151203, has been out for review in one form
or another since September [1]. The concept was reviewed at Kernel
Summit in the "ZONE_DEVICE" tech-topic presentation. Since the RFC
posting [2] it has received fixes and is now passing the unit tests from
ndctl [3] and nvml [4].
Logan Gunthorpe has also offered up functional testing of his use case
for devm_memremap_pages() [5] (a "Tested-by" for the latest revision is
still pending).
[1]: https://lists.01.org/pipermail/linux-nvdimm/2015-September/002199.html
[2]: https://lists.01.org/pipermail/linux-nvdimm/2015-November/003033.html
[3]: https://github.com/pmem/ndctl
[4]: https://github.com/pmem/nvml
[5]: https://lists.01.org/pipermail/linux-nvdimm/2015-October/002576.html
A git tree of this set is available here:
git://git.kernel.org/pub/scm/linux/kernel/git/djbw/nvdimm libnvdimm-pending
The libnvdimm-pending branch has received a build success notification
from the kbuild-test-robot over 105 configs.
---
Summary:
To date, we have implemented two I/O usage models for persistent memory,
PMEM (a persistent "ram disk") and DAX (mmap persistent memory into
userspace). This series adds a third, DAX-GUP, that allows DAX mappings
to be the target of direct-i/o. It allows userspace to coordinate
DMA/RDMA from/to persistent memory.
The implementation leverages the ZONE_DEVICE mm-zone that went into
4.3-rc1 (also discussed at kernel summit) to flag pages that are owned
and dynamically mapped by a device driver. The pmem driver, after
mapping a persistent memory range into the system memmap via
devm_memremap_pages(), arranges for DAX to distinguish pfn-only versus
page-backed pmem-pfns via flags in the new pfn_t type.
The DAX code, upon seeing a PFN_DEV+PFN_MAP flagged pfn, flags the
resulting pte(s) inserted into the process page tables with a new
_PAGE_DEVMAP flag. Later, when get_user_pages() is walking ptes it keys
off _PAGE_DEVMAP to pin the device hosting the page range active.
Finally, get_page() and put_page() are modified to take references
against the device driver established page mapping.
Finally, this need for "struct page" for persistent memory requires
memory capacity to store the memmap array. Given the memmap array for a
large pool of persistent may exhaust available DRAM introduce a
mechanism to allocate the memmap from persistent memory. The new "struct
vmem_altmap *" parameter to devm_memremap_pages() enables
arch_add_memory() to use reserved pmem capacity rather than the page
allocator.
---
Dan Williams (23):
pmem, dax: clean up clear_pmem()
dax: increase granularity of dax_clear_blocks() operations
dax: guarantee page aligned results from bdev_direct_access()
dax: fix lifetime of in-kernel dax mappings with dax_map_atomic()
um: kill pfn_t
kvm: rename pfn_t to kvm_pfn_t
mm, dax, pmem: introduce pfn_t
mm: introduce find_dev_pagemap()
x86, mm: introduce vmem_altmap to augment vmemmap_populate()
libnvdimm, pfn, pmem: allocate memmap array in persistent memory
avr32: convert to asm-generic/memory_model.h
hugetlb: fix compile error on tile
frv: fix compiler warning from definition of __pmd()
x86, mm: introduce _PAGE_DEVMAP
mm, dax, gpu: convert vm_insert_mixed to pfn_t
mm, dax: convert vmf_insert_pfn_pmd() to pfn_t
list: introduce list_del_poison()
libnvdimm, pmem: move request_queue allocation earlier in probe
mm, dax, pmem: introduce {get|put}_dev_pagemap() for dax-gup
mm, dax: dax-pmd vs thp-pmd vs hugetlbfs-pmd
mm, x86: get_user_pages() for dax mappings
dax: provide diagnostics for pmd mapping failures
dax: re-enable dax pmd mappings
Ross Zwisler (1):
mm, dax: fix livelock, allow dax pmd mappings to become writeable
Toshi Kani (1):
dax: Split pmd map when fallback on COW
arch/alpha/include/asm/pgtable.h | 1
arch/arm/include/asm/kvm_mmu.h | 5 -
arch/arm/kvm/mmu.c | 10 +
arch/arm64/include/asm/kvm_mmu.h | 3
arch/avr32/include/asm/page.h | 8 -
arch/frv/include/asm/page.h | 2
arch/ia64/include/asm/page.h | 1
arch/ia64/include/asm/pgtable.h | 1
arch/m68k/include/asm/page_mm.h | 1
arch/m68k/include/asm/page_no.h | 1
arch/mips/include/asm/kvm_host.h | 6 -
arch/mips/kvm/emulate.c | 2
arch/mips/kvm/tlb.c | 14 +
arch/mn10300/include/asm/page.h | 1
arch/parisc/include/asm/pgtable.h | 1
arch/powerpc/include/asm/kvm_book3s.h | 4
arch/powerpc/include/asm/kvm_ppc.h | 2
arch/powerpc/include/asm/pgtable.h | 1
arch/powerpc/kvm/book3s.c | 6 -
arch/powerpc/kvm/book3s_32_mmu_host.c | 2
arch/powerpc/kvm/book3s_64_mmu_host.c | 2
arch/powerpc/kvm/e500.h | 2
arch/powerpc/kvm/e500_mmu_host.c | 8 -
arch/powerpc/kvm/trace_pr.h | 2
arch/powerpc/sysdev/axonram.c | 8 -
arch/sh/include/asm/pgtable-3level.h | 1
arch/sparc/include/asm/pgtable_64.h | 2
arch/tile/include/asm/pgtable.h | 1
arch/um/include/asm/page.h | 7 -
arch/um/include/asm/pgtable-3level.h | 5 -
arch/um/include/asm/pgtable.h | 2
arch/x86/include/asm/page_types.h | 3
arch/x86/include/asm/pgtable.h | 26 +++
arch/x86/include/asm/pgtable_types.h | 7 +
arch/x86/include/asm/pmem.h | 7 -
arch/x86/kvm/iommu.c | 11 +
arch/x86/kvm/mmu.c | 37 ++--
arch/x86/kvm/mmu_audit.c | 2
arch/x86/kvm/paging_tmpl.h | 6 -
arch/x86/kvm/vmx.c | 2
arch/x86/kvm/x86.c | 2
arch/x86/mm/gup.c | 56 +++++-
arch/x86/mm/init_64.c | 32 +++
arch/x86/mm/pat.c | 4
drivers/block/brd.c | 4
drivers/gpu/drm/exynos/exynos_drm_gem.c | 3
drivers/gpu/drm/gma500/framebuffer.c | 3
drivers/gpu/drm/msm/msm_gem.c | 3
drivers/gpu/drm/omapdrm/omap_gem.c | 6 -
drivers/gpu/drm/ttm/ttm_bo_vm.c | 3
drivers/nvdimm/pfn_devs.c | 3
drivers/nvdimm/pmem.c | 70 +++++--
drivers/s390/block/dcssblk.c | 10 -
fs/Kconfig | 3
fs/block_dev.c | 15 +-
fs/dax.c | 290 +++++++++++++++++++----------
include/asm-generic/pgtable.h | 10 +
include/linux/blkdev.h | 19 ++
include/linux/huge_mm.h | 15 +-
include/linux/hugetlb.h | 1
include/linux/io.h | 15 --
include/linux/kvm_host.h | 37 ++--
include/linux/kvm_types.h | 2
include/linux/list.h | 17 ++
include/linux/memory_hotplug.h | 3
include/linux/mm.h | 310 ++++++++++++++++++++++++++++++-
include/linux/mm_types.h | 5 +
include/linux/pfn.h | 9 +
kernel/memremap.c | 188 ++++++++++++++++++-
lib/list_debug.c | 4
mm/gup.c | 18 ++
mm/huge_memory.c | 131 +++++++++----
mm/memory.c | 25 +--
mm/memory_hotplug.c | 66 +++++--
mm/mprotect.c | 5 -
mm/page_alloc.c | 10 +
mm/pgtable-generic.c | 2
mm/sparse-vmemmap.c | 37 ++++
mm/sparse.c | 8 +
mm/swap.c | 15 ++
virt/kvm/kvm_main.c | 47 ++---
81 files changed, 1302 insertions(+), 417 deletions(-)
--
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 reply other threads:[~2015-12-08 1:32 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-08 1:32 Dan Williams [this message]
2015-12-08 1:32 ` [PATCH -mm 01/25] pmem, dax: clean up clear_pmem() Dan Williams
2015-12-08 1:32 ` [PATCH -mm 02/25] dax: increase granularity of dax_clear_blocks() operations Dan Williams
2015-12-08 1:32 ` [PATCH -mm 03/25] dax: guarantee page aligned results from bdev_direct_access() Dan Williams
2015-12-08 1:32 ` [PATCH -mm 04/25] dax: fix lifetime of in-kernel dax mappings with dax_map_atomic() Dan Williams
2015-12-08 1:33 ` [PATCH -mm 05/25] mm, dax: fix livelock, allow dax pmd mappings to become writeable Dan Williams
2015-12-08 1:33 ` [PATCH -mm 06/25] dax: Split pmd map when fallback on COW Dan Williams
2015-12-08 1:33 ` [PATCH -mm 07/25] um: kill pfn_t Dan Williams
2015-12-08 1:33 ` [PATCH -mm 08/25] kvm: rename pfn_t to kvm_pfn_t Dan Williams
2015-12-08 1:33 ` [PATCH -mm 09/25] mm, dax, pmem: introduce pfn_t Dan Williams
2015-12-08 1:33 ` [PATCH -mm 10/25] mm: introduce find_dev_pagemap() Dan Williams
2015-12-08 1:33 ` [PATCH -mm 11/25] x86, mm: introduce vmem_altmap to augment vmemmap_populate() Dan Williams
2015-12-08 1:33 ` [PATCH -mm 12/25] libnvdimm, pfn, pmem: allocate memmap array in persistent memory Dan Williams
2015-12-08 1:33 ` [PATCH -mm 13/25] avr32: convert to asm-generic/memory_model.h Dan Williams
2015-12-08 1:33 ` [PATCH -mm 14/25] hugetlb: fix compile error on tile Dan Williams
2015-12-08 1:33 ` [PATCH -mm 15/25] frv: fix compiler warning from definition of __pmd() Dan Williams
2015-12-08 1:34 ` [PATCH -mm 16/25] x86, mm: introduce _PAGE_DEVMAP Dan Williams
2015-12-08 1:34 ` Dan Williams
2015-12-08 1:34 ` [PATCH -mm 17/25] mm, dax, gpu: convert vm_insert_mixed to pfn_t Dan Williams
2015-12-08 1:34 ` [PATCH -mm 18/25] mm, dax: convert vmf_insert_pfn_pmd() " Dan Williams
2015-12-08 1:34 ` [PATCH -mm 19/25] list: introduce list_del_poison() Dan Williams
2015-12-08 1:34 ` [PATCH -mm 20/25] libnvdimm, pmem: move request_queue allocation earlier in probe Dan Williams
2015-12-08 1:34 ` [PATCH -mm 21/25] mm, dax, pmem: introduce {get|put}_dev_pagemap() for dax-gup Dan Williams
2015-12-08 1:34 ` [PATCH -mm 22/25] mm, dax: dax-pmd vs thp-pmd vs hugetlbfs-pmd Dan Williams
2015-12-08 1:34 ` [PATCH -mm 23/25] mm, x86: get_user_pages() for dax mappings Dan Williams
2015-12-08 1:34 ` [PATCH -mm 24/25] dax: provide diagnostics for pmd mapping failures Dan Williams
2015-12-08 1:34 ` [PATCH -mm 25/25] dax: re-enable dax pmd mappings Dan Williams
2015-12-08 18:42 ` [PATCH -mm 00/25] get_user_pages() for dax pte and " Logan Gunthorpe
2015-12-08 18:50 ` Dan Williams
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=20151208013236.25030.68781.stgit@dwillia2-desk3.jf.intel.com \
--to=dan.j.williams@intel.com \
--cc=aarcange@redhat.com \
--cc=airlied@linux.ie \
--cc=akpm@linux-foundation.org \
--cc=axboe@fb.com \
--cc=christoffer.dall@linaro.org \
--cc=dave.hansen@linux.intel.com \
--cc=dave@sr71.net \
--cc=david@fromorbit.com \
--cc=hch@lst.de \
--cc=hpa@zytor.com \
--cc=jack@suse.com \
--cc=jdike@addtoit.com \
--cc=jmoyer@redhat.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-mm@kvack.org \
--cc=linux-nvdimm@lists.01.org \
--cc=lkp@intel.com \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peterz@infradead.org \
--cc=richard@nod.at \
--cc=ross.zwisler@linux.intel.com \
--cc=toshi.kani@hpe.com \
--cc=viro@zeniv.linux.org.uk \
--cc=willy@linux.intel.com \
/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 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.