From: John Groves <John@groves.net>
To: Jonathan Cameron <jonathan.cameron@huawei.com>
Cc: Davidlohr Bueso <dave@stgolabs.net>,
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 <jgroves@micron.com>
Subject: Re: [RFC PATCH 0/1] cxl: Media Operations
Date: Fri, 27 Mar 2026 10:17:01 -0500 [thread overview]
Message-ID: <acaes_gqFt-LLFrC@groves.net> (raw)
In-Reply-To: <20260325120613.00007003@huawei.com>
On 26/03/25 12:06PM, Jonathan Cameron wrote:
> 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
>
Acknowledged. Are you thinking of a one-off for sanitize, or is there
a class of commands that might ought to provide such an upper-bound?
I'd be happy to try to push something through, but the solution ought
to come from somebody who experiences the inconvenience directtly :D
Regards,
John
prev parent reply other threads:[~2026-03-27 15:17 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
2026-03-27 15:17 ` John Groves [this message]
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=acaes_gqFt-LLFrC@groves.net \
--to=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=jonathan.cameron@huawei.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