From: alison.schofield@intel.com
To: Vishal Verma <vishal.l.verma@intel.com>
Cc: Alison Schofield <alison.schofield@intel.com>,
nvdimm@lists.linux.dev, linux-cxl@vger.kernel.org
Subject: [ndctl PATCH v11 0/7] Support poison list retrieval
Date: Wed, 13 Mar 2024 21:05:16 -0700 [thread overview]
Message-ID: <cover.1710386468.git.alison.schofield@intel.com> (raw)
From: Alison Schofield <alison.schofield@intel.com>
Changes since v10:
- Use offset, length notation in json output (Dan)
- Remove endpoint decoder from json output
- Man page updates to reflect above changes
- Remove open coded tep_find_field() (Dan)
- Use raw instead of custom string helper
- Use get_field_val() in u8,32,64 helpers instead of _raw (Dan)
- Pass event_ctx to its own parsing method as a typical 'this' pointer (Dan)
- Replace private_ctx w poison_ctx in event_ctx. This addresses Dan's
feedback to avoid a void* but stops short of his suggestion to wrap
event_ctx in a private_ctx for this single use case.
- v10: https://lore.kernel.org/linux-cxl/cover.1709748564.git.alison.schofield@intel.com/
Begin cover letter:
Add the option to add a memory devices poison list to the cxl-list
json output. Offer the option by memdev and by region.
From the man page cxl-list:
-L, --media-errors
Include media-error information. The poison list is retrieved from
the device(s) and media_error records are added to the listing.
Apply this option to memdevs and regions where devices support the
poison list capability. "offset:" is relative to the region
resource when listing by region and is the absolute device DPA when
listing by memdev. "source:" is one of: External, Internal,
Injected, Vendor Specific, or Unknown, as defined in CXL
Specification v3.1 Table 8-140.
# cxl list -m mem9 --media-errors -u
{
"memdev":"mem9",
"pmem_size":"1024.00 MiB (1073.74 MB)",
"pmem_qos_class":42,
"ram_size":"1024.00 MiB (1073.74 MB)",
"ram_qos_class":42,
"serial":"0x5",
"numa_node":1,
"host":"cxl_mem.5",
"media_errors":[
{
"offset":"0x40000000",
"length":64,
"source":"Injected"
}
]
}
In the above example, region mappings can be found using: "cxl list -p
mem9 --decoders"
# cxl list -r region5 --media-errors -u
{
"region":"region5",
"resource":"0xf110000000",
"size":"2.00 GiB (2.15 GB)",
"type":"pmem",
"interleave_ways":2,
"interleave_granularity":4096,
"decode_state":"commit",
"media_errors":[
{
"offset":"0x1000",
"length":64,
"source":"Injected"
},
{
"offset":"0x2000",
"length":64,
"source":"Injected"
}
]
}
In the above example, memdev mappings can be found using: "cxl list -r
region5 --targets" and "cxl list -d <decoder_name>"
Alison Schofield (7):
libcxl: add interfaces for GET_POISON_LIST mailbox commands
cxl/event_trace: add an optional pid check to event parsing
cxl/event_trace: support poison context in event parsing
cxl/event_trace: add helpers to retrieve tep fields by type
cxl/list: collect and parse media_error records
cxl/list: add --media-errors option to cxl list
cxl/test: add cxl-poison.sh unit test
Documentation/cxl/cxl-list.txt | 62 ++++++++++-
cxl/event_trace.c | 51 ++++++++-
cxl/event_trace.h | 19 +++-
cxl/filter.h | 3 +
cxl/json.c | 194 +++++++++++++++++++++++++++++++++
cxl/lib/libcxl.c | 47 ++++++++
cxl/lib/libcxl.sym | 2 +
cxl/libcxl.h | 2 +
cxl/list.c | 3 +
test/cxl-poison.sh | 137 +++++++++++++++++++++++
test/meson.build | 2 +
11 files changed, 514 insertions(+), 8 deletions(-)
create mode 100644 test/cxl-poison.sh
base-commit: e0d0680bd3e554bd5f211e989480c5a13a023b2d
--
2.37.3
next reply other threads:[~2024-03-14 4:05 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-14 4:05 alison.schofield [this message]
2024-03-14 4:05 ` [ndctl PATCH v11 1/7] libcxl: add interfaces for GET_POISON_LIST mailbox commands alison.schofield
2024-03-18 17:51 ` fan
2024-03-18 20:11 ` Alison Schofield
2024-03-18 21:01 ` Dan Williams
2024-03-19 16:43 ` Alison Schofield
2024-03-14 4:05 ` [ndctl PATCH v11 2/7] cxl/event_trace: add an optional pid check to event parsing alison.schofield
2024-03-14 4:05 ` [ndctl PATCH v11 3/7] cxl/event_trace: support poison context in " alison.schofield
2024-03-14 4:05 ` [ndctl PATCH v11 4/7] cxl/event_trace: add helpers to retrieve tep fields by type alison.schofield
2024-03-15 15:44 ` Dave Jiang
2024-03-15 17:39 ` Dan Williams
2024-03-18 17:28 ` Alison Schofield
2024-03-18 21:21 ` fan
2024-03-14 4:05 ` [ndctl PATCH v11 5/7] cxl/list: collect and parse media_error records alison.schofield
2024-03-15 16:16 ` Dave Jiang
2024-03-20 20:24 ` Alison Schofield
2024-03-14 4:05 ` [ndctl PATCH v11 6/7] cxl/list: add --media-errors option to cxl list alison.schofield
2024-03-15 16:41 ` Dave Jiang
2024-03-14 4:05 ` [ndctl PATCH v11 7/7] cxl/test: add cxl-poison.sh unit test alison.schofield
2024-03-15 17:03 ` Dave Jiang
[not found] ` <CGME20240314040548epcas2p3698bf9d1463a1d2255dc95ac506d3ae8@epcms2p4>
2024-03-15 1:09 ` [ndctl PATCH v11 6/7] cxl/list: add --media-errors option to cxl list Wonjae Lee
2024-03-15 2:36 ` Alison Schofield
2024-03-15 3:35 ` Dan Williams
2024-03-20 20:40 ` Alison Schofield
2024-03-27 19:48 ` Alison Schofield
2024-04-18 20:12 ` Alison Schofield
[not found] ` <CGME20240314040551epcas2p40829b16b09f439519a692070fb460242@epcms2p1>
2024-03-15 23:03 ` [ndctl PATCH v11 7/7] cxl/test: add cxl-poison.sh unit test Wonjae Lee
2024-03-18 17:17 ` Alison Schofield
2024-03-20 20:42 ` [ndctl PATCH v11 0/7] Support poison list retrieval 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=cover.1710386468.git.alison.schofield@intel.com \
--to=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.