This series fixes pfn_valid() for ZONE_DEVICE based memory and also improves
its performance for normal hotplug memory. While here, it also reorganizes
pfn_valid() on CONFIG_SPARSEMEM. This series is based on v5.12-rc1.
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: James Morse <james.morse@arm.com>
Cc: Robin Murphy <robin.murphy@arm.com>
Cc: Jérôme Glisse <redacted>
Cc: Dan Williams <redacted>
Cc: David Hildenbrand <redacted>
Cc: Mike Rapoport <redacted>
Cc: Veronika Kabatova <redacted>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-mm@kvack.org
Cc: linux-kernel@vger.kernel.org
Changes in V3:
- Validate the pfn before fetching mem_section with __pfn_to_section() in [PATCH 2/2]
Changes in V2:
https://lore.kernel.org/linux-mm/1612239114-28428-1-git-send-email-anshuman.khandual@arm.com/
- Dropped pfn_valid() bifurcation based on CONFIG_SPARSEMEM
- Used PFN_PHYS() and PHYS_PFN() instead of __pfn_to_phys() and __phys_to_pfn()
- Moved __pfn_to_section() inside #ifdef CONFIG_SPARSEMEM with a { } construct
Changes in V1:
https://lore.kernel.org/linux-mm/1611905986-20155-1-git-send-email-anshuman.khandual@arm.com/
- Test pfn_section_valid() for non boot memory
Changes in RFC:
https://lore.kernel.org/linux-arm-kernel/1608621144-4001-1-git-send-email-anshuman.khandual@arm.com/
Anshuman Khandual (2):
arm64/mm: Fix pfn_valid() for ZONE_DEVICE based memory
arm64/mm: Reorganize pfn_valid()
arch/arm64/mm/init.c | 29 ++++++++++++++++++++++++++---
1 file changed, 26 insertions(+), 3 deletions(-)
--
2.20.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
pfn_valid() validates a pfn but basically it checks for a valid struct page
backing for that pfn. It should always return positive for memory ranges
backed with struct page mapping. But currently pfn_valid() fails for all
ZONE_DEVICE based memory types even though they have struct page mapping.
pfn_valid() asserts that there is a memblock entry for a given pfn without
MEMBLOCK_NOMAP flag being set. The problem with ZONE_DEVICE based memory is
that they do not have memblock entries. Hence memblock_is_map_memory() will
invariably fail via memblock_search() for a ZONE_DEVICE based address. This
eventually fails pfn_valid() which is wrong. memblock_is_map_memory() needs
to be skipped for such memory ranges. As ZONE_DEVICE memory gets hotplugged
into the system via memremap_pages() called from a driver, their respective
memory sections will not have SECTION_IS_EARLY set.
Normal hotplug memory will never have MEMBLOCK_NOMAP set in their memblock
regions. Because the flag MEMBLOCK_NOMAP was specifically designed and set
for firmware reserved memory regions. memblock_is_map_memory() can just be
skipped as its always going to be positive and that will be an optimization
for the normal hotplug memory. Like ZONE_DEVICE based memory, all normal
hotplugged memory too will not have SECTION_IS_EARLY set for their sections
Skipping memblock_is_map_memory() for all non early memory sections would
fix pfn_valid() problem for ZONE_DEVICE based memory and also improve its
performance for normal hotplug memory as well.
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Robin Murphy <robin.murphy@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Acked-by: David Hildenbrand <redacted>
Fixes: 73b20c84d42d ("arm64: mm: implement pte_devmap support")
Signed-off-by: Anshuman Khandual <redacted>
---
arch/arm64/mm/init.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
@@ -230,6 +230,18 @@ int pfn_valid(unsigned long pfn)if(!valid_section(__pfn_to_section(pfn)))return0;++/*+*ZONE_DEVICEmemorydoesnothavethememblockentries.+*memblock_is_map_memory()checkforZONE_DEVICEbased+*addresseswillalwaysfail.Eventhenormalhotplugged+*memorywillneverhaveMEMBLOCK_NOMAPflagsetintheir+*memblockentries.Skipmemblocksearchforallnonearly+*memorysectionscoveringallofhotplugmemoryincluding+*bothnormalandZONE_DEVICEbased.+*/+if(!early_section(__pfn_to_section(pfn)))+returnpfn_section_valid(__pfn_to_section(pfn),pfn);#endifreturnmemblock_is_map_memory(addr);}
--
2.20.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
On Fri, Mar 05, 2021 at 10:54:57AM +0530, Anshuman Khandual wrote:
quoted hunk
pfn_valid() validates a pfn but basically it checks for a valid struct page
backing for that pfn. It should always return positive for memory ranges
backed with struct page mapping. But currently pfn_valid() fails for all
ZONE_DEVICE based memory types even though they have struct page mapping.
pfn_valid() asserts that there is a memblock entry for a given pfn without
MEMBLOCK_NOMAP flag being set. The problem with ZONE_DEVICE based memory is
that they do not have memblock entries. Hence memblock_is_map_memory() will
invariably fail via memblock_search() for a ZONE_DEVICE based address. This
eventually fails pfn_valid() which is wrong. memblock_is_map_memory() needs
to be skipped for such memory ranges. As ZONE_DEVICE memory gets hotplugged
into the system via memremap_pages() called from a driver, their respective
memory sections will not have SECTION_IS_EARLY set.
Normal hotplug memory will never have MEMBLOCK_NOMAP set in their memblock
regions. Because the flag MEMBLOCK_NOMAP was specifically designed and set
for firmware reserved memory regions. memblock_is_map_memory() can just be
skipped as its always going to be positive and that will be an optimization
for the normal hotplug memory. Like ZONE_DEVICE based memory, all normal
hotplugged memory too will not have SECTION_IS_EARLY set for their sections
Skipping memblock_is_map_memory() for all non early memory sections would
fix pfn_valid() problem for ZONE_DEVICE based memory and also improve its
performance for normal hotplug memory as well.
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Robin Murphy <robin.murphy@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Acked-by: David Hildenbrand <redacted>
Fixes: 73b20c84d42d ("arm64: mm: implement pte_devmap support")
Signed-off-by: Anshuman Khandual <redacted>
---
arch/arm64/mm/init.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
@@ -230,6 +230,18 @@ int pfn_valid(unsigned long pfn)if(!valid_section(__pfn_to_section(pfn)))return0;++/*+*ZONE_DEVICEmemorydoesnothavethememblockentries.+*memblock_is_map_memory()checkforZONE_DEVICEbased+*addresseswillalwaysfail.Eventhenormalhotplugged+*memorywillneverhaveMEMBLOCK_NOMAPflagsetintheir+*memblockentries.Skipmemblocksearchforallnonearly+*memorysectionscoveringallofhotplugmemoryincluding+*bothnormalandZONE_DEVICEbased.+*/+if(!early_section(__pfn_to_section(pfn)))+returnpfn_section_valid(__pfn_to_section(pfn),pfn);
Would something like this work instead:
if (online_device_section(ms))
return 1;
to avoid the assumptions around early_section()?
--
Catalin
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
From: David Hildenbrand <hidden> Date: 2021-03-05 18:25:19
On 05.03.21 19:13, Catalin Marinas wrote:
On Fri, Mar 05, 2021 at 10:54:57AM +0530, Anshuman Khandual wrote:
quoted
pfn_valid() validates a pfn but basically it checks for a valid struct page
backing for that pfn. It should always return positive for memory ranges
backed with struct page mapping. But currently pfn_valid() fails for all
ZONE_DEVICE based memory types even though they have struct page mapping.
pfn_valid() asserts that there is a memblock entry for a given pfn without
MEMBLOCK_NOMAP flag being set. The problem with ZONE_DEVICE based memory is
that they do not have memblock entries. Hence memblock_is_map_memory() will
invariably fail via memblock_search() for a ZONE_DEVICE based address. This
eventually fails pfn_valid() which is wrong. memblock_is_map_memory() needs
to be skipped for such memory ranges. As ZONE_DEVICE memory gets hotplugged
into the system via memremap_pages() called from a driver, their respective
memory sections will not have SECTION_IS_EARLY set.
Normal hotplug memory will never have MEMBLOCK_NOMAP set in their memblock
regions. Because the flag MEMBLOCK_NOMAP was specifically designed and set
for firmware reserved memory regions. memblock_is_map_memory() can just be
skipped as its always going to be positive and that will be an optimization
for the normal hotplug memory. Like ZONE_DEVICE based memory, all normal
hotplugged memory too will not have SECTION_IS_EARLY set for their sections
Skipping memblock_is_map_memory() for all non early memory sections would
fix pfn_valid() problem for ZONE_DEVICE based memory and also improve its
performance for normal hotplug memory as well.
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Robin Murphy <robin.murphy@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Acked-by: David Hildenbrand <redacted>
Fixes: 73b20c84d42d ("arm64: mm: implement pte_devmap support")
Signed-off-by: Anshuman Khandual <redacted>
---
arch/arm64/mm/init.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
@@ -230,6 +230,18 @@ int pfn_valid(unsigned long pfn)if(!valid_section(__pfn_to_section(pfn)))return0;++/*+*ZONE_DEVICEmemorydoesnothavethememblockentries.+*memblock_is_map_memory()checkforZONE_DEVICEbased+*addresseswillalwaysfail.Eventhenormalhotplugged+*memorywillneverhaveMEMBLOCK_NOMAPflagsetintheir+*memblockentries.Skipmemblocksearchforallnonearly+*memorysectionscoveringallofhotplugmemoryincluding+*bothnormalandZONE_DEVICEbased.+*/+if(!early_section(__pfn_to_section(pfn)))+returnpfn_section_valid(__pfn_to_section(pfn),pfn);
Would something like this work instead:
if (online_device_section(ms))
return 1;
to avoid the assumptions around early_section()?
Please keep online section logic out of pfn valid logic. Tow different
things. (and rather not diverge too much from generic pfn_valid() - we
want to achieve the opposite in the long term, merging both implementations)
--
Thanks,
David / dhildenb
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
On Fri, Mar 05, 2021 at 07:24:21PM +0100, David Hildenbrand wrote:
On 05.03.21 19:13, Catalin Marinas wrote:
quoted
On Fri, Mar 05, 2021 at 10:54:57AM +0530, Anshuman Khandual wrote:
quoted
pfn_valid() validates a pfn but basically it checks for a valid struct page
backing for that pfn. It should always return positive for memory ranges
backed with struct page mapping. But currently pfn_valid() fails for all
ZONE_DEVICE based memory types even though they have struct page mapping.
pfn_valid() asserts that there is a memblock entry for a given pfn without
MEMBLOCK_NOMAP flag being set. The problem with ZONE_DEVICE based memory is
that they do not have memblock entries. Hence memblock_is_map_memory() will
invariably fail via memblock_search() for a ZONE_DEVICE based address. This
eventually fails pfn_valid() which is wrong. memblock_is_map_memory() needs
to be skipped for such memory ranges. As ZONE_DEVICE memory gets hotplugged
into the system via memremap_pages() called from a driver, their respective
memory sections will not have SECTION_IS_EARLY set.
Normal hotplug memory will never have MEMBLOCK_NOMAP set in their memblock
regions. Because the flag MEMBLOCK_NOMAP was specifically designed and set
for firmware reserved memory regions. memblock_is_map_memory() can just be
skipped as its always going to be positive and that will be an optimization
for the normal hotplug memory. Like ZONE_DEVICE based memory, all normal
hotplugged memory too will not have SECTION_IS_EARLY set for their sections
Skipping memblock_is_map_memory() for all non early memory sections would
fix pfn_valid() problem for ZONE_DEVICE based memory and also improve its
performance for normal hotplug memory as well.
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Robin Murphy <robin.murphy@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Acked-by: David Hildenbrand <redacted>
Fixes: 73b20c84d42d ("arm64: mm: implement pte_devmap support")
Signed-off-by: Anshuman Khandual <redacted>
---
arch/arm64/mm/init.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
@@ -230,6 +230,18 @@ int pfn_valid(unsigned long pfn)if(!valid_section(__pfn_to_section(pfn)))return0;++/*+*ZONE_DEVICEmemorydoesnothavethememblockentries.+*memblock_is_map_memory()checkforZONE_DEVICEbased+*addresseswillalwaysfail.Eventhenormalhotplugged+*memorywillneverhaveMEMBLOCK_NOMAPflagsetintheir+*memblockentries.Skipmemblocksearchforallnonearly+*memorysectionscoveringallofhotplugmemoryincluding+*bothnormalandZONE_DEVICEbased.+*/+if(!early_section(__pfn_to_section(pfn)))+returnpfn_section_valid(__pfn_to_section(pfn),pfn);
Would something like this work instead:
if (online_device_section(ms))
return 1;
to avoid the assumptions around early_section()?
Please keep online section logic out of pfn valid logic. Tow different
things. (and rather not diverge too much from generic pfn_valid() - we want
to achieve the opposite in the long term, merging both implementations)
I think I misread the code. I was looking for a new flag to check like
SECTION_IS_DEVICE instead of assuming that !SECTION_IS_EARLY means
device or mhp.
Anyway, staring at this code for a bit more, I came to the conclusion
that the logic in Anshuman's patches is fairly robust - we only need to
check for memblock_is_map_memory() if early_section() as that's the only
case where we can have MEMBLOCK_NOMAP. Maybe the comment above should be
re-written a bit and avoid the ZONE_DEVICE and hotplugged memory
details altogether.
--
Catalin
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
On Fri, Mar 05, 2021 at 10:54:57AM +0530, Anshuman Khandual wrote:
quoted hunk
pfn_valid() validates a pfn but basically it checks for a valid struct page
backing for that pfn. It should always return positive for memory ranges
backed with struct page mapping. But currently pfn_valid() fails for all
ZONE_DEVICE based memory types even though they have struct page mapping.
pfn_valid() asserts that there is a memblock entry for a given pfn without
MEMBLOCK_NOMAP flag being set. The problem with ZONE_DEVICE based memory is
that they do not have memblock entries. Hence memblock_is_map_memory() will
invariably fail via memblock_search() for a ZONE_DEVICE based address. This
eventually fails pfn_valid() which is wrong. memblock_is_map_memory() needs
to be skipped for such memory ranges. As ZONE_DEVICE memory gets hotplugged
into the system via memremap_pages() called from a driver, their respective
memory sections will not have SECTION_IS_EARLY set.
Normal hotplug memory will never have MEMBLOCK_NOMAP set in their memblock
regions. Because the flag MEMBLOCK_NOMAP was specifically designed and set
for firmware reserved memory regions. memblock_is_map_memory() can just be
skipped as its always going to be positive and that will be an optimization
for the normal hotplug memory. Like ZONE_DEVICE based memory, all normal
hotplugged memory too will not have SECTION_IS_EARLY set for their sections
Skipping memblock_is_map_memory() for all non early memory sections would
fix pfn_valid() problem for ZONE_DEVICE based memory and also improve its
performance for normal hotplug memory as well.
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Robin Murphy <robin.murphy@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Acked-by: David Hildenbrand <redacted>
Fixes: 73b20c84d42d ("arm64: mm: implement pte_devmap support")
Signed-off-by: Anshuman Khandual <redacted>
---
arch/arm64/mm/init.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
@@ -230,6 +230,18 @@ int pfn_valid(unsigned long pfn)if(!valid_section(__pfn_to_section(pfn)))return0;++/*+*ZONE_DEVICEmemorydoesnothavethememblockentries.+*memblock_is_map_memory()checkforZONE_DEVICEbased+*addresseswillalwaysfail.Eventhenormalhotplugged+*memorywillneverhaveMEMBLOCK_NOMAPflagsetintheir+*memblockentries.Skipmemblocksearchforallnonearly+*memorysectionscoveringallofhotplugmemoryincluding+*bothnormalandZONE_DEVICEbased.+*/+if(!early_section(__pfn_to_section(pfn)))+returnpfn_section_valid(__pfn_to_section(pfn),pfn);#endifreturnmemblock_is_map_memory(addr);}
There are multiple instances of pfn_to_section_nr() and __pfn_to_section()
when CONFIG_SPARSEMEM is enabled. This can be optimized if memory section
is fetched earlier. This replaces the open coded PFN and ADDR conversion
with PFN_PHYS() and PHYS_PFN() helpers. While there, also add a comment.
This does not cause any functional change.
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Reviewed-by: David Hildenbrand <redacted>
Signed-off-by: Anshuman Khandual <redacted>
---
arch/arm64/mm/init.c | 21 ++++++++++++++++-----
1 file changed, 16 insertions(+), 5 deletions(-)
@@ -219,16 +219,26 @@ static void __init zone_sizes_init(unsigned long min, unsigned long max)intpfn_valid(unsignedlongpfn){-phys_addr_taddr=pfn<<PAGE_SHIFT;+phys_addr_taddr=PFN_PHYS(pfn);-if((addr>>PAGE_SHIFT)!=pfn)+/*+*EnsuretheupperPAGE_SHIFTbitsareclearinthe+*pfn.Elseitmightleadtofalsepositiveswhen+*someoftheupperbitsareset,butthelowerbits+*matchavalidpfn.+*/+if(PHYS_PFN(addr)!=pfn)return0;#ifdef CONFIG_SPARSEMEM+{+structmem_section*ms;+if(pfn_to_section_nr(pfn)>=NR_MEM_SECTIONS)return0;-if(!valid_section(__pfn_to_section(pfn)))+ms=__pfn_to_section(pfn);+if(!valid_section(ms))return0;/*
@@ -240,8 +250,9 @@ int pfn_valid(unsigned long pfn)*memorysectionscoveringallofhotplugmemoryincluding*bothnormalandZONE_DEVICEbased.*/-if(!early_section(__pfn_to_section(pfn)))-returnpfn_section_valid(__pfn_to_section(pfn),pfn);+if(!early_section(ms))+returnpfn_section_valid(ms,pfn);+}#endifreturnmemblock_is_map_memory(addr);}
--
2.20.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
On Fri, Mar 05, 2021 at 10:54:58AM +0530, Anshuman Khandual wrote:
There are multiple instances of pfn_to_section_nr() and __pfn_to_section()
when CONFIG_SPARSEMEM is enabled. This can be optimized if memory section
is fetched earlier. This replaces the open coded PFN and ADDR conversion
with PFN_PHYS() and PHYS_PFN() helpers. While there, also add a comment.
This does not cause any functional change.
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Reviewed-by: David Hildenbrand <redacted>
Signed-off-by: Anshuman Khandual <redacted>
This series fixes pfn_valid() for ZONE_DEVICE based memory and also improves
its performance for normal hotplug memory. While here, it also reorganizes
pfn_valid() on CONFIG_SPARSEMEM. This series is based on v5.12-rc1.
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: James Morse <james.morse@arm.com>
Cc: Robin Murphy <robin.murphy@arm.com>
Cc: Jérôme Glisse <redacted>
Cc: Dan Williams <redacted>
Cc: David Hildenbrand <redacted>
Cc: Mike Rapoport <redacted>
Cc: Veronika Kabatova <redacted>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-mm@kvack.org
Cc: linux-kernel@vger.kernel.org
Changes in V3:
- Validate the pfn before fetching mem_section with __pfn_to_section() in [PATCH 2/2]
This series fixes pfn_valid() for ZONE_DEVICE based memory and also
improves
its performance for normal hotplug memory. While here, it also reorganizes
pfn_valid() on CONFIG_SPARSEMEM. This series is based on v5.12-rc1.
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: James Morse <james.morse@arm.com>
Cc: Robin Murphy <robin.murphy@arm.com>
Cc: Jérôme Glisse <redacted>
Cc: Dan Williams <redacted>
Cc: David Hildenbrand <redacted>
Cc: Mike Rapoport <redacted>
Cc: Veronika Kabatova <redacted>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-mm@kvack.org
Cc: linux-kernel@vger.kernel.org
Changes in V3:
- Validate the pfn before fetching mem_section with __pfn_to_section() in
[PATCH 2/2]
Hello Veronica,
Could you please help recreate the earlier failure [1] but with this
series applies on v5.12-rc1. Thank you.
Hello Anshuman,
the machine in question is currently loaned to a developer. I'll reach
out to them and will let you know once I have any results.
Veronika
This series fixes pfn_valid() for ZONE_DEVICE based memory and also
improves
its performance for normal hotplug memory. While here, it also
reorganizes
pfn_valid() on CONFIG_SPARSEMEM. This series is based on v5.12-rc1.
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: James Morse <james.morse@arm.com>
Cc: Robin Murphy <robin.murphy@arm.com>
Cc: Jérôme Glisse <redacted>
Cc: Dan Williams <redacted>
Cc: David Hildenbrand <redacted>
Cc: Mike Rapoport <redacted>
Cc: Veronika Kabatova <redacted>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-mm@kvack.org
Cc: linux-kernel@vger.kernel.org
Changes in V3:
- Validate the pfn before fetching mem_section with __pfn_to_section() in
[PATCH 2/2]
Hello Veronica,
Could you please help recreate the earlier failure [1] but with this
series applies on v5.12-rc1. Thank you.
Hello Anshuman,
the machine in question is currently loaned to a developer. I'll reach
out to them and will let you know once I have any results.
Hi,
I'm happy to report the kernel boots with these new patches. I used the
5.12.0-rc1 kernel (commit 280d542f6ffac0) as a base. The full console log
from the boot process is available at
https://gitlab.com/-/snippets/2086833
in case you want to take a look. Note that there are some call traces
starting around line 3220, but they are NOT introduced by these two
patches and are also present with the base mainline kernel.
Veronika
On Fri, Mar 05, 2021 at 01:16:28PM -0500, Veronika Kabatova wrote:
quoted
quoted
On 3/5/21 10:54 AM, Anshuman Khandual wrote:
quoted
This series fixes pfn_valid() for ZONE_DEVICE based memory and
also improves its performance for normal hotplug memory. While
here, it also reorganizes pfn_valid() on CONFIG_SPARSEMEM. This
series is based on v5.12-rc1.
[...]
quoted
quoted
Could you please help recreate the earlier failure [1] but with this
series applies on v5.12-rc1. Thank you.
the machine in question is currently loaned to a developer. I'll reach
out to them and will let you know once I have any results.
I'm happy to report the kernel boots with these new patches. I used the
5.12.0-rc1 kernel (commit 280d542f6ffac0) as a base. The full console log
from the boot process is available at
https://gitlab.com/-/snippets/2086833
From: Will Deacon <will@kernel.org> Date: 2021-03-08 19:17:06
On Fri, 5 Mar 2021 10:54:56 +0530, Anshuman Khandual wrote:
This series fixes pfn_valid() for ZONE_DEVICE based memory and also improves
its performance for normal hotplug memory. While here, it also reorganizes
pfn_valid() on CONFIG_SPARSEMEM. This series is based on v5.12-rc1.
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: James Morse <james.morse@arm.com>
Cc: Robin Murphy <robin.murphy@arm.com>
Cc: Jérôme Glisse <redacted>
Cc: Dan Williams <redacted>
Cc: David Hildenbrand <redacted>
Cc: Mike Rapoport <redacted>
Cc: Veronika Kabatova <redacted>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-mm@kvack.org
Cc: linux-kernel@vger.kernel.org
[...]