linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Weiner <hannes@cmpxchg.org>
To: Saravanan D <saravanand@fb.com>
Cc: x86@kernel.org, dave.hansen@linux.intel.com, luto@kernel.org,
	peterz@infradead.org, willy@infradead.org,
	linux-kernel@vger.kernel.org, kernel-team@fb.com,
	linux-mm@kvack.org, songliubraving@fb.com, tj@kernel.org
Subject: Re: [PATCH V6] x86/mm: Tracking linear mapping split events
Date: Fri, 29 Jan 2021 14:27:13 -0500	[thread overview]
Message-ID: <YBRhkSIuNvkrZo5o@cmpxchg.org> (raw)
In-Reply-To: <20210128233430.1460964-1-saravanand@fb.com>

On Thu, Jan 28, 2021 at 03:34:30PM -0800, Saravanan D 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
> 
> The lifetime split event information will be displayed at the bottom of
> /proc/vmstat
> ....
> swap_ra 0
> swap_ra_hit 0
> direct_map_level2_splits 94
> direct_map_level3_splits 4
> nr_unstable 0
> ....
> 
> One of the many lasting sources of direct hugepage splits is kernel
> tracing (kprobes, tracepoints).
> 
> Note that the kernel's code segment [512 MB] points to the same
> physical addresses that have been already mapped in the kernel's
> direct mapping range.
> 
> Source : Documentation/x86/x86_64/mm.rst
> 
> When we enable kernel tracing, the kernel has to modify
> attributes/permissions
> of the text segment hugepages that are direct mapped causing them to
> split.
> 
> Kernel's direct mapped hugepages do not coalesce back after split and
> remain in place for the remainder of the lifetime.
> 
> An instance of direct page splits when we turn on
> dynamic kernel tracing
> ....
> cat /proc/vmstat | grep -i direct_map_level
> direct_map_level2_splits 784
> direct_map_level3_splits 12
> bpftrace -e 'tracepoint:raw_syscalls:sys_enter { @ [pid, comm] =
> count(); }'
> cat /proc/vmstat | grep -i
> direct_map_level
> direct_map_level2_splits 789
> direct_map_level3_splits 12
> ....
> 
> Signed-off-by: Saravanan D <saravanand@fb.com>

Acked-by: Johannes Weiner <hannes@cmpxchg.org>


  parent reply	other threads:[~2021-01-29 19:27 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <a936a943-9d8f-7e3c-af38-1c99ae176e1f@intel.com>
     [not found] ` <20210128043547.1560435-1-saravanand@fb.com>
2021-01-28  4:51   ` [PATCH V4] x86/mm: Tracking linear mapping split events Matthew Wilcox
2021-01-28 10:49     ` [PATCH V5] " Saravanan D
2021-01-28 15:04       ` Matthew Wilcox
2021-01-28 19:49         ` Saravanan D
2021-01-28 16:33       ` Zi Yan
2021-01-28 16:41         ` Dave Hansen
2021-01-28 16:56           ` Zi Yan
2021-01-28 16:59         ` Song Liu
2021-01-28 19:17       ` Dave Hansen
2021-01-28 21:20         ` Saravanan D
2021-01-28 23:34           ` [PATCH V6] " Saravanan D
2021-01-28 23:41             ` Tejun Heo
2021-01-29 19:27             ` Johannes Weiner [this message]
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=YBRhkSIuNvkrZo5o@cmpxchg.org \
    --to=hannes@cmpxchg.org \
    --cc=dave.hansen@linux.intel.com \
    --cc=kernel-team@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=luto@kernel.org \
    --cc=peterz@infradead.org \
    --cc=saravanand@fb.com \
    --cc=songliubraving@fb.com \
    --cc=tj@kernel.org \
    --cc=willy@infradead.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;
as well as URLs for NNTP newsgroup(s).