linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@suse.com>
To: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: linux-mm@kvack.org, Daniel Jordan <daniel.m.jordan@oracle.com>,
	Zi Yan <ziy@nvidia.com>, John Hubbard <jhubbard@nvidia.com>,
	Mike Kravetz <mike.kravetz@oracle.com>,
	Oscar Salvador <osalvador@suse.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC V2] mm/vmstat: Add events for HugeTLB migration
Date: Tue, 6 Oct 2020 09:54:32 +0200	[thread overview]
Message-ID: <20201006075432.GA29020@dhcp22.suse.cz> (raw)
In-Reply-To: <308767be-acb3-a170-e64f-3c64a361f26e@arm.com>

On Tue 06-10-20 08:26:35, Anshuman Khandual wrote:
> 
> 
> On 10/05/2020 11:35 AM, Michal Hocko wrote:
> > On Mon 05-10-20 07:59:12, Anshuman Khandual wrote:
> >>
> >>
> >> On 10/02/2020 05:34 PM, Michal Hocko wrote:
> >>> On Wed 30-09-20 11:30:49, Anshuman Khandual wrote:
> >>>> Add following new vmstat events which will track HugeTLB page migration.
> >>>>
> >>>> 1. HUGETLB_MIGRATION_SUCCESS
> >>>> 2. HUGETLB_MIGRATION_FAILURE
> >>>>
> >>>> It follows the existing semantics to accommodate HugeTLB subpages in total
> >>>> page migration statistics. While here, this updates current trace event
> >>>> 'mm_migrate_pages' to accommodate now available HugeTLB based statistics.
> >>> What is the actual usecase? And how do you deal with the complexity
> >>> introduced by many different hugetlb page sizes. Really, what is the
> >>> point to having such a detailed view on hugetlb migration?
> >>>
> >>
> >> It helps differentiate various page migration events i.e normal, THP and
> >> HugeTLB and gives us more reliable and accurate measurement. Current stats
> >> as per PGMIGRATE_SUCCESS and PGMIGRATE_FAIL are misleading, as they contain
> >> both normal and HugeTLB pages as single entities, which is not accurate.
> > 
> > Yes this is true. But why does it really matter? Do you have a specific
> > example?
> 
> An example which demonstrates that mixing and misrepresentation in these
> stats create some problem ? Well, we could just create one scenario via
> an application with different VMA types and triggering some migrations.
> But the fact remains, that these stats are inaccurate and misleading
> which is very clear and apparent.

This doesn't sound like a proper justification to me.
 
> >> After this change, PGMIGRATE_SUCCESS and PGMIGRATE_FAIL will contain page
> >> migration statistics in terms of normal pages irrespective of whether any
> >> previous migrations until that point involved normal pages, THP or HugeTLB
> >> (any size) pages. At the least, this fixes existing misleading stats with
> >> PGMIGRATE_SUCCESS and PGMIGRATE_FAIL.
> >>
> >> Besides, it helps us understand HugeTLB migrations in more detail. Even
> >> though HugeTLB can be of various sizes on a given platform, these new
> >> stats HUGETLB_MIGRATION_SUCCESS and HUGETLB_MIGRATION_FAILURE give enough
> >> overall insight into HugeTLB migration events.
> > 
> > While true this all is way too vague to add yet another imprecise
> > counter.
> 
> Given that user knows about all HugeTLB mappings it has got, these counters
> are not really vague and could easily be related back.

How can you tell a difference between different hugetlb sizes?

> Moreover this change
> completes the migration stats restructuring which was started with adding
> THP counters. Otherwise it remains incomplete.

Our counters will be always incomplete. Please do realize they are mere
aid rather than a comprihensive toolset to identify the system behavior
to the very detail. We have way too many counters and this particular
ones are not adding much IMHO. At least not from your description which
sounds to me like "Yeah, why not do that although there is no strong
reason, well except that THP already has it so let's do it for hugetlb
as well". I really do not want to deal with yet another report in few
years that somebody wants to distinguish hugetlb migration of different
sizes.

Really, is there any _real_ practical use for these other than "nice,
let's just have it"?
-- 
Michal Hocko
SUSE Labs


      reply	other threads:[~2020-10-06  7:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-30  6:00 [RFC V2] mm/vmstat: Add events for HugeTLB migration Anshuman Khandual
2020-09-30  7:46 ` Oscar Salvador
2020-09-30 10:02   ` Anshuman Khandual
2020-09-30 10:33     ` Oscar Salvador
2020-10-01 22:16 ` Mike Kravetz
2020-10-02 12:04 ` Michal Hocko
2020-10-05  2:29   ` Anshuman Khandual
2020-10-05  6:05     ` Michal Hocko
2020-10-06  2:56       ` Anshuman Khandual
2020-10-06  7:54         ` Michal Hocko [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=20201006075432.GA29020@dhcp22.suse.cz \
    --to=mhocko@suse.com \
    --cc=akpm@linux-foundation.org \
    --cc=anshuman.khandual@arm.com \
    --cc=daniel.m.jordan@oracle.com \
    --cc=jhubbard@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mike.kravetz@oracle.com \
    --cc=osalvador@suse.de \
    --cc=ziy@nvidia.com \
    /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).