linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Dave Hansen <dave.hansen@intel.com>
To: David Hildenbrand <david@redhat.com>
Cc: Alexander Duyck <alexander.h.duyck@linux.intel.com>,
	Michal Hocko <mhocko@kernel.org>,
	akpm@linux-foundation.org, aarcange@redhat.com,
	dan.j.williams@intel.com, konrad.wilk@oracle.com,
	lcapitulino@redhat.com, mgorman@techsingularity.net,
	mm-commits@vger.kernel.org, mst@redhat.com, osalvador@suse.de,
	pagupta@redhat.com, pbonzini@redhat.com, riel@surriel.com,
	vbabka@suse.cz, wei.w.wang@intel.com, willy@infradead.org,
	yang.zhang.wz@gmail.com, linux-mm@kvack.org
Subject: Re: + mm-introduce-reported-pages.patch added to -mm tree
Date: Thu, 7 Nov 2019 09:12:01 -0800	[thread overview]
Message-ID: <ec585925-1f72-fbbe-3e24-63aed83b3836@intel.com> (raw)
In-Reply-To: <92C323F0-41BE-4988-8C39-1513FAC40458@redhat.com>

On 11/6/19 4:52 PM, David Hildenbrand wrote:
>> It seems to me like Alex's approach tries to minimize new metadata, but
>> imposes some rules on the internals of the allocator.  Nitesh's is more
>> disconnected from the allocator, but has the increased complexity of
>> managing some new disjoint metadata.
>>
>> Right?
> Very right AFAIKS. It’s a matter of where to store new metadata and
> how to stop the buddy from reusing pages that are currently getting
> reported.  The latter does not spill virt specific optimization stuff
> into the core buddy, which is why that information has to be tracked
> differently.

I went back and looked at how much is getting spilled into the core
buddy.  The refactoring (patches 1-2) looks pretty neutral in terms of
complexity.  I think it actually makes things look a wee bit nicer.

Patch 3 does, indeed, poke into the core of the allocator.  There are
really six new sites that need to be poked:

	2 sites in for compaction.c
	1 site in memory_hotplug.c
	3 sites in page_alloc.c

Plus an extra function call argument and the new free_reported_page() in
page_alloc.c.  That's not _great_, of course, but it's not a deal
breaker for me, but maybe I've seen too many buddy atrocities over the
years and I'm numb to the pain. :)

Nitesh's patches seem to do this with a single poke at the allocator.
The downside is that since there are new data structures to manage, it
takes more code to create and use them since the buddy structures don't
get reused.

Both approaches seem totally reasonable to me.  I don't like Alex's
pokes into the core of the allocator, but I also don't like Nitesh's
extra data structures and the (yet unimplemented) code that it will take
to make them handle all the things they need to like hotplug.

There's also a common kernel/hypervisor ABI that's *SHARED* between the
two approaches.  That's really the only thing that would marry us to one
approach versus the other forever.

Am I missing something?  What's the harm in merging the implementation
that's ready today?  If a better one comes along, we'll rip out the ~15
lines of code in page_alloc.c and merge the better one.


  reply	other threads:[~2019-11-07 17:12 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20191106000547.juQRi83gi%akpm@linux-foundation.org>
2019-11-06 12:16 ` Michal Hocko
2019-11-06 14:09   ` David Hildenbrand
2019-11-06 16:35     ` Alexander Duyck
2019-11-06 16:54       ` Michal Hocko
2019-11-06 17:48         ` Alexander Duyck
2019-11-06 22:11           ` Mel Gorman
2019-11-06 23:38             ` David Hildenbrand
2019-11-07  0:20             ` Alexander Duyck
2019-11-07 10:20               ` Mel Gorman
2019-11-07 16:07                 ` Alexander Duyck
2019-11-08  9:43                   ` Mel Gorman
2019-11-08 16:17                     ` Alexander Duyck
2019-11-08 18:41                       ` Mel Gorman
2019-11-08 20:29                         ` Alexander Duyck
2019-11-09 14:57                           ` Mel Gorman
2019-11-10 18:03                             ` Alexander Duyck
2019-11-06 23:33           ` David Hildenbrand
2019-11-07  0:20             ` Dave Hansen
2019-11-07  0:52               ` David Hildenbrand
2019-11-07 17:12                 ` Dave Hansen [this message]
2019-11-07 17:46                   ` Michal Hocko
2019-11-07 18:08                     ` Dave Hansen
2019-11-07 18:12                     ` Alexander Duyck
2019-11-08  9:57                       ` Michal Hocko
2019-11-08 16:43                         ` Alexander Duyck
2019-11-07 18:46                   ` Qian Cai
2019-11-07 18:02             ` Alexander Duyck
2019-11-07 19:37               ` Nitesh Narayan Lal
2019-11-07 22:46                 ` Alexander Duyck
2019-11-07 22:43               ` David Hildenbrand
2019-11-08  0:42                 ` Alexander Duyck
2019-11-08  7:06                   ` David Hildenbrand
2019-11-08 17:18                     ` Alexander Duyck
2019-11-12 13:04                       ` David Hildenbrand
2019-11-12 18:34                         ` Alexander Duyck
2019-11-12 21:05                           ` David Hildenbrand
2019-11-12 22:17                             ` David Hildenbrand
2019-11-12 22:19                             ` Alexander Duyck
2019-11-12 23:10                               ` David Hildenbrand
2019-11-13  0:31                                 ` Alexander Duyck
2019-11-13 18:51                           ` Nitesh Narayan Lal
2019-11-06 16:49   ` Nitesh Narayan Lal
2019-11-11 18:52   ` Nitesh Narayan Lal
2019-11-11 22:00     ` Alexander Duyck
2019-11-12 15:19       ` Nitesh Narayan Lal
2019-11-12 16:18         ` Alexander Duyck
2019-11-13 18:39           ` Nitesh Narayan Lal

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=ec585925-1f72-fbbe-3e24-63aed83b3836@intel.com \
    --to=dave.hansen@intel.com \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=alexander.h.duyck@linux.intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=david@redhat.com \
    --cc=konrad.wilk@oracle.com \
    --cc=lcapitulino@redhat.com \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@techsingularity.net \
    --cc=mhocko@kernel.org \
    --cc=mm-commits@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=osalvador@suse.de \
    --cc=pagupta@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=riel@surriel.com \
    --cc=vbabka@suse.cz \
    --cc=wei.w.wang@intel.com \
    --cc=willy@infradead.org \
    --cc=yang.zhang.wz@gmail.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