mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Sudarshan Rajagopalan <sudaraja@codeaurora.org>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>,
	Anshuman Khandual <anshuman.khandual@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Gavin Shan <gshan@redhat.com>,
	Logan Gunthorpe <logang@deltatee.com>,
	David Hildenbrand <david@redhat.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Steven Price <steven.price@arm.com>,
	Suren Baghdasaryan <surenb@google.com>
Subject: Re: [PATCH 2/2] arm64: allow hotpluggable sections to be offlined
Date: Sat, 17 Oct 2020 09:34:02 +0200	[thread overview]
Message-ID: <04C5B822-70DF-47CF-9F76-2A31843B01E8@redhat.com> (raw)
In-Reply-To: <c5f96b483158871ff65377884955fb0106e43951.1602899443.git.sudaraja@codeaurora.org>


> Am 17.10.2020 um 04:03 schrieb Sudarshan Rajagopalan <sudaraja@codeaurora.org>:
> 
> On receiving the MEM_GOING_OFFLINE notification, we disallow offlining of
> any boot memory by checking if section_early or not. With the introduction
> of SECTION_MARK_HOTPLUGGABLE, allow boot mem sections that are marked as
> hotpluggable with this bit set to be offlined and removed. This now allows
> certain boot mem sections to be offlined.
> 

The check (notifier) is in arm64 code. I don‘t see why you cannot make such decisions completely in arm64 code? Why would you have to mark sections?

Also, I think I am missing from *where* the code that marks sections removable is even called? Who makes such decisions?

This feels wrong. 

> Signed-off-by: Sudarshan Rajagopalan <sudaraja@codeaurora.org>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will@kernel.org>
> Cc: Anshuman Khandual <anshuman.khandual@arm.com>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: Gavin Shan <gshan@redhat.com>
> Cc: Logan Gunthorpe <logang@deltatee.com>
> Cc: David Hildenbrand <david@redhat.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Steven Price <steven.price@arm.com>
> Cc: Suren Baghdasaryan <surenb@google.com>
> ---
> arch/arm64/mm/mmu.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c
> index 75df62fea1b6..fb8878698672 100644
> --- a/arch/arm64/mm/mmu.c
> +++ b/arch/arm64/mm/mmu.c
> @@ -1487,7 +1487,7 @@ static int prevent_bootmem_remove_notifier(struct notifier_block *nb,
> 
>    for (; pfn < end_pfn; pfn += PAGES_PER_SECTION) {
>        ms = __pfn_to_section(pfn);
> -        if (early_section(ms))
> +        if (early_section(ms) && !removable_section(ms))
>            return NOTIFY_BAD;
>    }
>    return NOTIFY_OK;
> -- 
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
> a Linux Foundation Collaborative Project
> 


  reply	other threads:[~2020-10-17  7:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-17  2:02 [PATCH 0/2] mm/memory_hotplug, arm64: allow certain bootmem sections to be offlinable Sudarshan Rajagopalan
2020-10-17  2:02 ` [PATCH 1/2] mm/memory_hotplug: allow marking of memory sections as hotpluggable Sudarshan Rajagopalan
2020-10-17  8:26   ` Mike Rapoport
2020-10-17  9:36     ` David Hildenbrand
2020-10-21  9:54       ` Mike Rapoport
2020-10-17  2:02 ` [PATCH 2/2] arm64: allow hotpluggable sections to be offlined Sudarshan Rajagopalan
2020-10-17  7:34   ` David Hildenbrand [this message]
2020-10-19  6:56     ` Anshuman Khandual
2020-10-19  6:47 ` [PATCH 0/2] mm/memory_hotplug, arm64: allow certain bootmem sections to be offlinable Anshuman Khandual

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=04C5B822-70DF-47CF-9F76-2A31843B01E8@redhat.com \
    --to=david@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=anshuman.khandual@arm.com \
    --cc=catalin.marinas@arm.com \
    --cc=gshan@redhat.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=logang@deltatee.com \
    --cc=mark.rutland@arm.com \
    --cc=steven.price@arm.com \
    --cc=sudaraja@codeaurora.org \
    --cc=surenb@google.com \
    --cc=will@kernel.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

all inboxes | Powered by JetHome®