From: Robin Murphy <robin.murphy@arm.com> Date: 2020-06-23 16:40:59
On 2020-06-23 13:48, Anshuman Khandual wrote:
On 06/23/2020 02:54 PM, kernel test robot wrote:
quoted
423 /*
424 * must be done after arm64_numa_init() which calls numa_init() to
425 * initialize node_online_map that gets used in hugetlb_cma_reserve()
426 * while allocating required CMA size across online nodes.
427 */
> 428 arm64_hugetlb_cma_reserve();
Wrapping this call site with CONFIG_HUGETLB_PAGE solves the problem.
...although it might be nicer to include asm/hugetlb.h directly so that
you can pick up the stub definition reliably.
Robin.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
423 /*
424 * must be done after arm64_numa_init() which calls numa_init() to
425 * initialize node_online_map that gets used in hugetlb_cma_reserve()
426 * while allocating required CMA size across online nodes.
427 */
> 428 arm64_hugetlb_cma_reserve();
Wrapping this call site with CONFIG_HUGETLB_PAGE solves the problem.
...although it might be nicer to include asm/hugetlb.h directly so that you can pick up the stub definition reliably.
Including <asm/hugetlb.h> directly does not solve the problem and
<linux/hugetlb.h> is no better. arm64_hugetlb_cma_reserve() needs
protection wrt both CMA and HUGETLB_PAGE. Dropped HUGETLB_PAGE
assuming it should have been taken care as the stub itself was in
<asm/hugetlb.h>, which turns out to be not true.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
From: Robin Murphy <robin.murphy@arm.com> Date: 2020-06-24 09:45:58
On 2020-06-24 01:17, Anshuman Khandual wrote:
On 06/23/2020 10:10 PM, Robin Murphy wrote:
quoted
On 2020-06-23 13:48, Anshuman Khandual wrote:
quoted
On 06/23/2020 02:54 PM, kernel test robot wrote:
quoted
423 /*
424 * must be done after arm64_numa_init() which calls numa_init() to
425 * initialize node_online_map that gets used in hugetlb_cma_reserve()
426 * while allocating required CMA size across online nodes.
427 */
> 428 arm64_hugetlb_cma_reserve();
Wrapping this call site with CONFIG_HUGETLB_PAGE solves the problem.
...although it might be nicer to include asm/hugetlb.h directly so that you can pick up the stub definition reliably.
Including <asm/hugetlb.h> directly does not solve the problem and
<linux/hugetlb.h> is no better. arm64_hugetlb_cma_reserve() needs
protection wrt both CMA and HUGETLB_PAGE. Dropped HUGETLB_PAGE
assuming it should have been taken care as the stub itself was in
<asm/hugetlb.h>, which turns out to be not true.
Sure, I wasn't suggesting that the implementation of the header itself
wouldn't need tweaking - the point I was trying to get at is that it's
preferable to have *either* a stub definition in an always-reachable
header, *or* inline #ifdefs around the caller. Mixing both such that
there are 3 or 4 possible combinations just isn't nice to maintain.
Robin.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
423 /*
424 * must be done after arm64_numa_init() which calls numa_init() to
425 * initialize node_online_map that gets used in hugetlb_cma_reserve()
426 * while allocating required CMA size across online nodes.
427 */
> 428 arm64_hugetlb_cma_reserve();
Wrapping this call site with CONFIG_HUGETLB_PAGE solves the problem.
...although it might be nicer to include asm/hugetlb.h directly so that you can pick up the stub definition reliably.
Including <asm/hugetlb.h> directly does not solve the problem and
<linux/hugetlb.h> is no better. arm64_hugetlb_cma_reserve() needs
protection wrt both CMA and HUGETLB_PAGE. Dropped HUGETLB_PAGE
assuming it should have been taken care as the stub itself was in
<asm/hugetlb.h>, which turns out to be not true.
Sure, I wasn't suggesting that the implementation of the header itself wouldn't need tweaking - the point I was trying to get at is that it's preferable to have *either* a stub definition in an always-reachable header, *or* inline #ifdefs around the caller. Mixing both such that there are 3 or 4 possible combinations just isn't nice to maintain.
Makes sense, which one of these would be preferred instead.
1. Call site is protected with HUGETLB_PAGE and CMA
2. Definition is protected with CMA and HUGETLB_PAGE - in arch/arm64/mm/hugetlb.c
3. Declaration is in arch/arm64/include/asm/hugetlb.h (without any #ifdef)
OR
1. Definition is protected with CMA and HUGETLB_PAGE - in arch/arm64/mm/hugetlb.c
2. Stub definition and declaration with #ifdefs (HUGETLB_PAGE and CMA) in arch/arm64/mm/init.c
3. Call site is without any #ifdef
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel