From: Dan Williams <dan.j.williams@intel.com>
To: <alison.schofield@intel.com>, Vishal Verma <vishal.l.verma@intel.com>
Cc: Alison Schofield <alison.schofield@intel.com>,
<nvdimm@lists.linux.dev>, <linux-cxl@vger.kernel.org>
Subject: Re: [ndctl PATCH v5 4/5] cxl/list: add --poison option to cxl list
Date: Wed, 6 Dec 2023 20:23:10 -0800 [thread overview]
Message-ID: <657148ae35bce_b9912945d@dwillia2-mobl3.amr.corp.intel.com.notmuch> (raw)
In-Reply-To: <216ab396ab0c34fc391d1c3d3797a0d832a8d563.1700615159.git.alison.schofield@intel.com>
alison.schofield@ wrote:
> From: Alison Schofield <alison.schofield@intel.com>
>
> The --poison option to 'cxl list' retrieves poison lists from
> memory devices supporting the capability and displays the
> returned poison records in the cxl list json. This option can
> apply to memdevs or regions.
>
> Example usage in the Documentation/cxl/cxl-list.txt update.
>
> Signed-off-by: Alison Schofield <alison.schofield@intel.com>
> ---
> Documentation/cxl/cxl-list.txt | 58 ++++++++++++++++++++++++++++++++++
> cxl/filter.h | 3 ++
> cxl/list.c | 2 ++
> 3 files changed, 63 insertions(+)
>
> diff --git a/Documentation/cxl/cxl-list.txt b/Documentation/cxl/cxl-list.txt
> index 838de4086678..ee2f1b2d9fae 100644
> --- a/Documentation/cxl/cxl-list.txt
> +++ b/Documentation/cxl/cxl-list.txt
> @@ -415,6 +415,64 @@ OPTIONS
> --region::
> Specify CXL region device name(s), or device id(s), to filter the listing.
>
> +-L::
> +--poison::
> + Include poison information. The poison list is retrieved from the
> + device(s) and poison records are added to the listing. Apply this
> + option to memdevs and regions where devices support the poison
> + list capability.
While CXL calls it "poison" I am not convinced that's the term that end
users can universally use for this. This is why "ndctl list" uses -M,
but yeah, -M and -P are already taken. Even -E is taken for "errors".
> +
> +----
> +# cxl list -m mem11 --poison
> +[
> + {
> + "memdev":"mem11",
> + "pmem_size":268435456,
> + "ram_size":0,
> + "serial":0,
> + "host":"0000:37:00.0",
> + "poison":{
> + "nr_records":1,
> + "records":[
One cleanup I want to see before this goes live... drop nr_records and
just make "poison" an array object directly. The number of records is
trivially determined by the jq "len" operator.
Also, per above rename "poison" to "media_errors". I believe "poison" is
an x86'ism where "media_error" is a more generic term.
> + {
> + "dpa":0,
> + "dpa_length":64,
> + "source":"Internal",
> + }
> + ]
> + }
> + }
> +]
> +# cxl list -r region5 --poison
> +[
> + {
> + "region":"region5",
> + "resource":1035623989248,
> + "size":2147483648,
> + "interleave_ways":2,
> + "interleave_granularity":4096,
> + "decode_state":"commit",
> + "poison":{
> + "nr_records":2,
> + "records":[
> + {
> + "memdev":"mem2",
> + "dpa":0,
> + "dpa_length":64,
Does length need to be prefixed with "dpa_"?
> + "source":"Internal",
I am not sure what the end user can do with "source"? I have tended to
not emit things if I can't think of a use case for the field to be
there.
next prev parent reply other threads:[~2023-12-07 4:23 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-22 1:22 [ndctl PATCH v5 0/5] Support poison list retrieval alison.schofield
2023-11-22 1:22 ` [ndctl PATCH v5 1/5] libcxl: add interfaces for GET_POISON_LIST mailbox commands alison.schofield
2023-11-22 1:22 ` [ndctl PATCH v5 2/5] cxl: add an optional pid check to event parsing alison.schofield
2023-11-22 1:22 ` [ndctl PATCH v5 3/5] cxl/list: collect and parse the poison list records alison.schofield
2023-12-07 4:39 ` Dan Williams
2023-12-13 2:13 ` Alison Schofield
2023-11-22 1:22 ` [ndctl PATCH v5 4/5] cxl/list: add --poison option to cxl list alison.schofield
2023-12-07 4:23 ` Dan Williams [this message]
2023-12-13 0:34 ` Tsaur, Erwin
2023-12-13 2:02 ` Alison Schofield
2023-11-22 1:22 ` [ndctl PATCH v5 5/5] cxl/test: add cxl-poison.sh unit test alison.schofield
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=657148ae35bce_b9912945d@dwillia2-mobl3.amr.corp.intel.com.notmuch \
--to=dan.j.williams@intel.com \
--cc=alison.schofield@intel.com \
--cc=linux-cxl@vger.kernel.org \
--cc=nvdimm@lists.linux.dev \
--cc=vishal.l.verma@intel.com \
/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