From: Johannes Weiner <hannes@cmpxchg.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Saravanan D <saravanand@fb.com>,
mingo@redhat.com, x86@kernel.org, dave.hansen@linux.intel.com,
tj@kernel.org, linux-kernel@vger.kernel.org, kernel-team@fb.com
Subject: Re: [PATCH V6] x86/mm: Tracking linear mapping split events
Date: Mon, 8 Mar 2021 10:06:20 -0500 [thread overview]
Message-ID: <YEY9bNqysyK2ucDq@cmpxchg.org> (raw)
In-Reply-To: <20210305165715.94140a44b177d0e34d59e220@linux-foundation.org>
On Fri, Mar 05, 2021 at 04:57:15PM -0800, Andrew Morton wrote:
> On Thu, 18 Feb 2021 15:57:44 -0800 Saravanan D <saravanand@fb.com> wrote:
>
> > To help with debugging the sluggishness caused by TLB miss/reload,
> > we introduce monotonic hugepage [direct mapped] split event counts since
> > system state: SYSTEM_RUNNING to be displayed as part of
> > /proc/vmstat in x86 servers
> >
> > ...
> >
> > --- a/arch/x86/mm/pat/set_memory.c
> > +++ b/arch/x86/mm/pat/set_memory.c
> > @@ -120,6 +120,10 @@ enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT,
> > #ifdef CONFIG_SWAP
> > SWAP_RA,
> > SWAP_RA_HIT,
> > +#endif
> > +#ifdef CONFIG_X86
> > + DIRECT_MAP_LEVEL2_SPLIT,
> > + DIRECT_MAP_LEVEL3_SPLIT,
> > #endif
> > NR_VM_EVENT_ITEMS
> > };
>
> This is the first appearance of arch-specific fields in /proc/vmstat.
>
> I don't really see a problem with this - vmstat is basically a dumping
> ground of random developer stuff. But was this the best place in which
> to present this data?
IMO it's a big plus for discoverability.
One of the first things I tend to do when triaging mysterious memory
issues is going to /proc/vmstat and seeing if anything looks abnormal.
There is value in making that file comprehensive for all things that
could indicate memory-related pathologies.
The impetus for adding these is a real-world tlb regression caused by
kprobes chewing up the direct mapping that took longer to debug than
necessary. We have the /proc/meminfo lines on the DirectMap, but those
are more useful when you already have a theory - they simply don't
make problems immediately stand out the same way.
next prev parent reply other threads:[~2021-03-08 15:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-18 23:57 [PATCH V6] x86/mm: Tracking linear mapping split events Saravanan D
2021-03-01 22:43 ` Tejun Heo
2021-03-06 0:57 ` Andrew Morton
2021-03-08 15:06 ` Johannes Weiner [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-01-28 21:20 [PATCH V5] " Saravanan D
[not found] ` <20210128233430.1460964-1-saravanand@fb.com>
2021-01-28 23:41 ` [PATCH V6] " Tejun Heo
2021-01-29 19:27 ` Johannes Weiner
2021-02-08 23:17 ` Saravanan D
2021-02-08 23:30 ` Dave Hansen
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=YEY9bNqysyK2ucDq@cmpxchg.org \
--to=hannes@cmpxchg.org \
--cc=akpm@linux-foundation.org \
--cc=dave.hansen@linux.intel.com \
--cc=kernel-team@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=saravanand@fb.com \
--cc=tj@kernel.org \
--cc=x86@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