mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dan Williams <dan.j.williams@intel.com>
To: linux-kernel@vger.kernel.org
Cc: axboe@kernel.dk, boaz@plexistor.com, david@fromorbit.com,
	linux-arch@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	arnd@arndb.de, Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	benh@kernel.crashing.org, torvalds@linux-foundation.org,
	heiko.carstens@de.ibm.com, hch@lst.de,
	Julia Lawall <Julia.Lawall@lip6.fr>,
	paulus@samba.org, hpa@zytor.com, tj@kernel.org,
	willy@linux.intel.com, akpm@linux-foundation.org,
	ross.zwisler@linux.intel.com, mingo@kernel.org,
	schwidefsky@de.ibm.com, linux-nvdimm@ml01.01.org
Subject: [PATCH v4 0/9] introduce __pfn_t, evacuate struct page from sgls
Date: Fri, 05 Jun 2015 17:19:01 -0400	[thread overview]
Message-ID: <20150605205052.20751.77149.stgit@dwillia2-desk3.amr.corp.intel.com> (raw)

Introduce __pfn_t which:

1/ Allows kernel internal DAX mappings to adhere to the lifetime of the
   the underlying block device.  In general, it enables a mechanism to
   allow any device driver to advertise "device memory" (CONFIG_DEV_PFN)
   to other parts of the kernel.

2/ Replaces usage of struct page in struct scatterlist.  A scatterlist
   need only carry enough information to generate a dma address, and
   removing struct page from scatterlists is a precursor to allowing DMA to
   device memory.  Some dma mapping implementations are not ready for a
   scatterlist-pfn to reference unampped device memory, those
   implementations are disabled by CONFIG_DEV_PFN=y.
   
Changes since v4 [1]:

1/ Drop the bio_vec conversion of struct page to __pfn_t for now.  Wait
   until there's a hierarchical block driver that would make use of direct
   dma to pmem.  (Christoph)

2/ Reorder the patch set to put the dax fixes first.

3/ Unconditionally convert struct scatterlist to use a pfn.  Strictly
   speaking the scatterlist conversion could also be deferred until we have
   a driver that attempts dma to pmem, but struct scatterlist really has no
   valid reason to carry a struct page. (Christoph)

4/ Rebased on block.git/for-next

---

