All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Chen <Wei.Chen@arm.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: nd@arm.com, "Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Roger Pau Monné" <roger.pau@citrix.com>, "Wei Liu" <wl@xen.org>,
	"George Dunlap" <george.dunlap@citrix.com>,
	"Julien Grall" <julien@xen.org>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH v5 5/6] xen/x86: move NUMA scan nodes codes from x86 to common
Date: Thu, 29 Sep 2022 16:21:02 +0800	[thread overview]
Message-ID: <fc03f565-8c05-e310-fa0a-698ad7c569e3@arm.com> (raw)
In-Reply-To: <5ac85819-9a1d-b8bc-d49d-13cb34a3e7e9@suse.com>

Hi Jan,

On 2022/9/27 23:48, Jan Beulich wrote:
> On 20.09.2022 11:12, Wei Chen wrote:
>> +static bool __init nodes_cover_memory(void)
>> +{
>> +    unsigned int i;
>> +
>> +    for ( i = 0; ; i++ )
>> +    {
>> +        int err;
>> +        bool found;
>> +        unsigned int j;
>> +        paddr_t start, end;
>> +
>> +        /* Try to loop memory map from index 0 to end to get RAM ranges. */
>> +        err = arch_get_ram_range(i, &start, &end);
>> +
>> +        /* Reached the end of the memory map? */
>> +        if ( err == -ENOENT )
>> +            break;
>> +
>> +        /* Skip non-RAM entries. */
>> +        if ( err )
>> +            continue;
>> +
>> +        do {
>> +            found = false;
>> +            for_each_node_mask ( j, memory_nodes_parsed )
>> +                if ( start < nodes[j].end
>> +                    && end > nodes[j].start )
> 
> Nit: Style (placement of && and indentation). Does this actually need
> splitting across two lines?
> 

After covert from tab to spaces, yes, it doesn't need split into two 
lines. I will fix it.

>> --- a/xen/drivers/acpi/Kconfig
>> +++ b/xen/drivers/acpi/Kconfig
>> @@ -7,4 +7,5 @@ config ACPI_LEGACY_TABLES_LOOKUP
>>   
>>   config ACPI_NUMA
>>   	bool
>> +	select HAS_NUMA_NODE_FWID
>>   	select NUMA
> 
> While I might guess that you've chosen the insertion point to have
> things sorted alphabetically, I think here it would be more natural
> to select the wider option first and then also select the more
> narrow one.
> 

Ok, I will adjust the order.

> One further question though: How is this going to work for Arm64
> once it wants to support both the form of NUMA you're working to
> enable _and_ ACPI-based NUMA? There better wouldn't be a requirement
> to pick one of the two at build time - it would be nice for support
> of both forms to be able to co-exist in a single binary.

We are also working in this way. In part#3, we will check ACPI first,
only when ACPI is off, the DT NUMA will be used by Arm. If ACPI is on, 
we will skip DT NUMA.

Cheers,
Wei Chen

> 
> Jan


  reply	other threads:[~2022-09-29  8:21 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-20  9:12 [PATCH v5 0/6] Device tree based NUMA support for Arm - Part#2 Wei Chen
2022-09-20  9:12 ` [PATCH v5 1/6] xen/x86: Provide helpers for common code to access acpi_numa Wei Chen
2022-09-27  7:37   ` Jan Beulich
2022-09-29  6:29     ` Wei Chen
2022-09-20  9:12 ` [PATCH v5 2/6] xen/x86: move generically usable NUMA code from x86 to common Wei Chen
2022-09-27  8:19   ` Jan Beulich
2022-09-27  9:39     ` Jan Beulich
2022-09-29  7:58       ` Wei Chen
2022-09-29  7:43     ` Wei Chen
2022-09-29 12:14       ` Jan Beulich
2022-09-30  1:45         ` Wei Chen
2022-09-20  9:12 ` [PATCH v5 3/6] xen/x86: Use ASSERT instead of VIRTUAL_BUG_ON for phys_to_nid Wei Chen
2022-09-20  9:12 ` [PATCH v5 4/6] xen/x86: use arch_get_ram_range to get information from E820 map Wei Chen
2022-09-20  9:12 ` [PATCH v5 5/6] xen/x86: move NUMA scan nodes codes from x86 to common Wei Chen
2022-09-27 15:48   ` Jan Beulich
2022-09-29  8:21     ` Wei Chen [this message]
2022-09-29 12:21       ` Jan Beulich
2022-09-30  1:40         ` Wei Chen
2022-09-30  6:03           ` Jan Beulich
2022-10-09  7:25             ` Wei Chen
2022-10-10  7:03               ` Wei Chen
2022-10-10  8:25                 ` Jan Beulich
2022-09-20  9:12 ` [PATCH v5 6/6] xen: introduce a Kconfig option to configure NUMA nodes number Wei Chen

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=fc03f565-8c05-e310-fa0a-698ad7c569e3@arm.com \
    --to=wei.chen@arm.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=george.dunlap@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=nd@arm.com \
    --cc=roger.pau@citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.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.