From: Ross Zwisler <ross.zwisler@linux.intel.com>
To: Andrew Morton <akpm@linux-foundation.org>, linux-kernel@vger.kernel.org
Cc: Ross Zwisler <ross.zwisler@linux.intel.com>,
"Darrick J. Wong" <darrick.wong@oracle.com>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Christoph Hellwig <hch@lst.de>,
Dan Williams <dan.j.williams@intel.com>,
Ingo Molnar <mingo@redhat.com>, Jan Kara <jack@suse.cz>,
Matthew Wilcox <mawilcox@microsoft.com>,
Steven Rostedt <rostedt@goodmis.org>,
linux-fsdevel@vger.kernel.org, linux-nvdimm@lists.01.org
Subject: [PATCH 0/3] add fallback reason strings to DAX PMD path
Date: Tue, 23 May 2017 15:25:57 -0600 [thread overview]
Message-ID: <20170523212600.26477-1-ross.zwisler@linux.intel.com> (raw)
One of the primary motivations for adding tracepoints to the DAX PMD path
was to allow the user to diagnose whether their system was actually using
PMDs, and if not to help them understand why. For me at least this has
worked okay in some situations, but many times I find myself adding more
debugging to diagnose fallback reasons that aren't immediately obvious, or
situations where the current tracepoints are simply insufficient because
they don't give you enough information.
This series adds short fallback reason strings to the tracepoints in the
PMD path with the intention of giving the user better information about why
their system is falling back to PTEs.
So, for example, the recent case on my system was that I forgot to move my
namespace from "raw" mode to "memory" mode, which resulted in this output:
big-1046 [000] .... 103.930950: dax_pmd_fault: dev 259:0 ino 0xc shared
WRITE|ALLOW_RETRY|KILLABLE|USER address 0x10505000 vm_start 0x10200000
vm_end 0x10700000 pgoff 0x305 max_pgoff 0x1400
big-1046 [000] .... 103.931220: dax_pmd_insert_mapping_fallback: dev
259:0 ino 0xc shared write address 0x10505000 length 0x200000 pfn 0x24a200
DEV radix_entry 0x0
big-1046 [000] .... 103.931222: dax_pmd_fault_done: dev 259:0 ino 0xc
shared WRITE|ALLOW_RETRY|KILLABLE|USER address 0x10505000 vm_start
0x10200000 vm_end 0x10700000 pgoff 0x305 max_pgoff 0x1400 FALLBACK
The issue is that the PFN_MAP flag isn't set because we're lacking struct
page for our PMEM namespace. It's not immediately obvious why this
fallback happened, and actually you can't even diagnose it because we mask
off the pfn_t flags before printing the PFN. :(
This new output:
big-1011 [000] .... 36.164708: dax_pmd_fault: dev 259:0 ino 0xc shared
WRITE|ALLOW_RETRY|KILLABLE|USER address 0x10505000 vm_start 0x10200000
vm_end 0x10700000 pgoff 0x305 max_pgoff 0x1400
big-1011 [000] .... 36.165521: dax_pmd_insert_mapping_fallback: dev
259:0 ino 0xc shared write address 0x10505000 length 0x200000 pfn
0x2000000000249200 DEV radix_entry 0x0 pfn_t not devmap
big-1011 [000] .... 36.165524: dax_pmd_fault_done: dev 259:0 ino 0xc
shared WRITE|ALLOW_RETRY|KILLABLE|USER address 0x10505000 vm_start
0x10200000 vm_end 0x10700000 pgoff 0x305 max_pgoff 0x1400 FALLBACK
adds the "pfn_t not devmap" string to the second line, telling the user
exactly what's going on. I also stopped masking off the pfn_t flags so the
output was more complete.
My only concern is that somehow adding strings like this to tracepoint
output, brief and useful though they may be, is somehow breaking what
tracepoints are supposed to be doing. If anyone feels strongly about this
I guess I can just keep these changes locally and try to keep enhancing the
existing output without adding strings.
Ross Zwisler (3):
dax: add fallback reason to dax_iomap_pmd_fault()
dax: add fallback reason to dax_pmd_insert_mapping()
dax: add fallback reason to dax_pmd_load_hole()
fs/dax.c | 76 +++++++++++++++++++++++++++++++------------
include/trace/events/fs_dax.h | 50 +++++++++++++++++-----------
2 files changed, 86 insertions(+), 40 deletions(-)
--
2.9.4
next reply other threads:[~2017-05-23 21:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-23 21:25 Ross Zwisler [this message]
2017-05-23 21:25 ` [PATCH 1/3] dax: add fallback reason to dax_iomap_pmd_fault() Ross Zwisler
2017-05-23 21:25 ` [PATCH 2/3] dax: add fallback reason to dax_pmd_insert_mapping() Ross Zwisler
2017-05-23 21:26 ` [PATCH 3/3] dax: add fallback reason to dax_pmd_load_hole() Ross Zwisler
2017-05-24 5:22 ` [PATCH 0/3] add fallback reason strings to DAX PMD path Masayoshi Mizuma
2017-05-24 9:03 ` Jan Kara
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=20170523212600.26477-1-ross.zwisler@linux.intel.com \
--to=ross.zwisler@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=dan.j.williams@intel.com \
--cc=darrick.wong@oracle.com \
--cc=hch@lst.de \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvdimm@lists.01.org \
--cc=mawilcox@microsoft.com \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
--cc=viro@zeniv.linux.org.uk \
/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).