[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240815161749.hb2zzwam5rieswws@offworld>
Date: Thu, 15 Aug 2024 09:17:49 -0700
From: Davidlohr Bueso <dave@...olabs.net>
To: Ira Weiny <ira.weiny@...el.com>
Cc: Jonathan Cameron <jonathan.cameron@...wei.com>,
Dave Jiang <dave.jiang@...el.com>,
Alison Schofield <alison.schofield@...el.com>,
Vishal Verma <vishal.l.verma@...el.com>,
Dan Williams <dan.j.williams@...el.com>, linux-cxl@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] cxl/region: Remove lock from memory notifier callback
On Wed, 14 Aug 2024, Ira Weiny wrote:
>In testing Dynamic Capacity Device (DCD) support, a lockdep splat
>revealed an ABBA issue between the memory notifiers and the DCD extent
>processing code.[0] Changing the lock ordering within DCD proved
>difficult because regions must be stable while searching for the proper
>region and then the device lock must be held to properly notify the DAX
>region driver of memory changes.
>
>Dan points out in the thread that notifiers should be able to trust that
>it is safe to access static data. Region data is static once the device
>is realized and until it's destruction. Thus it is better to manage the
>notifiers within the region driver.
>
>Remove the need for a lock by ensuring the notifiers are active only
>during the region's lifetime.
Agreed, this is better.
>Furthermore, remove cxl_region_nid() because resource can't be NULL
>while the region is stable.
Reviewed-by: Davidlohr Bueso <dave@...olabs.net>
Powered by blists - more mailing lists