From: Jonathan Cameron <jonathan.cameron@huawei.com>
To: Davidlohr Bueso <dave@stgolabs.net>
Cc: <dave.jiang@intel.com>, <alison.schofield@intel.com>,
<ira.weiny@intel.com>, <dan.j.williams@intel.com>,
<dongjoo.seo1@samsung.com>, <anisa.su@samsung.com>,
<linux-cxl@vger.kernel.org>, John Groves <John@Groves.net>,
John Groves <jgroves@micron.com>
Subject: Re: [RFC PATCH 0/1] cxl: Media Operations
Date: Wed, 25 Mar 2026 12:06:13 +0000 [thread overview]
Message-ID: <20260325120613.00007003@huawei.com> (raw)
In-Reply-To: <20260324180754.et4gwn6dobdplurt@offworld>
On Tue, 24 Mar 2026 11:07:54 -0700
Davidlohr Bueso <dave@stgolabs.net> wrote:
> On Tue, 24 Mar 2026, Jonathan Cameron wrote:
>
> >On Mon, 23 Mar 2026 13:40:12 -0700
> >Davidlohr Bueso <dave@stgolabs.net> wrote:
> >
> >> Hello,
> >>
> >> This implements support for Media Operation cmd. It is marked RFC because of these
> >> noteworthy points:
> >>
> >> (i) Sysfs interfaces. These changes implement 'security/zero' and multiplex
> >> 'security/sanitize' to allow dpa, len pairs for the range (no impact for
> >> current usage as whole-device). This breaks the 1 value per file "rule",
> >> and would be a first for drivers/cxl/*, so am I open to suggestions.
> >
> >Value is a vague sort of term. It's one thing (an range) so seems fine to me.
>
> I agree.
>
> >
> >>
> >> (ii) Background cmd handling semantics. Media operations are synchronous,
> >> which for raged zeroing operations makes sense and for range sanitize
> >
> >ranged
> >
> >> differs from the current async handling for whole-device, so user response
> >> differs significantly, something I am not crazy about. Another downside
> >> of this is that it exposes lock hold times to be user-controllable, but is
> >> no different than what we do for fw. Fundamentally, users have the
> >> responsibility to break up the work into sane ranges.
> >
> >We could apply a limit on this and make that discoverable via another sysfs attribute.
> >So let userspace request in say 1Gig chunks. Would have to check that the device
> >supports that granularity though.
>
> If we agree that this will be performed synchronously, then yes, adding a size cap
> would be necessary. I don't love having it in ie: security/range_limit(?), but that
> could be created at discovery time when we know the granularity. Another way would
> be to avoid the extra file and just print the limit in the error message - but I
> guess dev_dbg() would be needed to not spam the dmesg. In any case with a cap,
> while no guarantees, this also reduces the chances of the user triggering driver timeouts.
>
> >I don't think there is anything in the spec today to let us query how long
> >something takes (which would be a better way to bound this).
>
> Correct, that is just something Scan Media allows for - and yes, that's exactly
> the sane way to do the work breakup.
>
Yo John,
I'm sure you are keeping a list of potential improvements for the appropriate group
that I believe you have some leadership role in ;)
I'd like devices to provide info to allow us to establish an upper bound on how
long a zero / sanitize media operation would take. This one doesn't need to be
code first so we can consider this a potential feature request.
Jonathan
> Thanks,
> Davidlohr
next prev parent reply other threads:[~2026-03-25 12:06 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-23 20:40 [RFC PATCH 0/1] cxl: Media Operations Davidlohr Bueso
2026-03-23 20:40 ` [PATCH 1/1] cxl/mbox: Support Media Operation Davidlohr Bueso
2026-03-24 16:18 ` Jonathan Cameron
2026-03-24 18:40 ` Davidlohr Bueso
2026-03-25 13:47 ` kernel test robot
2026-03-25 15:55 ` kernel test robot
2026-03-24 15:32 ` [RFC PATCH 0/1] cxl: Media Operations Jonathan Cameron
2026-03-24 18:07 ` Davidlohr Bueso
2026-03-25 12:06 ` Jonathan Cameron [this message]
2026-03-27 15:17 ` John Groves
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260325120613.00007003@huawei.com \
--to=jonathan.cameron@huawei.com \
--cc=John@Groves.net \
--cc=alison.schofield@intel.com \
--cc=anisa.su@samsung.com \
--cc=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--cc=dave@stgolabs.net \
--cc=dongjoo.seo1@samsung.com \
--cc=ira.weiny@intel.com \
--cc=jgroves@micron.com \
--cc=linux-cxl@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox