From: Maxwell Bland <mbland@motorola.com>
To: Catalin Marinas <catalin.marinas@arm.com>
Cc: linux-mm@kvack.org, Will Deacon <will@kernel.org>,
Jonathan Corbet <corbet@lwn.net>,
Andrew Morton <akpm@linux-foundation.org>,
Ard Biesheuvel <ardb@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Christophe Leroy <christophe.leroy@csgroup.eu>,
Alexandre Ghiti <alexghiti@rivosinc.com>,
linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] ptdump: add intermediate directory support
Date: Wed, 8 May 2024 10:29:02 -0500 [thread overview]
Message-ID: <h4znjkryp5k6sq4by7lgmctbfyhkyzqmm3f7o74ktfy7k3wfkr@s2mktazkcv3k> (raw)
In-Reply-To: <ZjtgCfhQDJus3dqI@arm.com>
On Wed, May 08, 2024 at 12:20:41PM GMT, Catalin Marinas wrote:
> On Tue, Apr 30, 2024 at 11:05:01AM -0500, Maxwell Bland wrote:
> > + if (st->start_address != addr) {
> > + pt_dump_seq_printf(st->seq, "0x%016lx-0x%016lx ",
> > + st->start_address, addr);
> > + delta = (addr - st->start_address);
> Should it show a PGD_SIZE * number_of_entries instead?
It should show the full range of memory covered by the PGD's table.
Will fix, thanks!
r > + if (st->note_non_leaf && !pgd_leaf(val))
> > + st->note_page(st, addr, 0, pgd_val(val));
> > +
> > if (pgd_leaf(val)) {
> > st->note_page(st, addr, 0, pgd_val(val));
> > walk->action = ACTION_CONTINUE;
> Is the difference between leaf and non-leaf calls only the walk->action?
> We could have a single call to st->note_page() and keep the walk->action
> setting separately. Do we also need to set ACTION_SUBTREE in case the
> entry is a table entry? Or is it done in the caller somewhere? I could
> not figure out.
>
> An alternative would be to have an ARCH_WANT_NON_LEAF_PTDUMP Kconfig
> option instead of a bool note_non_leaf in struct ptdump_state. This
> option seems to be entirely static, not sure it's worth a struct member
> for it. You'd use IS_ENABLED() above instead of st->note_non_leaf.
ACTION_SUBTREE seems right, I will look into it. Something like (though
I'll check to see if it is correct and polish):
walk_action = (!pgd_leaf) ? ACTION_SUBTREE : ACTION_CONTINUE;
if ((IS_ENABLED(...) && !pgd_leaf()) || pgd_leaf())
st->note_page ...
> --
> Catalin
Nice! Thank you for your feedback. I will iterate and also fix up the
other minor things, e.g. 72 character wrap in doc files.
next prev parent reply other threads:[~2024-05-08 15:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-30 16:05 [PATCH v3] ptdump: add intermediate directory support Maxwell Bland
2024-04-30 16:13 ` Maxwell Bland
2024-05-01 12:07 ` Catalin Marinas
2024-05-01 14:32 ` Maxwell Bland
2024-05-08 11:20 ` Catalin Marinas
2024-05-08 15:29 ` Maxwell Bland [this message]
2024-05-21 16:54 ` Jesse Taube
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=h4znjkryp5k6sq4by7lgmctbfyhkyzqmm3f7o74ktfy7k3wfkr@s2mktazkcv3k \
--to=mbland@motorola.com \
--cc=akpm@linux-foundation.org \
--cc=alexghiti@rivosinc.com \
--cc=ardb@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=christophe.leroy@csgroup.eu \
--cc=corbet@lwn.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mark.rutland@arm.com \
--cc=will@kernel.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 read-only IMAP folder(s) and NNTP newsgroup(s).