All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Williams <dan.j.williams@intel.com>
To: linux-nvdimm@lists.01.org
Cc: Michael Ellerman <mpe@ellerman.id.au>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Paul Mackerras <paulus@samba.org>, Christoph Hellwig <hch@lst.de>,
	"Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>,
	linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Subject: [PATCH 0/5] libnvdimm: Cross-arch compatible namespace alignment
Date: Thu, 30 Jan 2020 12:05:54 -0800	[thread overview]
Message-ID: <158041475480.3889308.655103391935006598.stgit@dwillia2-desk3.amr.corp.intel.com> (raw)

Aneesh reports that PowerPC requires 16MiB alignment for the address
range passed to devm_memremap_pages(), and Jeff reports that it is
possible to create a misaligned namespace which blocks future namespace
creation in that region. Both of these issues require namespace
alignment to be managed at the region level rather than padding at the
namespace level which has been a broken approach to date.

Introduce memremap_compat_align() to indicate the hard requirements of
an arch's memremap_pages() implementation. Use the maximum known
memremap_compat_align() to set the default namespace alignment for
libnvdimm. Consult that alignment when allocating free space. Finally,
allow the default region alignment to be overridden to maintain the same
namespace creation capability as previous kernels.

The ndctl unit tests, which have some misaligned namespace assumptions,
are updated to use the alignment override where necessary.

Thanks to Aneesh for early feedback and testing on this improved
alignment handling.

---

Dan Williams (5):
      mm/memremap_pages: Kill unused __devm_memremap_pages()
      mm/memremap_pages: Introduce memremap_compat_align()
      libnvdimm/namespace: Enforce memremap_compat_align()
      libnvdimm/region: Introduce NDD_LABELING
      libnvdimm/region: Introduce an 'align' attribute


 arch/powerpc/include/asm/io.h             |   10 ++
 arch/powerpc/platforms/pseries/papr_scm.c |    2 
 drivers/acpi/nfit/core.c                  |    4 +
 drivers/nvdimm/dimm.c                     |    2 
 drivers/nvdimm/dimm_devs.c                |   95 +++++++++++++++++----
 drivers/nvdimm/namespace_devs.c           |   21 ++++-
 drivers/nvdimm/nd.h                       |    3 -
 drivers/nvdimm/pfn_devs.c                 |    2 
 drivers/nvdimm/region_devs.c              |  132 ++++++++++++++++++++++++++---
 include/linux/io.h                        |   23 +++++
 include/linux/libnvdimm.h                 |    2 
 include/linux/mmzone.h                    |    1 
 12 files changed, 255 insertions(+), 42 deletions(-)
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org

WARNING: multiple messages have this Message-ID (diff)
From: Dan Williams <dan.j.williams@intel.com>
To: linux-nvdimm@lists.01.org
Cc: Oliver O'Halloran <oohall@gmail.com>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Vishal Verma <vishal.l.verma@intel.com>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Paul Mackerras <paulus@samba.org>, Christoph Hellwig <hch@lst.de>,
	Jeff Moyer <jmoyer@redhat.com>,
	"Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>,
	linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Subject: [PATCH 0/5] libnvdimm: Cross-arch compatible namespace alignment
Date: Thu, 30 Jan 2020 12:05:54 -0800	[thread overview]
Message-ID: <158041475480.3889308.655103391935006598.stgit@dwillia2-desk3.amr.corp.intel.com> (raw)

Aneesh reports that PowerPC requires 16MiB alignment for the address
range passed to devm_memremap_pages(), and Jeff reports that it is
possible to create a misaligned namespace which blocks future namespace
creation in that region. Both of these issues require namespace
alignment to be managed at the region level rather than padding at the
namespace level which has been a broken approach to date.

Introduce memremap_compat_align() to indicate the hard requirements of
an arch's memremap_pages() implementation. Use the maximum known
memremap_compat_align() to set the default namespace alignment for
libnvdimm. Consult that alignment when allocating free space. Finally,
allow the default region alignment to be overridden to maintain the same
namespace creation capability as previous kernels.