Dan Williams (9):
      introduce __pfn_t for scatterlists and pmem
      x86: support kmap_atomic_pfn_t() for persistent memory
      dax: drop size parameter to ->direct_access()
      dax: fix mapping lifetime handling, convert to __pfn_t + kmap_atomic_pfn_t()
      dma-mapping: allow archs to optionally specify a ->map_pfn() operation
      scatterlist: use sg_phys()
      scatterlist: cleanup sg_chain() and sg_unmark_end()
      scatterlist: convert to __pfn_t
      x86: convert dma_map_ops to support mapping a __pfn_t.


 arch/Kconfig                                 |    6 +
 arch/arm/mm/dma-mapping.c                    |    2 
 arch/microblaze/kernel/dma.c                 |    2 
 arch/powerpc/sysdev/axonram.c                |   26 ++++--
 arch/x86/Kconfig                             |    7 ++
 arch/x86/kernel/amd_gart_64.c                |   22 ++++-
 arch/x86/kernel/pci-nommu.c                  |   22 ++++-
 arch/x86/kernel/pci-swiotlb.c                |    4 +
 arch/x86/pci/sta2x11-fixup.c                 |    4 +
 block/blk-merge.c                            |    2 
 drivers/block/brd.c                          |    9 --
 drivers/block/pmem.c                         |   16 +++
 drivers/crypto/omap-sham.c                   |    2 
 drivers/dma/imx-dma.c                        |    8 --
 drivers/dma/ste_dma40.c                      |    5 -
 drivers/iommu/amd_iommu.c                    |   21 +++--
 drivers/iommu/intel-iommu.c                  |   26 ++++--
 drivers/iommu/iommu.c                        |    2 
 drivers/mmc/card/queue.c                     |    4 -
 drivers/pci/Kconfig                          |    2 
 drivers/s390/block/dcssblk.c                 |   26 +++++-
 drivers/staging/android/ion/ion_chunk_heap.c |    4 -
 fs/block_dev.c                               |    4 -
 fs/dax.c                                     |   62 +++++++++++--
 include/asm-generic/dma-mapping-common.h     |   30 +++++++
 include/asm-generic/memory_model.h           |    1 
 include/asm-generic/pfn.h                    |  120 ++++++++++++++++++++++++++
 include/crypto/scatterwalk.h                 |    9 --
 include/linux/blkdev.h                       |    7 +-
 include/linux/dma-debug.h                    |   23 ++++-
 include/linux/dma-mapping.h                  |    8 ++
 include/linux/highmem.h                      |   23 +++++
 include/linux/mm.h                           |    1 
 include/linux/scatterlist.h                  |  103 ++++++++++++++++------
 include/linux/swiotlb.h                      |    4 +
 init/Kconfig                                 |   13 +++
 lib/dma-debug.c                              |   10 +-
 lib/swiotlb.c                                |   20 +++-
 mm/Makefile                                  |    1 
 mm/pfn.c                                     |   98 +++++++++++++++++++++
 samples/kfifo/dma-example.c                  |    8 +-
 41 files changed, 626 insertions(+), 141 deletions(-)
 create mode 100644 include/asm-generic/pfn.h
 create mode 100644 mm/pfn.c

             reply	other threads:[~2015-06-05 21:21 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-05 21:19 Dan Williams [this message]
2015-06-05 21:19 ` [PATCH v4 1/9] introduce __pfn_t for scatterlists and pmem Dan Williams
2015-06-05 21:37   ` Linus Torvalds
2015-06-05 22:12     ` Dan Williams
2015-06-05 21:19 ` [PATCH v4 2/9] x86: support kmap_atomic_pfn_t() for persistent memory Dan Williams
2015-06-09  6:50   ` Christoph Hellwig
2015-06-10 12:12   ` Christoph Hellwig
2015-06-10 15:03     ` Matthew Wilcox
2015-06-10 15:11       ` Christoph Hellwig
2015-06-10 15:36         ` Dan Williams
2015-06-10 16:11           ` Christoph Hellwig
2015-06-10 16:17             ` Dan Williams
2015-06-05 21:19 ` [PATCH v4 3/9] dax: drop size parameter to ->direct_access() Dan Williams
2015-06-06 11:37   ` Matthew Wilcox
2015-06-09  6:51   ` Christoph Hellwig
2015-06-05 21:19 ` [PATCH v4 4/9] dax: fix mapping lifetime handling, convert to __pfn_t + kmap_atomic_pfn_t() Dan Williams
2015-06-06 11:58   ` Matthew Wilcox
2015-08-07 23:54     ` Dan Williams
2015-06-08 16:29   ` Elliott, Robert (Server Storage)
2015-06-08 16:36     ` Dan Williams
2015-06-09  6:55   ` Christoph Hellwig
2015-06-05 21:19 ` [PATCH v4 5/9] dma-mapping: allow archs to optionally specify a ->map_pfn() operation Dan Williams
2015-06-05 21:19 ` [PATCH v4 6/9] scatterlist: use sg_phys() Dan Williams
2015-06-09  6:59   ` Christoph Hellwig
2015-06-05 21:19 ` [PATCH v4 7/9] scatterlist: cleanup sg_chain() and sg_unmark_end() Dan Williams
2015-06-05 21:19 ` [PATCH v4 8/9] scatterlist: convert to __pfn_t Dan Williams
2015-06-05 21:19 ` [PATCH v4 9/9] x86: convert dma_map_ops to support mapping a __pfn_t Dan Williams
2015-06-09  6:58   ` Christoph Hellwig
2015-06-09 13:47     ` Konrad Rzeszutek Wilk
2015-06-05 21:23 ` [PATCH v4 0/9] introduce __pfn_t, evacuate struct page from sgls 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=20150605205052.20751.77149.stgit@dwillia2-desk3.amr.corp.intel.com \
    --to=dan.j.williams@intel.com \
    --cc=Julia.Lawall@lip6.fr \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=axboe@kernel.dk \
    --cc=benh@kernel.crashing.org \
    --cc=boaz@plexistor.com \
    --cc=david@fromorbit.com \
    --cc=hch@lst.de \
    --cc=heiko.carstens@de.ibm.com \
    --cc=hpa@zytor.com \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvdimm@ml01.01.org \
    --cc=mingo@kernel.org \
    --cc=paulus@samba.org \
    --cc=ross.zwisler@linux.intel.com \
    --cc=schwidefsky@de.ibm.com \
    --cc=tj@kernel.org \
    --cc=torvalds@linux-foundation.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®