lkml.org 
[lkml]   [2024]   [May]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH v8 05/10] cxl/memscrub: Add CXL device patrol scrub control feature
shiju.jose@ wrote:
> From: Shiju Jose <shiju.jose@huawei.com>
>
> CXL spec 3.1 section 8.2.9.9.11.1 describes the device patrol scrub control
> feature. The device patrol scrub proactively locates and makes corrections
> to errors in regular cycle.
>
> Allow specifying the number of hours within which the patrol scrub must be
> completed, subject to minimum and maximum limits reported by the device.
> Also allow disabling scrub allowing trade-off error rates against
> performance.
>
> Register with scrub subsystem to provide scrub control attributes to the
> user.
>
> Co-developed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Signed-off-by: Shiju Jose <shiju.jose@huawei.com>
[..]
> diff --git a/drivers/cxl/mem.c b/drivers/cxl/mem.c
> index 0c79d9ce877c..399e43463626 100644
> --- a/drivers/cxl/mem.c
> +++ b/drivers/cxl/mem.c
> @@ -117,6 +117,12 @@ static int cxl_mem_probe(struct device *dev)
> if (!cxlds->media_ready)
> return -EBUSY;
>
> + rc = cxl_mem_patrol_scrub_init(cxlmd);
> + if (rc) {
> + dev_dbg(&cxlmd->dev, "CXL patrol scrub init failed\n");
> + return rc;
> + }

2 concerns:

* Why should cxl_mem_probe() fail just because this optional
scrub interface did not register?

* Why is this not located in cxl_region_probe()? If the ras2 scrub is an
HPA-based scrub I think CXL should do the work to interface with the scrub
interface at the same level. This also provides another in-kernel user
for all the DPA-to-HPA translation infrastructure that the CXL driver
contains. Pretty much the only reason the CXL driver needs to exist at
all is address translation, so at a minimum it seems a waste to inflict
more need to understand DPAs on userspace.

\
 
 \ /
  Last update: 2024-05-27 18:23    [W:0.282 / U:21.508 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site