The ndctl unit tests, which have some misaligned namespace assumptions,
are updated to use the alignment override where necessary.

Thanks to Aneesh for early feedback and testing on this improved
alignment handling.

---

Dan Williams (5):
      mm/memremap_pages: Kill unused __devm_memremap_pages()
      mm/memremap_pages: Introduce memremap_compat_align()
      libnvdimm/namespace: Enforce memremap_compat_align()
      libnvdimm/region: Introduce NDD_LABELING
      libnvdimm/region: Introduce an 'align' attribute


 arch/powerpc/include/asm/io.h             |   10 ++
 arch/powerpc/platforms/pseries/papr_scm.c |    2 
 drivers/acpi/nfit/core.c                  |    4 +
 drivers/nvdimm/dimm.c                     |    2 
 drivers/nvdimm/dimm_devs.c                |   95 +++++++++++++++++----
 drivers/nvdimm/namespace_devs.c           |   21 ++++-
 drivers/nvdimm/nd.h                       |    3 -
 drivers/nvdimm/pfn_devs.c                 |    2 
 drivers/nvdimm/region_devs.c              |  132 ++++++++++++++++++++++++++---
 include/linux/io.h                        |   23 +++++
 include/linux/libnvdimm.h                 |    2 
 include/linux/mmzone.h                    |    1 
 12 files changed, 255 insertions(+), 42 deletions(-)

WARNING: multiple messages have this Message-ID (diff)
From: Dan Williams <dan.j.williams@intel.com>
To: linux-nvdimm@lists.01.org
Cc: linux-kernel@vger.kernel.org,
	Vishal Verma <vishal.l.verma@intel.com>,
	Jeff Moyer <jmoyer@redhat.com>,
	Oliver O'Halloran <oohall@gmail.com>,
	"Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>,
	Paul Mackerras <paulus@samba.org>,
	linuxppc-dev@lists.ozlabs.org, Christoph Hellwig <hch@lst.de>
Subject: [PATCH 0/5] libnvdimm: Cross-arch compatible namespace alignment
Date: Thu, 30 Jan 2020 12:05:54 -0800	[thread overview]
Message-ID: <158041475480.3889308.655103391935006598.stgit@dwillia2-desk3.amr.corp.intel.com> (raw)

Aneesh reports that PowerPC requires 16MiB alignment for the address
range passed to devm_memremap_pages(), and Jeff reports that it is
possible to create a misaligned namespace which blocks future namespace
creation in that region. Both of these issues require namespace
alignment to be managed at the region level rather than padding at the
namespace level which has been a broken approach to date.

Introduce memremap_compat_align() to indicate the hard requirements of
an arch's memremap_pages() implementation. Use the maximum known
memremap_compat_align() to set the default namespace alignment for
libnvdimm. Consult that alignment when allocating free space. Finally,
allow the default region alignment to be overridden to maintain the same
namespace creation capability as previous kernels.

The ndctl unit tests, which have some misaligned namespace assumptions,
are updated to use the alignment override where necessary.

Thanks to Aneesh for early feedback and testing on this improved
alignment handling.

---

