From: Mike Rapoport <rppt@kernel.org>
To: David Hildenbrand <david@redhat.com>
Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>,
Dan Williams <dan.j.williams@intel.com>,
linux-cxl@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
Sudeep Holla <sudeep.holla@arm.com>,
Andrew Morton <akpm@linux-foundation.org>,
Will Deacon <will@kernel.org>, Jia He <justin.he@arm.com>,
Mike Rapoport <rppt@linux.ibm.com>,
linuxarm@huawei.com, catalin.marinas@arm.com,
Anshuman.Khandual@arm.com,
Yuquan Wang <wangyuquan1236@phytium.com.cn>,
Oscar Salvador <osalvador@suse.de>,
Lorenzo Pieralisi <lpieralisi@kernel.org>,
James Morse <james.morse@arm.com>
Subject: Re: [RFC PATCH 8/8] HACK: mm: memory_hotplug: Drop memblock_phys_free() call in try_remove_memory()
Date: Wed, 5 Jun 2024 11:00:03 +0300 [thread overview]
Message-ID: <ZmAbA-kXEfKBKj4-@kernel.org> (raw)
In-Reply-To: <900bd9b6-a788-4c71-9b43-aff4855ba234@redhat.com>
On Tue, Jun 04, 2024 at 11:39:27AM +0200, David Hildenbrand wrote:
> On 04.06.24 11:35, Mike Rapoport wrote:
> > On Mon, Jun 03, 2024 at 10:53:03PM +0200, David Hildenbrand wrote:
> > > On 03.06.24 12:43, Mike Rapoport wrote:
> > > > On Mon, Jun 03, 2024 at 11:14:00AM +0200, David Hildenbrand wrote:
> > >
> > > > The commit that added memblock_free() at the first place (f9126ab9241f
> > > > ("memory-hotplug: fix wrong edge when hot add a new node")) does not really
> > > > describe why that was required :(
> > > >
> > > > But at a quick glance it looks completely spurious.
> > >
> > > There are more details [1] but I also did not figure out why the
> > > memblock_free() was really required to resolve that issue.
> > >
> > > [1] https://marc.info/?l=linux-kernel&m=142961156129456&w=2
> > The tinkering with memblock there and in f9126ab9241f seem bogus in the
> > context of memory hotplug on x86.
> >
> > I believe that dropping that memblock_phys_free() is right thing to do
> > regardless of this series. There's no corresponding memblock_alloc() and it
> > was added as part of a fix for hotunplug on x86 that anyway had memblock
> > discarded at that point.
>
> So when we re-add that memory, we might have still ranges as "reserved".
I don't see how anything can become reserved on the hotplug path unless
hotplug is possible before mm_core_init().
There are no memblock_reserve() calls in memory_hotplug.c, no memblock
allocations possible after mm is inited, and even if memblock_add() will
need to allocate memory that will be done via slab.
> It does sound weird, but you're the boss :)
Nah, it's mm/memory_hotplug.c, so you are :)
But I can send a patch anyway :)
> --
> Cheers,
>
> David / dhildenb
>
--
Sincerely yours,
Mike.
WARNING: multiple messages have this Message-ID (diff)
From: Mike Rapoport <rppt@kernel.org>
To: David Hildenbrand <david@redhat.com>
Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>,
Dan Williams <dan.j.williams@intel.com>,
linux-cxl@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
Sudeep Holla <sudeep.holla@arm.com>,
Andrew Morton <akpm@linux-foundation.org>,
Will Deacon <will@kernel.org>, Jia He <justin.he@arm.com>,
Mike Rapoport <rppt@linux.ibm.com>,
linuxarm@huawei.com, catalin.marinas@arm.com,
Anshuman.Khandual@arm.com,
Yuquan Wang <wangyuquan1236@phytium.com.cn>,
Oscar Salvador <osalvador@suse.de>,
Lorenzo Pieralisi <lpieralisi@kernel.org>,
James Morse <james.morse@arm.com>
Subject: Re: [RFC PATCH 8/8] HACK: mm: memory_hotplug: Drop memblock_phys_free() call in try_remove_memory()
Date: Wed, 5 Jun 2024 11:00:03 +0300 [thread overview]
Message-ID: <ZmAbA-kXEfKBKj4-@kernel.org> (raw)
In-Reply-To: <900bd9b6-a788-4c71-9b43-aff4855ba234@redhat.com>
On Tue, Jun 04, 2024 at 11:39:27AM +0200, David Hildenbrand wrote:
> On 04.06.24 11:35, Mike Rapoport wrote:
> > On Mon, Jun 03, 2024 at 10:53:03PM +0200, David Hildenbrand wrote:
> > > On 03.06.24 12:43, Mike Rapoport wrote:
> > > > On Mon, Jun 03, 2024 at 11:14:00AM +0200, David Hildenbrand wrote:
> > >
> > > > The commit that added memblock_free() at the first place (f9126ab9241f
> > > > ("memory-hotplug: fix wrong edge when hot add a new node")) does not really
> > > > describe why that was required :(
> > > >
> > > > But at a quick glance it looks completely spurious.
> > >
> > > There are more details [1] but I also did not figure out why the
> > > memblock_free() was really required to resolve that issue.
> > >
> > > [1] https://marc.info/?l=linux-kernel&m=142961156129456&w=2
> > The tinkering with memblock there and in f9126ab9241f seem bogus in the
> > context of memory hotplug on x86.
> >
> > I believe that dropping that memblock_phys_free() is right thing to do
> > regardless of this series. There's no corresponding memblock_alloc() and it
> > was added as part of a fix for hotunplug on x86 that anyway had memblock
> > discarded at that point.
>
> So when we re-add that memory, we might have still ranges as "reserved".
I don't see how anything can become reserved on the hotplug path unless
hotplug is possible before mm_core_init().
There are no memblock_reserve() calls in memory_hotplug.c, no memblock
allocations possible after mm is inited, and even if memblock_add() will
need to allocate memory that will be done via slab.
> It does sound weird, but you're the boss :)
Nah, it's mm/memory_hotplug.c, so you are :)
But I can send a patch anyway :)
> --
> Cheers,
>
> David / dhildenb
>
--
Sincerely yours,
Mike.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2024-06-05 8:02 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-29 17:12 [RFC PATCH 0/8] arm64/memblock: Handling of CXL Fixed Memory Windows Jonathan Cameron
2024-05-29 17:12 ` Jonathan Cameron
2024-05-29 17:12 ` [RFC PATCH 1/8] arm64: numa: Introduce a memory_add_physaddr_to_nid() Jonathan Cameron
2024-05-29 17:12 ` Jonathan Cameron
2024-08-01 7:50 ` Yuquan Wang
2024-05-29 17:12 ` [RFC PATCH 2/8] arm64: memblock: Introduce a generic phys_addr_to_target_node() Jonathan Cameron
2024-05-29 17:12 ` Jonathan Cameron
2024-08-01 7:52 ` Yuquan Wang
2024-05-29 17:12 ` [RFC PATCH 3/8] mm: memblock: Add a means to add to memblock.reserved Jonathan Cameron
2024-05-29 17:12 ` Jonathan Cameron
2024-08-01 7:53 ` Yuquan Wang
2024-05-29 17:12 ` [RFC PATCH 4/8] arch_numa: Avoid onlining empty NUMA nodes Jonathan Cameron
2024-05-29 17:12 ` Jonathan Cameron
2024-08-01 7:53 ` Yuquan Wang
2024-05-29 17:12 ` [RFC PATCH 5/8] arch_numa: Make numa_add_memblk() set nid for memblock.reserved regions Jonathan Cameron
2024-05-29 17:12 ` Jonathan Cameron
2024-08-01 7:54 ` Yuquan Wang
2024-05-29 17:12 ` [RFC PATCH 6/8] arm64: mm: numa_fill_memblks() to add a memblock.reserved region if match Jonathan Cameron
2024-05-29 17:12 ` Jonathan Cameron
2024-08-01 7:54 ` Yuquan Wang
2024-05-29 17:12 ` [RFC PATCH 7/8] acpi: srat: cxl: Skip zero length CXL fixed memory windows Jonathan Cameron
2024-05-29 17:12 ` Jonathan Cameron
2024-08-01 7:55 ` Yuquan Wang
2024-05-29 17:12 ` [RFC PATCH 8/8] HACK: mm: memory_hotplug: Drop memblock_phys_free() call in try_remove_memory() Jonathan Cameron
2024-05-29 17:12 ` Jonathan Cameron
2024-05-30 10:07 ` Oscar Salvador
2024-05-30 10:07 ` Oscar Salvador
2024-05-30 12:14 ` Jonathan Cameron
2024-05-30 12:14 ` Jonathan Cameron
2024-05-31 7:49 ` David Hildenbrand
2024-05-31 7:49 ` David Hildenbrand
2024-05-31 9:48 ` Jonathan Cameron
2024-05-31 9:48 ` Jonathan Cameron
2024-05-31 9:55 ` David Hildenbrand
2024-05-31 9:55 ` David Hildenbrand
2024-06-06 15:44 ` Mike Rapoport
2024-06-06 15:44 ` Mike Rapoport
2024-06-03 7:57 ` Mike Rapoport
2024-06-03 7:57 ` Mike Rapoport
2024-06-03 9:14 ` David Hildenbrand
2024-06-03 9:14 ` David Hildenbrand
2024-06-03 10:43 ` Mike Rapoport
2024-06-03 10:43 ` Mike Rapoport
2024-06-03 20:53 ` David Hildenbrand
2024-06-03 20:53 ` David Hildenbrand
2024-06-04 9:35 ` Mike Rapoport
2024-06-04 9:35 ` Mike Rapoport
2024-06-04 9:39 ` David Hildenbrand
2024-06-04 9:39 ` David Hildenbrand
2024-06-05 8:00 ` Mike Rapoport [this message]
2024-06-05 8:00 ` Mike Rapoport
2024-06-05 8:23 ` David Hildenbrand
2024-06-05 8:23 ` David Hildenbrand
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=ZmAbA-kXEfKBKj4-@kernel.org \
--to=rppt@kernel.org \
--cc=Anshuman.Khandual@arm.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=akpm@linux-foundation.org \
--cc=catalin.marinas@arm.com \
--cc=dan.j.williams@intel.com \
--cc=david@redhat.com \
--cc=james.morse@arm.com \
--cc=justin.he@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-cxl@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=lpieralisi@kernel.org \
--cc=osalvador@suse.de \
--cc=rppt@linux.ibm.com \
--cc=sudeep.holla@arm.com \
--cc=wangyuquan1236@phytium.com.cn \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.