[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250610161338.lft3ekqnk4u6dxls@offworld>
Date: Tue, 10 Jun 2025 09:13:38 -0700
From: Davidlohr Bueso <dave@...olabs.net>
To: Li Ming <ming.li@...omail.com>
Cc: jonathan.cameron@...wei.com, dave.jiang@...el.com,
alison.schofield@...el.com, vishal.l.verma@...el.com,
ira.weiny@...el.com, dan.j.williams@...el.com,
shiju.jose@...wei.com, linux-cxl@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1 1/2] cxl/edac: Fix the min_scrub_cycle of a region
miscalculation
On Tue, 03 Jun 2025, Li Ming wrote:
>When trying to update the scrub_cycle value of a cxl region, which means
>updating the scrub_cycle value of each memdev under a cxl region. cxl
>driver needs to guarantee the new scrub_cycle value is greater than the
>min_scrub_cycle value of a memdev, otherwise the updating operation will
>fail(Per Table 8-223 in CXL r3.2 section 8.2.10.9.11.1).
>
>Current implementation logic of getting the min_scrub_cycle value of a
>cxl region is that getting the min_scrub_cycle value of each memdevs
>under the cxl region, then using the minimum min_scrub_cycle value as
>the region's min_scrub_cycle. Checking if the new scrub_cycle value is
>greater than this value. If yes, updating the new scrub_cycle value to
>each memdevs. The issue is that the new scrub_cycle value is possibly
>greater than the minimum min_scrub_cycle value of all memdevs but less
>than the maximum min_scrub_cycle value of all memdevs if memdevs have
>a different min_scrub_cycle value. The updating operation will always
>fail on these memdevs which have a greater min_scrub_cycle than the new
>scrub_cycle.
>
>The correct implementation logic is to get the maximum value of these
>memdevs' min_scrub_cycle, check if the new scrub_cycle value is greater
>than the value. If yes, the new scrub_cycle value is fit for the region.
>
>The change also impacts the result of
>cxl_patrol_scrub_get_min_scrub_cycle(), the interface returned the
>minimum min_scrub_cycle value among all memdevs under the region before
>the change. The interface will return the maximum min_scrub_cycle value
>among all memdevs under the region with the change.
>
>Signed-off-by: Li Ming <ming.li@...omail.com>
Reviewed-by: Davidlohr Bueso <dave@...olabs.net>
Powered by blists - more mailing lists