On 29.07.21 16:44, Justin He wrote:
Hi David

-----Original Message-----
From: David Hildenbrand <[email protected]>
Sent: Thursday, July 29, 2021 3:59 PM
To: Justin He <[email protected]>; Dan Williams <[email protected]>;
Vishal Verma <[email protected]>; Dave Jiang <[email protected]>
Cc: [email protected]; [email protected]; nd <[email protected]>
Subject: Re: [PATCH] device-dax: use fallback nid when numa_node is
invalid

Hi Justin,



Note that this patch conflicts with:

https://lkml.kernel.org/r/[email protected]

But nothing fundamental. Determining a single NID is similar to how I'm
handling it for ACPI:

https://lkml.kernel.org/r/[email protected]


Okay, got it. Thanks for the reminder.
Seems my patch is not useful after your patch.


I think your patch still makes sense. With

https://lore.kernel.org/linux-acpi/20210723125210.29987-7-
[email protected]/

We'd have to detect the node id in the first loop instead.

Ok, I got your point. I will do that in v2.

Btw, sorry for commenting there about your patch 06 since I didn't
subscribe lkml via this mailbox.

Sure, you really should subscribe :)

> +  for (i = 0; i < dev_dax->nr_range; i++) {
+               struct range range;
+
+               rc = dax_kmem_range(dev_dax, i, &range);
+               if (rc) {
+                       dev_info(dev, "mapping%d: %#llx-%#llx too small after 
alignment\n",
+                                       i, range.start, range.end);
+                       continue;
+               }
+               total_len += range_len(&range);
+       }
You add an additional loop to get the total_len.
I wonder is it independent on 2nd loop?
If yes, why not merge the 2 loops into one?
Sorry if this question is too simple, I don't know too much
about the background of your patch.

We need total_len to register the memory group. We need the memory group to add memory. Therefore, we need a second loop to calculate total_len upfront.


--
Thanks,

David / dhildenb


Reply via email to