From: Dan Williams <dan.j.williams-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
To: "Aneesh Kumar K.V"
<aneesh.kumar-tEXmvtCZX7AybS5Ee8rs3A@public.gmane.org>
Cc: linux-nvdimm <linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org>
Subject: Re: [PATCH v7 7/7] libnvdimm/dax: Pick the right alignment default when creating dax devices
Date: Wed, 4 Sep 2019 11:12:35 -0700 [thread overview]
Message-ID: <CAPcyv4iTOuXiMLok3MbhgF9xnWCrdoDJMMukg7kgmPZHD62XyQ@mail.gmail.com> (raw)
In-Reply-To: <77c345a4-a317-2f42-f21c-4c2c98983565-tEXmvtCZX7AybS5Ee8rs3A@public.gmane.org>
On Wed, Sep 4, 2019 at 12:07 AM Aneesh Kumar K.V
<aneesh.kumar-tEXmvtCZX7AybS5Ee8rs3A@public.gmane.org> wrote:
>
> On 9/4/19 10:38 AM, Aneesh Kumar K.V wrote:
> > Allow arch to provide the supported alignments and use hugepage alignment only
> > if we support hugepage. Right now we depend on compile time configs whereas this
> > patch switch this to runtime discovery.
> >
> > Architectures like ppc64 can have THP enabled in code, but then can have
> > hugepage size disabled by the hypervisor. This allows us to create dax devices
> > with PAGE_SIZE alignment in this case.
> >
> > Existing dax namespace with alignment larger than PAGE_SIZE will fail to
> > initialize in this specific case. We still allow fsdax namespace initialization.
> >
> > With respect to identifying whether to enable hugepage fault for a dax device,
> > if THP is enabled during compile, we default to taking hugepage fault and in dax
> > fault handler if we find the fault size > alignment we retry with PAGE_SIZE
> > fault size.
> >
> > This also addresses the below failure scenario on ppc64
> >
> > ndctl create-namespace --mode=devdax | grep align
> > "align":16777216,
> > "align":16777216
> >
> > cat /sys/devices/ndbus0/region0/dax0.0/supported_alignments
> > 65536 16777216
> >
> > daxio.static-debug -z -o /dev/dax0.0
> > Bus error (core dumped)
> >
> > $ dmesg | tail
> > lpar: Failed hash pte insert with error -4
> > hash-mmu: mm: Hashing failure ! EA=0x7fff17000000 access=0x8000000000000006 current=daxio
> > hash-mmu: trap=0x300 vsid=0x22cb7a3 ssize=1 base psize=2 psize 10 pte=0xc000000501002b86
> > daxio[3860]: bus error (7) at 7fff17000000 nip 7fff973c007c lr 7fff973bff34 code 2 in libpmem.so.1.0.0[7fff973b0000+20000]
> > daxio[3860]: code: 792945e4 7d494b78 e95f0098 7d494b78 f93f00a0 4800012c e93f0088 f93f0120
> > daxio[3860]: code: e93f00a0 f93f0128 e93f0120 e95f0128 <f9490000> e93f0088 39290008 f93f0110
> >
> > The failure was due to guest kernel using wrong page size.
> >
> > The namespaces created with 16M alignment will appear as below on a config with
> > 16M page size disabled.
> >
> > $ ndctl list -Ni
> > [
> > {
> > "dev":"namespace0.1",
> > "mode":"fsdax",
> > "map":"dev",
> > "size":5351931904,
> > "uuid":"fc6e9667-461a-4718-82b4-69b24570bddb",
> > "align":16777216,
> > "blockdev":"pmem0.1",
> > "supported_alignments":[
> > 65536
> > ]
> > },
> > {
> > "dev":"namespace0.0",
> > "mode":"fsdax", <==== devdax 16M alignment marked disabled.
> > "map":"mem",
> > "size":5368709120,
> > "uuid":"a4bdf81a-f2ee-4bc6-91db-7b87eddd0484",
> > "state":"disabled"
> > }
> > ]
> >
> > Signed-off-by: Aneesh Kumar K.V <aneesh.kumar-tEXmvtCZX7AybS5Ee8rs3A@public.gmane.org>
>
> v8 for this posted at
>
> https://patchwork.kernel.org/patch/11129463/
I understand the urge to not re-send the full series, but it ends up
confusing the tooling and requiring me to do manual work to assemble
the patch set.
I use "git-pw" to pull down patch series and the tool did not
understand the two versions of patch 7. So for linux-nvdimm at least,
please resend the full series.
I do have a comment on v8 so a final v9 might be needed.
prev parent reply other threads:[~2019-09-04 18:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-04 5:08 [PATCH v7 0/7] Mark the namespace disabled on pfn superblock mismatch Aneesh Kumar K.V
2019-09-04 5:08 ` [PATCH v7 1/7] libnvdimm/region: Rewrite _probe_success() to _advance_seeds() Aneesh Kumar K.V
2019-09-04 5:08 ` [PATCH v7 2/7] libnvdimm/pmem: Advance namespace seed for specific probe errors Aneesh Kumar K.V
2019-09-04 5:08 ` [PATCH v7 3/7] libnvdimm/pfn_dev: Add a build check to make sure we notice when struct page size change Aneesh Kumar K.V
2019-09-04 5:08 ` [PATCH v7 4/7] libnvdimm/pfn_dev: Add page size and struct page size to pfn superblock Aneesh Kumar K.V
2019-09-04 5:08 ` [PATCH v7 5/7] libnvdimm/label: Remove the dpa align check Aneesh Kumar K.V
2019-09-04 5:08 ` [PATCH v7 6/7] libnvdimm: Use PAGE_SIZE instead of SZ_4K for " Aneesh Kumar K.V
2019-09-04 5:08 ` [PATCH v7 7/7] libnvdimm/dax: Pick the right alignment default when creating dax devices Aneesh Kumar K.V
[not found] ` <77c345a4-a317-2f42-f21c-4c2c98983565@linux.ibm.com>
[not found] ` <77c345a4-a317-2f42-f21c-4c2c98983565-tEXmvtCZX7AybS5Ee8rs3A@public.gmane.org>
2019-09-04 18:12 ` Dan Williams [this message]
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=CAPcyv4iTOuXiMLok3MbhgF9xnWCrdoDJMMukg7kgmPZHD62XyQ@mail.gmail.com \
--to=dan.j.williams-ral2jqcrhueavxtiumwx3w@public.gmane.org \
--cc=aneesh.kumar-tEXmvtCZX7AybS5Ee8rs3A@public.gmane.org \
--cc=linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.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).