linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@kernel.org>
To: Dan Williams <dan.j.williams@intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Toshi Kani <toshi.kani@hpe.com>,
	"linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>,
	Logan Gunthorpe <logang@deltatee.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Stephen Bates <stephen.bates@microsemi.com>,
	Linux MM <linux-mm@kvack.org>,
	Nicolai Stange <nicstange@gmail.com>,
	Alexander Potapenko <glider@google.com>,
	Dmitry Vyukov <dvyukov@google.com>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Andrey Ryabinin <aryabinin@virtuozzo.com>,
	Mel Gorman <mgorman@techsingularity.net>,
	Vlastimil Babka <vbabka@suse.cz>
Subject: Re: [PATCH v4 00/13] mm: sub-section memory hotplug support
Date: Sun, 19 Mar 2017 12:35:31 -0400	[thread overview]
Message-ID: <20170319163531.GA25835@dhcp22.suse.cz> (raw)
In-Reply-To: <CAPcyv4hMt0s7UX=MO9KwakjXG9Uff=8XGR+Uc7YoVWoLqbKeGw@mail.gmail.com>

On Thu 16-03-17 12:04:48, Dan Williams wrote:
> On Thu, Mar 16, 2017 at 10:48 AM, Michal Hocko <mhocko@kernel.org> wrote:
> > Hi,
> > I didn't get to look through the patch series yet and I might not be
> > able before LSF/MM. How urgent is this? I am primarily asking because
> > the memory hotplug is really convoluted right now and putting more on
> > top doesn't really sound like the thing we really want. I have tried to
> > simplify the code [1] already but this is an early stage work so I do
> > not want to impose any burden on you. So I am wondering whether this
> > is something that needs to be merged very soon or it can wait for the
> > rework and hopefully end up being much simpler in the end as well.
> >
> > What do you think?
> 
> In general, I think it's better to add new features after
> reworks/cleanup, but it's not clear to me (yet) that the problem you
> are trying to solve makes this sub-section enabling for ZONE_DEVICE
> any simpler.
> 
> > [1] http://lkml.kernel.org/r/20170315091347.GA32626@dhcp22.suse.cz
> 
> ZONE_DEVICE pages are never "online". The patch says "Instead we do
> page->zone association from move_pfn_range which is called from
> online_pages." which means the new scheme currently doesn't comprehend
> the sprinkled ZONE_DEVICE hacks in the memory hotplug code.

I hope we can get rid of those...
 
> However, that said, I might take a look at whether the hacks belong in
> the auto-online code so that we can share the delayed zone
> initialization, but still skip marking the memory online per the
> expectations of ZONE_DEVICE.

I think this should be trivial. AFAIU it should be sufficient to split
my move_pfn_range into online_pfn_range which would do the MMOP_ONLINE*
handling and the real move_pfn_range which would do the zone specific
association. Your devm_memremap_pages would then call this
move_pfn_range after arch_add_memory. Or am I overlooking something?

I would still have to addapt your changes to remove hardcoded section
aligned expectations but that shouldn't be a big problem I guess. I
still haven't looked into those deeply to fully understand them.

> I expect it would be confusing to have
> memblock devices in sysfs for ranges that can't be marked online?

Well, if their only valid_zone would be ZONE_DEVICE then I believe it
shouldn't be confusing much.
-- 
Michal Hocko
SUSE Labs

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

      reply	other threads:[~2017-03-19 16:35 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-16  6:06 [PATCH v4 00/13] mm: sub-section memory hotplug support Dan Williams
2017-03-16  6:06 ` [PATCH v4 01/13] mm: fix type width of section to/from pfn conversion macros Dan Williams
2017-03-16  6:06 ` [PATCH v4 02/13] mm, devm_memremap_pages: use multi-order radix for ZONE_DEVICE lookups Dan Williams
2017-03-16  6:07 ` [PATCH v4 03/13] mm: introduce struct mem_section_usage to track partial population of a section Dan Williams
2017-03-16  6:07 ` [PATCH v4 04/13] mm: introduce common definitions for the size and mask " Dan Williams
2017-03-16  6:07 ` [PATCH v4 05/13] mm: cleanup sparse_init_one_section() return value Dan Williams
2017-03-16  6:07 ` [PATCH v4 06/13] mm: track active portions of a section at boot Dan Williams
2017-03-16  6:07 ` [PATCH v4 07/13] mm: fix register_new_memory() zone type detection Dan Williams
2017-03-16  6:07 ` [PATCH v4 08/13] x86, kasan: clarify kasan's dependency on vmemmap_populate_hugepages() Dan Williams
2017-03-20 15:43   ` Andrey Ryabinin
2017-03-16  6:07 ` [PATCH v4 09/13] mm: convert kmalloc_section_memmap() to populate_section_memmap() Dan Williams
2017-03-16  6:07 ` [PATCH v4 10/13] mm: prepare for hot-{add, remove} of sub-section ranges Dan Williams
2017-03-16  6:07 ` [PATCH v4 11/13] mm: support section-unaligned ZONE_DEVICE memory ranges Dan Williams
2017-03-16  6:07 ` [PATCH v4 12/13] mm: enable section-unaligned devm_memremap_pages() Dan Williams
2017-03-16  6:07 ` [PATCH v4 13/13] libnvdimm, pfn, dax: stop padding pmem namespaces to section alignment Dan Williams
2017-03-16 17:48 ` [PATCH v4 00/13] mm: sub-section memory hotplug support Michal Hocko
2017-03-16 19:04   ` Dan Williams
2017-03-19 16:35     ` 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=20170319163531.GA25835@dhcp22.suse.cz \
    --to=mhocko@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=aryabinin@virtuozzo.com \
    --cc=dan.j.williams@intel.com \
    --cc=dvyukov@google.com \
    --cc=glider@google.com \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-nvdimm@lists.01.org \
    --cc=logang@deltatee.com \
    --cc=mgorman@techsingularity.net \
    --cc=nicstange@gmail.com \
    --cc=stephen.bates@microsemi.com \
    --cc=toshi.kani@hpe.com \
    --cc=vbabka@suse.cz \
    /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).