All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robin Murphy <robin.murphy@arm.com>
To: Anshuman Khandual <anshuman.khandual@arm.com>,
	kernel test robot <lkp@intel.com>,
	linux-mm@kvack.org
Cc: Mark Rutland <mark.rutland@arm.com>,
	Barry Song <song.bao.hua@hisilicon.com>,
	kbuild-all@lists.01.org,
	Catalin Marinas <catalin.marinas@arm.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Will Deacon <will@kernel.org>,
	linux-arm-kernel@lists.infradead.org,
	Mike Kravetz <mike.kravetz@oracle.com>
Subject: Re: [PATCH] arm64/hugetlb: Reserve CMA areas for gigantic pages on 16K and 64K configs
Date: Wed, 24 Jun 2020 10:45:52 +0100	[thread overview]
Message-ID: <63be846e-7e61-39f7-e3f3-9a61cb50e44c@arm.com> (raw)
In-Reply-To: <bcae5e8e-b9b1-7215-a7a4-225a0aef39de@arm.com>

On 2020-06-24 01:17, Anshuman Khandual wrote:
> 
> 
> On 06/23/2020 10:10 PM, Robin Murphy wrote:
>> On 2020-06-23 13:48, Anshuman Khandual wrote:
>>>
>>> On 06/23/2020 02:54 PM, kernel test robot wrote:
>>>>      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.


WARNING: multiple messages have this Message-ID (diff)
From: Robin Murphy <robin.murphy@arm.com>
To: Anshuman Khandual <anshuman.khandual@arm.com>,
	kernel test robot <lkp@intel.com>,
	linux-mm@kvack.org
Cc: Mark Rutland <mark.rutland@arm.com>,
	Barry Song <song.bao.hua@hisilicon.com>,
	kbuild-all@lists.01.org,
	Catalin Marinas <catalin.marinas@arm.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Will Deacon <will@kernel.org>,
	linux-arm-kernel@lists.infradead.org,
	Mike Kravetz <mike.kravetz@oracle.com>
Subject: Re: [PATCH] arm64/hugetlb: Reserve CMA areas for gigantic pages on 16K and 64K configs
Date: Wed, 24 Jun 2020 10:45:52 +0100	[thread overview]
Message-ID: <63be846e-7e61-39f7-e3f3-9a61cb50e44c@arm.com> (raw)
In-Reply-To: <bcae5e8e-b9b1-7215-a7a4-225a0aef39de@arm.com>

On 2020-06-24 01:17, Anshuman Khandual wrote:
> 
> 
> On 06/23/2020 10:10 PM, Robin Murphy wrote:
>> On 2020-06-23 13:48, Anshuman Khandual wrote:
>>>
>>> On 06/23/2020 02:54 PM, kernel test robot wrote:
>>>>      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

WARNING: multiple messages have this Message-ID (diff)
From: Robin Murphy <robin.murphy@arm.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH] arm64/hugetlb: Reserve CMA areas for gigantic pages on 16K and 64K configs
Date: Wed, 24 Jun 2020 10:45:52 +0100	[thread overview]
Message-ID: <63be846e-7e61-39f7-e3f3-9a61cb50e44c@arm.com> (raw)
In-Reply-To: <bcae5e8e-b9b1-7215-a7a4-225a0aef39de@arm.com>

[-- Attachment #1: Type: text/plain, Size: 1538 bytes --]

On 2020-06-24 01:17, Anshuman Khandual wrote:
> 
> 
> On 06/23/2020 10:10 PM, Robin Murphy wrote:
>> On 2020-06-23 13:48, Anshuman Khandual wrote:
>>>
>>> On 06/23/2020 02:54 PM, kernel test robot wrote:
>>>>      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.

  reply	other threads:[~2020-06-24  9:45 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-23  6:21 [PATCH] arm64/hugetlb: Reserve CMA areas for gigantic pages on 16K and 64K configs Anshuman Khandual
2020-06-23  9:24 ` kernel test robot
2020-06-23  9:24   ` kernel test robot
2020-06-23 12:48   ` Anshuman Khandual
2020-06-23 12:48     ` Anshuman Khandual
2020-06-23 16:40     ` Robin Murphy
2020-06-23 16:40       ` Robin Murphy
2020-06-23 16:40       ` Robin Murphy
2020-06-24  0:17       ` Anshuman Khandual
2020-06-24  0:17         ` Anshuman Khandual
2020-06-24  0:17         ` Anshuman Khandual
2020-06-24  9:45         ` Robin Murphy [this message]
2020-06-24  9:45           ` Robin Murphy
2020-06-24  9:45           ` Robin Murphy
2020-06-24 12:22           ` Anshuman Khandual
2020-06-24 12:22             ` Anshuman Khandual
2020-06-24 12:22             ` Anshuman Khandual
2020-06-26 18:42 ` kernel test robot
2020-06-26 18:42   ` kernel test robot
2020-06-26 18:42   ` kernel test robot

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=63be846e-7e61-39f7-e3f3-9a61cb50e44c@arm.com \
    --to=robin.murphy@arm.com \
    --cc=akpm@linux-foundation.org \
    --cc=anshuman.khandual@arm.com \
    --cc=catalin.marinas@arm.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mm@kvack.org \
    --cc=lkp@intel.com \
    --cc=mark.rutland@arm.com \
    --cc=mike.kravetz@oracle.com \
    --cc=song.bao.hua@hisilicon.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 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.