Messages in this thread | | | From | Justin He <> | Subject | RE: [PATCH] device-dax: use fallback nid when numa_node is invalid | Date | Thu, 29 Jul 2021 14:44:10 +0000 |
| |
Hi David
> -----Original Message----- > From: David Hildenbrand <david@redhat.com> > Sent: Thursday, July 29, 2021 3:59 PM > To: Justin He <Justin.He@arm.com>; Dan Williams <dan.j.williams@intel.com>; > Vishal Verma <vishal.l.verma@intel.com>; Dave Jiang <dave.jiang@intel.com> > Cc: nvdimm@lists.linux.dev; linux-kernel@vger.kernel.org; nd <nd@arm.com> > 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/20210723125210.29987-7-david@redhat.com > >> > >> But nothing fundamental. Determining a single NID is similar to how I'm > >> handling it for ACPI: > >> > >> https://lkml.kernel.org/r/20210723125210.29987-6-david@redhat.com > >> > > > > 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- > david@redhat.com/ > > 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.
+ 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.
-- Cheers, Justin (Jia He)
| |