Linux-mm Archive on
 help / color / Atom feed
From: Oscar Salvador <>
Cc:,,,,,,, Oscar Salvador <>
Subject: [PATCH v2 0/2] Fixes for sub-section hotplug
Date: Wed, 17 Jul 2019 11:07:23 +0200
Message-ID: <> (raw)

v2 -> v1: Go the easy way and just adapt the check (Dan/Aneesh)

Hi all,

these two patches address a couple of issues I found while working on my
The issues are:

        1) section_deactivate mistakenly zeroes ms->section_mem_map and then
           tries to check whether the section is an early section, but since
           section_mem_map might have been zeroed, we will return false
           when it is really an early section.
           In order to fix this, let us check whether the section is early
           at function entry, so we do not neet check it again later.

        2) shrink_{node,zone}_span work on sub-section granularity now.
           The problem is that since deactivation of the section occurs later
           on in sparse_remove_section, so the pfn_valid()->pfn_section_valid()
           check will always return true for every sub-section chunk.
           In order to avoid that, let us adapt the check and skip the whole
           range to be removed.
           The user visible effect of this is that we are always left with,
           at least, PAGES_PER_SECTION spanned, even if we got to remove all
           memory linked to a zone/node

Oscar Salvador (2):
  mm,sparse: Fix deactivate_section for early sections
  mm,memory_hotplug: Fix shrink_{zone,node}_span

 mm/memory_hotplug.c | 8 ++++----
 mm/sparse.c         | 5 +++--
 2 files changed, 7 insertions(+), 6 deletions(-)


             reply index

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-17  9:07 Oscar Salvador [this message]
2019-07-17  9:07 ` [PATCH v2 1/2] mm,sparse: Fix deactivate_section for early sections Oscar Salvador
2019-07-17  9:07 ` [PATCH v2 2/2] mm,memory_hotplug: Fix shrink_{zone,node}_span Oscar Salvador
2019-07-17 18:45   ` Dan Williams

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-mm Archive on

Archives are clonable:
	git clone --mirror linux-mm/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-mm linux-mm/ \
	public-inbox-index linux-mm

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone