linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Dan Williams <dan.j.williams@intel.com>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
Cc: linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
	linux-nvdimm <linux-nvdimm@lists.01.org>
Subject: Re: [RFC PATCH 1/4] libnvdimm/namespace: Make namespace size validation arch dependent
Date: Tue, 19 Nov 2019 09:58:19 -0800	[thread overview]
Message-ID: <CAPcyv4gv52NK4+=3wcJ2uKX7xnaYVaF-H6O-XfJK8MiRX60SBg@mail.gmail.com> (raw)
In-Reply-To: <87o8x9h5qa.fsf@linux.ibm.com>

On Mon, Nov 18, 2019 at 1:52 AM Aneesh Kumar K.V
<aneesh.kumar@linux.ibm.com> wrote:
>
> Dan Williams <dan.j.williams@intel.com> writes:
>
> > On Sat, Nov 16, 2019 at 4:15 AM Aneesh Kumar K.V
> > <aneesh.kumar@linux.ibm.com> wrote:
> >>
>
> ....
>
>
> >>
> >> Considering the direct-map map size is not going to be user selectable,
> >> do you agree that we can skip the above step 0 configuration you
> >> suggested.
> >>
> >> The changes proposed in the patch series essentially does the rest.
> >>
> >> 1) It validate the size against the arch specific limit during
> >> namespace creation. (part of step 1)
> >
> > This validation is a surprise failure to ndctl.
> >
> >> 2) It also disable initializing a region if it find the size not
> >> correctly aligned as per the platform requirement.
> >
> > There needs to be a way for the user to discover the correct alignment
> > that the kernel will accept.
> >
> >> 3) Direct map  mapping size is different from supported_alignment for a
> >> namespace. The supported alignment controls what possible PAGE SIZE user want the
> >> namespace to be mapped to user space.
> >
> > No, the namespace alignment is different than the page mapping size.
> > The alignment is only interpreted as a mapping size at the device-dax
> > level, otherwise at the raw namespace level it's just an arbitrary
> > alignment.
> >
> >> With the above do you think the current patch series is good?
> >
> > I don't think we've quite converged on a solution.
>
> How about we make it a property of seed device. ie,
> we add `supported_size_align` RO attribute to the seed device. ndctl can
> use this to validate the size value. So this now becomes step0
>
> sys/bus/nd/devices/region0> cat btt0.0/supported_size_align
> 16777216
> /sys/bus/nd/devices/region0> cat pfn0.0/supported_size_align
> 16777216
> /sys/bus/nd/devices/region0> cat dax0.0/supported_size_align
> 16777216

Why on those devices and not namespace0.0?

> We follow that up with validating the size value written to size
> attribute(step 1).
>
> While initializing the namespaces already present in a region we again
> validate the size and if not properly aligned we mark the region
> disabled.

The region might have a mix of namespaces, some aligned and some not,
only the misaligned namespaces should fail to enable. The region
should otherwise enable successfully.

  reply	other threads:[~2019-11-19 18:00 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-28  9:48 [RFC PATCH 1/4] libnvdimm/namespace: Make namespace size validation arch dependent Aneesh Kumar K.V
2019-10-28  9:48 ` [RFC PATCH 2/4] libnvdimm/namespace: Disable the region if the namespace size is not aligned correctly Aneesh Kumar K.V
2019-10-28  9:48 ` [RFC PATCH 3/4] libnvdimm/namespace: Use direct-mapping page size to validate namespace size Aneesh Kumar K.V
2019-10-28  9:48 ` [RFC PATCH 4/4] libnvdimm/namespace: Add debug check while initializing namespace resource size Aneesh Kumar K.V
2019-10-28 21:21 ` [RFC PATCH 1/4] libnvdimm/namespace: Make namespace size validation arch dependent Ira Weiny
2019-10-29  4:34   ` Aneesh Kumar K.V
2019-10-28 23:08 ` Dan Williams
2019-10-29  4:34   ` Aneesh Kumar K.V
2019-10-29  5:30     ` Dan Williams
2019-10-31  5:35       ` Aneesh Kumar K.V
2019-10-31  6:30         ` Dan Williams
2019-10-31  8:37           ` Aneesh Kumar K.V
2019-10-31 15:53             ` Dan Williams
2019-11-06 10:44           ` Aneesh Kumar K.V
2019-11-16 12:15             ` Aneesh Kumar K.V
2019-11-16 18:50               ` Dan Williams
2019-11-18  9:51                 ` Aneesh Kumar K.V
2019-11-19 17:58                   ` Dan Williams [this message]
2019-11-20  3:19                     ` Aneesh Kumar K.V
2019-11-20  3:46                       ` 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='CAPcyv4gv52NK4+=3wcJ2uKX7xnaYVaF-H6O-XfJK8MiRX60SBg@mail.gmail.com' \
    --to=dan.j.williams@intel.com \
    --cc=aneesh.kumar@linux.ibm.com \
    --cc=linux-nvdimm@lists.01.org \
    --cc=linuxppc-dev@lists.ozlabs.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;
as well as URLs for NNTP newsgroup(s).