linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Minchan Kim <minchan@kernel.org>
To: Michal Hocko <mhocko@suse.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Suren Baghdasaryan <surenb@google.com>,
	Matthew Wilcox <willy@infradead.org>,
	linux-mm <linux-mm@kvack.org>,
	LKML <linux-kernel@vger.kernel.org>,
	SeongJae Park <sj@kernel.org>
Subject: Re: [PATCH 1/3] mm: return the number of pages successfully paged out
Date: Thu, 19 Jan 2023 13:15:36 -0800	[thread overview]
Message-ID: <Y8my+BOtiD7w16My@google.com> (raw)
In-Reply-To: <Y8kIS+nx2/nBfKei@dhcp22.suse.cz>

On Thu, Jan 19, 2023 at 10:07:23AM +0100, Michal Hocko wrote:
> On Wed 18-01-23 14:27:23, Minchan Kim wrote:
> [...]
> > Let me know if you have other concern or suggestion.
> 
> I would propose to use a tracepoint to track this on the madvise side.
> This way you can both track a per-process effectivity as well a madvise
> originator effectivity (if the policy is implemented by a global monitor
> then it won't get interfering activity by other users of this
> interface). Global counters cannot do neither of that.

I don't think the tracepoint is right approach for the purpose.

I understand we could get the same result using tracepoint using bpf or
something so whenever event happens, a daemon get the result and
accumlate the number so totally same result with global stat. Yeah,
technically it's doable. With the claim, there is nothing we can do
with tracpoint. Checks existing vmstat fields, why do we have them
into vmstat instead of tracepoint? TP is much easiler/fleixible but
with vmstat, we can get the ballpark under fleet easier to sense
what's going on simply, and once we found something weird, we could
turn on the trace to know the detail and TP would work for it.

With process control using process_madvise in centralized controlled
system, I think those two stats are really worth along with other
memory reclaim statistics to be captured for memory health. If we
have needs per-process level tracking(Actually, not for our case),
we could add the tracepoint later.


      reply	other threads:[~2023-01-19 21:15 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-17 23:16 Minchan Kim
2023-01-17 23:16 ` [PATCH 2/3] mm: return boolean for deactivate_page Minchan Kim
2023-01-17 23:16 ` [PATCH 3/3] mm: add vmstat statistics for madvise_[cold|pageout] Minchan Kim
2023-01-18  9:11   ` Michal Hocko
2023-01-18 17:15     ` Minchan Kim
2023-01-18 17:27       ` Michal Hocko
2023-01-18 17:55         ` Minchan Kim
2023-01-18 21:13           ` Michal Hocko
2023-01-18 21:47             ` Minchan Kim
2023-01-17 23:53 ` [PATCH 1/3] mm: return the number of pages successfully paged out Andrew Morton
2023-01-18  0:35   ` Minchan Kim
2023-01-18  0:58     ` Matthew Wilcox
2023-01-18  1:49       ` Minchan Kim
2023-01-18  9:10 ` Michal Hocko
2023-01-18 17:09   ` Minchan Kim
2023-01-18 17:35     ` Michal Hocko
2023-01-18 18:07       ` Minchan Kim
2023-01-18 21:23         ` Michal Hocko
2023-01-18 22:27           ` Minchan Kim
2023-01-19  9:07             ` Michal Hocko
2023-01-19 21:15               ` Minchan Kim [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=Y8my+BOtiD7w16My@google.com \
    --to=minchan@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=sj@kernel.org \
    --cc=surenb@google.com \
    --cc=willy@infradead.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