Dan Williams (5):
      mm/memremap_pages: Kill unused __devm_memremap_pages()
      mm/memremap_pages: Introduce memremap_compat_align()
      libnvdimm/namespace: Enforce memremap_compat_align()
      libnvdimm/region: Introduce NDD_LABELING
      libnvdimm/region: Introduce an 'align' attribute


 arch/powerpc/include/asm/io.h             |   10 ++
 arch/powerpc/platforms/pseries/papr_scm.c |    2 
 drivers/acpi/nfit/core.c                  |    4 +
 drivers/nvdimm/dimm.c                     |    2 
 drivers/nvdimm/dimm_devs.c                |   95 +++++++++++++++++----
 drivers/nvdimm/namespace_devs.c           |   21 ++++-
 drivers/nvdimm/nd.h                       |    3 -
 drivers/nvdimm/pfn_devs.c                 |    2 
 drivers/nvdimm/region_devs.c              |  132 ++++++++++++++++++++++++++---
 include/linux/io.h                        |   23 +++++
 include/linux/libnvdimm.h                 |    2 
 include/linux/mmzone.h                    |    1 
 12 files changed, 255 insertions(+), 42 deletions(-)

             reply	other threads:[~2020-01-30 20:22 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-30 20:05 Dan Williams [this message]
2020-01-30 20:05 ` [PATCH 0/5] libnvdimm: Cross-arch compatible namespace alignment Dan Williams
2020-01-30 20:05 ` Dan Williams
2020-01-30 20:06 ` [PATCH 1/5] mm/memremap_pages: Kill unused __devm_memremap_pages() Dan Williams
2020-01-30 20:06   ` Dan Williams
2020-01-30 20:06   ` Dan Williams
2020-01-31  5:32   ` Christoph Hellwig
2020-01-31  5:32     ` Christoph Hellwig
2020-01-31  5:32     ` Christoph Hellwig
2020-02-03 17:08   ` Aneesh Kumar K.V
2020-02-03 17:08     ` Aneesh Kumar K.V
2020-02-03 17:08     ` Aneesh Kumar K.V
2020-01-30 20:06 ` [PATCH 2/5] mm/memremap_pages: Introduce memremap_compat_align() Dan Williams
2020-01-30 20:06   ` Dan Williams
2020-01-30 20:06   ` Dan Williams
2020-02-03 17:09   ` Aneesh Kumar K.V
2020-02-03 17:09     ` Aneesh Kumar K.V
2020-02-03 17:09     ` Aneesh Kumar K.V
2020-02-05  3:05   ` Michael Ellerman
2020-02-05  3:05     ` Michael Ellerman
2020-02-05  3:05     ` Michael Ellerman
2020-02-06  5:51     ` Dan Williams
2020-02-06  5:51       ` Dan Williams
2020-02-06  5:51       ` Dan Williams
2020-02-06  6:21       ` Aneesh Kumar K.V
2020-02-06  6:21         ` Aneesh Kumar K.V
2020-02-06  6:21         ` Aneesh Kumar K.V
2020-01-30 20:06 ` [PATCH 3/5] libnvdimm/namespace: Enforce memremap_compat_align() Dan Williams
2020-01-30 20:06   ` Dan Williams
2020-01-30 20:06   ` Dan Williams
2020-02-03 17:09   ` Aneesh Kumar K.V
2020-02-03 17:09     ` Aneesh Kumar K.V
2020-02-03 17:09     ` Aneesh Kumar K.V
2020-01-30 20:06 ` [PATCH 4/5] libnvdimm/region: Introduce NDD_LABELING Dan Williams
2020-01-30 20:06   ` Dan Williams
2020-01-30 20:06   ` Dan Williams
2020-02-03 17:09   ` Aneesh Kumar K.V
2020-02-03 17:09     ` Aneesh Kumar K.V
2020-02-03 17:09     ` Aneesh Kumar K.V
2020-01-30 20:06 ` [PATCH 5/5] libnvdimm/region: Introduce an 'align' attribute Dan Williams
2020-01-30 20:06   ` Dan Williams
2020-01-30 20:06   ` Dan Williams
2020-02-03 17:10   ` Aneesh Kumar K.V
2020-02-03 17:10     ` Aneesh Kumar K.V
2020-02-03 17:10     ` Aneesh Kumar K.V

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=158041475480.3889308.655103391935006598.stgit@dwillia2-desk3.amr.corp.intel.com \
    --to=dan.j.williams@intel.com \
    --cc=aneesh.kumar@linux.ibm.com \
    --cc=benh@kernel.crashing.org \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvdimm@lists.01.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=paulus@samba.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 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.