[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AM6PR08MB43766A114DA6AE971697CA1CF7EB9@AM6PR08MB4376.eurprd08.prod.outlook.com>
Date: Thu, 29 Jul 2021 14:44:10 +0000
From: Justin He <Justin.He@....com>
To: David Hildenbrand <david@...hat.com>,
Dan Williams <dan.j.williams@...el.com>,
Vishal Verma <vishal.l.verma@...el.com>,
Dave Jiang <dave.jiang@...el.com>
CC: "nvdimm@...ts.linux.dev" <nvdimm@...ts.linux.dev>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
nd <nd@....com>
Subject: RE: [PATCH] device-dax: use fallback nid when numa_node is invalid
Hi David
> -----Original Message-----
> From: David Hildenbrand <david@...hat.com>
> Sent: Thursday, July 29, 2021 3:59 PM
> To: Justin He <Justin.He@....com>; Dan Williams <dan.j.williams@...el.com>;
> Vishal Verma <vishal.l.verma@...el.com>; Dave Jiang <dave.jiang@...el.com>
> Cc: nvdimm@...ts.linux.dev; linux-kernel@...r.kernel.org; nd <nd@....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@...hat.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)
Powered by blists - more mailing lists