Re: [PATCH v3 25/25] tools/testing/cxl: Add DC Regions to mock mem data

2024-09-09 Thread Ira Weiny
Jonathan Cameron wrote: > On Fri, 16 Aug 2024 09:44:33 -0500 > Ira Weiny wrote: > > > cxl_test provides a good way to ensure quick smoke and regression > > testing. The complexity of Dynamic Capacity (DC) extent processing as > > well as the complexity of the new sparse DAX regions can mostly be

Re: [PATCH v3 24/25] tools/testing/cxl: Make event logs dynamic

2024-09-09 Thread Ira Weiny
Jonathan Cameron wrote: > On Fri, 16 Aug 2024 09:44:32 -0500 > Ira Weiny wrote: > > > The test event logs were created as static arrays as an easy way to mock > > events. Dynamic Capacity Device (DCD) test support requires events be > > generated dynamically when extents are created or destroyed

Re: [PATCH v3 04/25] cxl/pci: Delay event buffer allocation

2024-09-05 Thread Fan Ni
On Fri, Aug 16, 2024 at 09:44:12AM -0500, Ira Weiny wrote: > The event buffer does not need to be allocated if something has failed in > setting up event irq's. > > In prep for adjusting event configuration for DCD events move the buffer > allocation to the end of the event configuration. > > Rev

Re: [PATCH v3 23/25] cxl/mem: Trace Dynamic capacity Event Record

2024-09-05 Thread Fan Ni
On Fri, Aug 16, 2024 at 09:44:31AM -0500, ira.we...@intel.com wrote: > From: Navneet Singh > > CXL rev 3.1 section 8.2.9.2.1 adds the Dynamic Capacity Event Records. > User space can use trace events for debugging of DC capacity changes. > > Add DC trace points to the trace log. > > Signed-off-

Re: [PATCH v3 22/25] cxl/region: Read existing extents on region creation

2024-09-05 Thread Fan Ni
On Fri, Aug 16, 2024 at 09:44:30AM -0500, ira.we...@intel.com wrote: > From: Navneet Singh > > Dynamic capacity device extents may be left in an accepted state on a > device due to an unexpected host crash. In this case it is expected > that the creation of a new region on top of a DC partition

Re: [PATCH v3 18/25] cxl/extent: Process DCD events and realize region extents

2024-09-05 Thread Fan Ni
On Fri, Aug 16, 2024 at 09:44:26AM -0500, ira.we...@intel.com wrote: > From: Navneet Singh > > A dynamic capacity device (DCD) sends events to signal the host for > changes in the availability of Dynamic Capacity (DC) memory. These > events contain extents describing a DPA range and meta data fo

Re: [PATCH v3 17/25] cxl/core: Return endpoint decoder information from region search

2024-09-03 Thread Li, Ming4
On 8/16/2024 10:44 PM, Ira Weiny wrote: > cxl_dpa_to_region() finds the region from a tuple. > The search involves finding the device endpoint decoder as well. > > Dynamic capacity extent processing uses the endpoint decoder HPA > information to calculate the HPA offset. In addition, well behaved

Re: [PATCH v3 16/25] cxl/mem: Configure dynamic capacity interrupts

2024-09-03 Thread Li, Ming4
On 8/16/2024 10:44 PM, ira.we...@intel.com wrote: > From: Navneet Singh > > Dynamic Capacity Devices (DCD) support extent change notifications > through the event log mechanism. The interrupt mailbox commands were > extended in CXL 3.1 to support these notifications. Firmware can't > configure D

Re: [PATCH v3 15/25] cxl/pci: Factor out interrupt policy check

2024-09-03 Thread Li, Ming4
On 8/16/2024 10:44 PM, Ira Weiny wrote: > Dynamic Capacity Devices (DCD) require event interrupts to process > memory addition or removal. BIOS may have control over non-DCD event > processing. DCD interrupt configuration needs to be separate from > memory event interrupt configuration. > > Facto

Re: [PATCH v3 14/25] cxl/events: Split event msgnum configuration from irq setup

2024-09-03 Thread Li, Ming4
On 8/16/2024 10:44 PM, Ira Weiny wrote: > Dynamic Capacity Devices (DCD) require event interrupts to process > memory addition or removal. BIOS may have control over non-DCD event > processing. DCD interrupt configuration needs to be separate from > memory event interrupt configuration. > > Split

Re: [PATCH v3 12/25] cxl/region: Refactor common create region code

2024-09-03 Thread Li, Ming4
On 8/16/2024 10:44 PM, Ira Weiny wrote: > create_pmem_region_store() and create_ram_region_store() are identical > with the exception of the region mode. With the addition of DC region > mode this would end up being 3 copies of the same code. > > Refactor create_pmem_region_store() and create_ram_

Re: [PATCH v3 08/25] cxl/region: Add dynamic capacity decoder and region modes

2024-09-03 Thread Li, Ming4
On 8/16/2024 10:44 PM, ira.we...@intel.com wrote: > From: Navneet Singh > > One or more decoders each pointing to a Dynamic Capacity (DC) partition > form a CXL software region. The region mode reflects composition of > that entire software region. Decoder mode reflects a specific DC > partition

Re: [PATCH v3 07/25] cxl/core: Separate region mode from decoder mode

2024-09-02 Thread Li, Ming4
On 8/16/2024 10:44 PM, ira.we...@intel.com wrote: > From: Navneet Singh > > Until now region modes and decoder modes were equivalent in that both > modes were either PMEM or RAM. The addition of Dynamic > Capacity partitions defines up to 8 DC partitions per device. > > The region mode is thus no

Re: [PATCH v3 05/25] cxl/mbox: Flag support for Dynamic Capacity Devices (DCD)

2024-09-02 Thread Li, Ming4
On 8/16/2024 10:44 PM, ira.we...@intel.com wrote: > From: Navneet Singh > > Per the CXL 3.1 specification software must check the Command Effects > Log (CEL) for dynamic capacity command support. > > Detect support for the DCD commands while reading the CEL, including: > > Get DC Config >

Re: [PATCH v3 04/25] cxl/pci: Delay event buffer allocation

2024-09-02 Thread Li, Ming4
On 8/16/2024 10:44 PM, Ira Weiny wrote: > The event buffer does not need to be allocated if something has failed in > setting up event irq's. > > In prep for adjusting event configuration for DCD events move the buffer > allocation to the end of the event configuration. > > Reviewed-by: Davidlohr B

Re: [PATCH v3 18/25] cxl/extent: Process DCD events and realize region extents

2024-09-02 Thread Li, Ming4
On 8/16/2024 10:44 PM, ira.we...@intel.com wrote: > From: Navneet Singh > > A dynamic capacity device (DCD) sends events to signal the host for > changes in the availability of Dynamic Capacity (DC) memory. These > events contain extents describing a DPA range and meta data for memory > to be add

Re: [PATCH v3 13/25] cxl/region: Add sparse DAX region support

2024-09-02 Thread Li, Ming4
On 8/16/2024 10:44 PM, ira.we...@intel.com wrote: > From: Navneet Singh > > Dynamic Capacity CXL regions must allow memory to be added or removed > dynamically. In addition to the quantity of memory available the > location of the memory within a DC partition is dynamic based on the > extents off

Re: [PATCH v3 18/25] cxl/extent: Process DCD events and realize region extents

2024-08-30 Thread Jonathan Cameron
> > > +int cxl_rm_extent(struct cxl_memdev_state *mds, struct cxl_extent > > > *extent) > > > +{ > > > + u64 start_dpa = le64_to_cpu(extent->start_dpa); > > > + struct cxl_memdev *cxlmd = mds->cxlds.cxlmd; > > > + struct cxl_endpoint_decoder *cxled; > > > + struct range hpa_range, dpa_range; > > >

Re: [PATCH v3 21/25] dax/region: Create resources on sparse DAX regions

2024-08-29 Thread Ira Weiny
Jonathan Cameron wrote: > On Fri, 16 Aug 2024 09:44:29 -0500 > ira.we...@intel.com wrote: > > > From: Navneet Singh > > [snip] > > diff --git a/drivers/cxl/core/extent.c b/drivers/cxl/core/extent.c > > index d7d526a51e2b..103b0bec3a4a 100644 > > --- a/drivers/cxl/core/extent.c > > +++ b/driver

Re: [PATCH v3 20/25] dax/bus: Factor out dev dax resize logic

2024-08-29 Thread Ira Weiny
Jonathan Cameron wrote: > On Fri, 16 Aug 2024 09:44:28 -0500 > Ira Weiny wrote: > > > Dynamic Capacity regions must limit dev dax resources to those areas > > which have extents backing real memory. Such DAX regions are dubbed > > 'sparse' regions. In order to manage where memory is available f

Re: [PATCH v3 18/25] cxl/extent: Process DCD events and realize region extents

2024-08-29 Thread Ira Weiny
Jonathan Cameron wrote: > On Fri, 16 Aug 2024 09:44:26 -0500 > ira.we...@intel.com wrote: > > > From: Navneet Singh > > [snip] > > +static int match_contains(struct device *dev, void *data) > > +{ > > + struct region_extent *region_extent = to_region_extent(dev); > > + struct match_data *m

Re: [PATCH v3 19/25] cxl/region/extent: Expose region extent information in sysfs

2024-08-28 Thread Fan Ni
On Fri, Aug 16, 2024 at 09:44:27AM -0500, ira.we...@intel.com wrote: > From: Navneet Singh > > Extent information can be helpful to the user to coordinate memory usage > with the external orchestrator and FM. > > Expose the details of region extents by creating the following > sysfs entries. >

Re: [PATCH v3 02/25] printk: Add print format (%par) for struct range

2024-08-28 Thread Andy Shevchenko
On Tue, Aug 27, 2024 at 11:12:47PM -0500, Ira Weiny wrote: > Andy Shevchenko wrote: > > On Mon, Aug 26, 2024 at 04:17:52PM -0500, Ira Weiny wrote: > > > Andy Shevchenko wrote: > > > > On Mon, Aug 26, 2024 at 03:23:50PM +0200, Petr Mladek wrote: > > > > > On Thu 2024-08-22 21:10:25, Andy Shevchenko

Re: [PATCH v3 02/25] printk: Add print format (%par) for struct range

2024-08-27 Thread Ira Weiny
Andy Shevchenko wrote: > On Mon, Aug 26, 2024 at 04:17:52PM -0500, Ira Weiny wrote: > > Andy Shevchenko wrote: > > > On Mon, Aug 26, 2024 at 03:23:50PM +0200, Petr Mladek wrote: > > > > On Thu 2024-08-22 21:10:25, Andy Shevchenko wrote: > > > > > On Thu, Aug 22, 2024 at 12:53:32PM -0500, Ira Weiny

Re: [PATCH v3 02/25] printk: Add print format (%par) for struct range

2024-08-27 Thread Ira Weiny
Petr Mladek wrote: > On Mon 2024-08-26 16:17:52, Ira Weiny wrote: > > Andy Shevchenko wrote: > > > On Mon, Aug 26, 2024 at 03:23:50PM +0200, Petr Mladek wrote: > > > > On Thu 2024-08-22 21:10:25, Andy Shevchenko wrote: > > > > > On Thu, Aug 22, 2024 at 12:53:32PM -0500, Ira Weiny wrote: > > > > > >

Re: [PATCH v3 18/25] cxl/extent: Process DCD events and realize region extents

2024-08-27 Thread Fan Ni
On Tue, Aug 27, 2024 at 01:08:29PM +0100, Jonathan Cameron wrote: > On Fri, 23 Aug 2024 14:32:32 -0700 > Fan Ni wrote: > > > On Fri, Aug 16, 2024 at 09:44:26AM -0500, ira.we...@intel.com wrote: > > > From: Navneet Singh > > > > > > A dynamic capacity device (DCD) sends events to signal the host

Re: [PATCH v3 25/25] tools/testing/cxl: Add DC Regions to mock mem data

2024-08-27 Thread Jonathan Cameron
On Fri, 16 Aug 2024 09:44:33 -0500 Ira Weiny wrote: > cxl_test provides a good way to ensure quick smoke and regression > testing. The complexity of Dynamic Capacity (DC) extent processing as > well as the complexity of the new sparse DAX regions can mostly be > tested through cxl_test. This in

Re: [PATCH v3 24/25] tools/testing/cxl: Make event logs dynamic

2024-08-27 Thread Jonathan Cameron
On Fri, 16 Aug 2024 09:44:32 -0500 Ira Weiny wrote: > The test event logs were created as static arrays as an easy way to mock > events. Dynamic Capacity Device (DCD) test support requires events be > generated dynamically when extents are created or destroyed. > > Modify the event log storage

Re: [PATCH v3 23/25] cxl/mem: Trace Dynamic capacity Event Record

2024-08-27 Thread Jonathan Cameron
On Fri, 16 Aug 2024 09:44:31 -0500 ira.we...@intel.com wrote: > From: Navneet Singh > > CXL rev 3.1 section 8.2.9.2.1 adds the Dynamic Capacity Event Records. > User space can use trace events for debugging of DC capacity changes. > > Add DC trace points to the trace log. > > Signed-off-by: Na

Re: [PATCH v3 22/25] cxl/region: Read existing extents on region creation

2024-08-27 Thread Jonathan Cameron
On Fri, 16 Aug 2024 09:44:30 -0500 ira.we...@intel.com wrote: > From: Navneet Singh > > Dynamic capacity device extents may be left in an accepted state on a > device due to an unexpected host crash. In this case it is expected > that the creation of a new region on top of a DC partition can re

Re: [PATCH v3 21/25] dax/region: Create resources on sparse DAX regions

2024-08-27 Thread Jonathan Cameron
On Fri, 16 Aug 2024 09:44:29 -0500 ira.we...@intel.com wrote: > From: Navneet Singh > > DAX regions which map dynamic capacity partitions require that memory be > allowed to come and go. Recall sparse regions were created for this > purpose. Now that extents can be realized within DAX regions

Re: [PATCH v3 20/25] dax/bus: Factor out dev dax resize logic

2024-08-27 Thread Jonathan Cameron
On Fri, 16 Aug 2024 09:44:28 -0500 Ira Weiny wrote: > Dynamic Capacity regions must limit dev dax resources to those areas > which have extents backing real memory. Such DAX regions are dubbed > 'sparse' regions. In order to manage where memory is available four > alternatives were considered:

Re: [PATCH v3 02/25] printk: Add print format (%par) for struct range

2024-08-27 Thread Andy Shevchenko
On Tue, Aug 27, 2024 at 09:43:32AM +0200, Petr Mladek wrote: > On Mon 2024-08-26 16:17:52, Ira Weiny wrote: > > Andy Shevchenko wrote: ... > But I could live with all other variants, except for %pn mentioned below. I believe %r is also no go as we most likely get a complier warning. ... > > Am

Re: [PATCH v3 18/25] cxl/extent: Process DCD events and realize region extents

2024-08-27 Thread Jonathan Cameron
On Fri, 16 Aug 2024 09:44:26 -0500 ira.we...@intel.com wrote: > From: Navneet Singh > > A dynamic capacity device (DCD) sends events to signal the host for > changes in the availability of Dynamic Capacity (DC) memory. These > events contain extents describing a DPA range and meta data for memo

Re: [PATCH v3 02/25] printk: Add print format (%par) for struct range

2024-08-27 Thread Andy Shevchenko
On Mon, Aug 26, 2024 at 04:17:52PM -0500, Ira Weiny wrote: > Andy Shevchenko wrote: > > On Mon, Aug 26, 2024 at 03:23:50PM +0200, Petr Mladek wrote: > > > On Thu 2024-08-22 21:10:25, Andy Shevchenko wrote: > > > > On Thu, Aug 22, 2024 at 12:53:32PM -0500, Ira Weiny wrote: > > > > > Petr Mladek wrot

Re: [PATCH v3 18/25] cxl/extent: Process DCD events and realize region extents

2024-08-27 Thread Jonathan Cameron
On Fri, 23 Aug 2024 14:32:32 -0700 Fan Ni wrote: > On Fri, Aug 16, 2024 at 09:44:26AM -0500, ira.we...@intel.com wrote: > > From: Navneet Singh > > > > A dynamic capacity device (DCD) sends events to signal the host for > > changes in the availability of Dynamic Capacity (DC) memory. These > >

Re: [PATCH v3 02/25] printk: Add print format (%par) for struct range

2024-08-27 Thread Petr Mladek
On Mon 2024-08-26 16:17:52, Ira Weiny wrote: > Andy Shevchenko wrote: > > On Mon, Aug 26, 2024 at 03:23:50PM +0200, Petr Mladek wrote: > > > On Thu 2024-08-22 21:10:25, Andy Shevchenko wrote: > > > > On Thu, Aug 22, 2024 at 12:53:32PM -0500, Ira Weiny wrote: > > > > > Petr Mladek wrote: > > > > > >

Re: [PATCH v3 02/25] printk: Add print format (%par) for struct range

2024-08-26 Thread Ira Weiny
Andy Shevchenko wrote: > On Mon, Aug 26, 2024 at 03:23:50PM +0200, Petr Mladek wrote: > > On Thu 2024-08-22 21:10:25, Andy Shevchenko wrote: > > > On Thu, Aug 22, 2024 at 12:53:32PM -0500, Ira Weiny wrote: > > > > Petr Mladek wrote: > > > > > On Fri 2024-08-16 09:44:10, Ira Weiny wrote: > > ... >

Re: [PATCH v3 23/25] cxl/mem: Trace Dynamic capacity Event Record

2024-08-26 Thread Ira Weiny
Dave Jiang wrote: > > > On 8/16/24 7:44 AM, ira.we...@intel.com wrote: > > From: Navneet Singh > > > > CXL rev 3.1 section 8.2.9.2.1 adds the Dynamic Capacity Event Records. > > User space can use trace events for debugging of DC capacity changes. > > > > Add DC trace points to the trace log.

Re: [PATCH v3 02/25] printk: Add print format (%par) for struct range

2024-08-26 Thread Andy Shevchenko
On Mon, Aug 26, 2024 at 03:23:50PM +0200, Petr Mladek wrote: > On Thu 2024-08-22 21:10:25, Andy Shevchenko wrote: > > On Thu, Aug 22, 2024 at 12:53:32PM -0500, Ira Weiny wrote: > > > Petr Mladek wrote: > > > > On Fri 2024-08-16 09:44:10, Ira Weiny wrote: ... > > > > > + %par[range 0x6

Re: [PATCH v3 02/25] printk: Add print format (%par) for struct range

2024-08-26 Thread Andy Shevchenko
On Mon, Aug 26, 2024 at 03:17:26PM +0200, Petr Mladek wrote: > On Thu 2024-08-22 12:53:32, Ira Weiny wrote: > > Petr Mladek wrote: > > > On Fri 2024-08-16 09:44:10, Ira Weiny wrote: [...] > > > > + static const struct printf_spec range_spec = { > > > > + .base = 16, > > > > +

Re: [PATCH v3 02/25] printk: Add print format (%par) for struct range

2024-08-26 Thread Petr Mladek
On Thu 2024-08-22 21:10:25, Andy Shevchenko wrote: > On Thu, Aug 22, 2024 at 12:53:32PM -0500, Ira Weiny wrote: > > Petr Mladek wrote: > > > On Fri 2024-08-16 09:44:10, Ira Weiny wrote: > > ... > > > > > + %par[range 0x6000-0x6fff] or > > > > > > It seems that it is always 64-b

Re: [PATCH v3 02/25] printk: Add print format (%par) for struct range

2024-08-26 Thread Petr Mladek
On Thu 2024-08-22 12:53:32, Ira Weiny wrote: > Petr Mladek wrote: > > On Fri 2024-08-16 09:44:10, Ira Weiny wrote: > > > The use of struct range in the CXL subsystem is growing. In particular, > > > the addition of Dynamic Capacity devices uses struct range in a number > > > of places which are re

Re: [PATCH v3 18/25] cxl/extent: Process DCD events and realize region extents

2024-08-23 Thread Fan Ni
On Fri, Aug 16, 2024 at 09:44:26AM -0500, ira.we...@intel.com wrote: > From: Navneet Singh > > A dynamic capacity device (DCD) sends events to signal the host for > changes in the availability of Dynamic Capacity (DC) memory. These > events contain extents describing a DPA range and meta data fo

Re: [PATCH v3 22/25] cxl/region: Read existing extents on region creation

2024-08-23 Thread Ira Weiny
Dave Jiang wrote: > > > On 8/16/24 7:44 AM, ira.we...@intel.com wrote: > > From: Navneet Singh > > > > Dynamic capacity device extents may be left in an accepted state on a > > device due to an unexpected host crash. In this case it is expected > > that the creation of a new region on top of a

Re: [PATCH v3 19/25] cxl/region/extent: Expose region extent information in sysfs

2024-08-23 Thread Jonathan Cameron
On Fri, 16 Aug 2024 09:44:27 -0500 ira.we...@intel.com wrote: > From: Navneet Singh > > Extent information can be helpful to the user to coordinate memory usage > with the external orchestrator and FM. > > Expose the details of region extents by creating the following > sysfs entries. > >

Re: [PATCH v3 19/25] cxl/region/extent: Expose region extent information in sysfs

2024-08-23 Thread Jonathan Cameron
On Thu, 22 Aug 2024 21:58:02 -0500 Ira Weiny wrote: > Dave Jiang wrote: > > > > > > On 8/16/24 7:44 AM, ira.we...@intel.com wrote: > > > From: Navneet Singh > > > > > > Extent information can be helpful to the user to coordinate memory usage > > > with the external orchestrator and FM. > >

Re: [PATCH v3 17/25] cxl/core: Return endpoint decoder information from region search

2024-08-23 Thread Jonathan Cameron
On Fri, 16 Aug 2024 09:44:25 -0500 Ira Weiny wrote: > cxl_dpa_to_region() finds the region from a tuple. > The search involves finding the device endpoint decoder as well. > > Dynamic capacity extent processing uses the endpoint decoder HPA > information to calculate the HPA offset. In additio

Re: [PATCH v3 16/25] cxl/mem: Configure dynamic capacity interrupts

2024-08-23 Thread Jonathan Cameron
On Fri, 16 Aug 2024 09:44:24 -0500 ira.we...@intel.com wrote: > From: Navneet Singh > > Dynamic Capacity Devices (DCD) support extent change notifications > through the event log mechanism. The interrupt mailbox commands were > extended in CXL 3.1 to support these notifications. Firmware can't

Re: [PATCH v3 14/25] cxl/events: Split event msgnum configuration from irq setup

2024-08-23 Thread Jonathan Cameron
On Fri, 16 Aug 2024 09:44:22 -0500 Ira Weiny wrote: > Dynamic Capacity Devices (DCD) require event interrupts to process > memory addition or removal. BIOS may have control over non-DCD event > processing. DCD interrupt configuration needs to be separate from > memory event interrupt configurat

Re: [PATCH v3 13/25] cxl/region: Add sparse DAX region support

2024-08-23 Thread Jonathan Cameron
On Fri, 16 Aug 2024 09:44:21 -0500 ira.we...@intel.com wrote: > From: Navneet Singh > > Dynamic Capacity CXL regions must allow memory to be added or removed > dynamically. In addition to the quantity of memory available the > location of the memory within a DC partition is dynamic based on the

Re: [PATCH v3 12/25] cxl/region: Refactor common create region code

2024-08-23 Thread Jonathan Cameron
On Fri, 16 Aug 2024 09:44:20 -0500 Ira Weiny wrote: > create_pmem_region_store() and create_ram_region_store() are identical > with the exception of the region mode. With the addition of DC region > mode this would end up being 3 copies of the same code. > > Refactor create_pmem_region_store()

Re: [PATCH v3 11/25] cxl/mem: Expose DCD partition capabilities in sysfs

2024-08-23 Thread Jonathan Cameron
On Thu, 22 Aug 2024 21:28:41 -0500 Ira Weiny wrote: > Dave Jiang wrote: > > > > > > On 8/16/24 7:44 AM, ira.we...@intel.com wrote: > > > From: Navneet Singh > > > > > > To properly configure CXL regions on Dynamic Capacity Devices (DCD), > > > user space will need to know the details of the

Re: [PATCH v3 10/25] cxl/port: Add endpoint decoder DC mode support to sysfs

2024-08-23 Thread Jonathan Cameron
On Fri, 16 Aug 2024 09:44:18 -0500 ira.we...@intel.com wrote: > From: Navneet Singh > > Endpoint decoder mode is used to represent the partition the decoder > points to such as ram or pmem. > > Expand the mode to allow a decoder to point to a specific DC partition > (Region). > > Signed-off-by

Re: [PATCH v3 09/25] cxl/hdm: Add dynamic capacity size support to endpoint decoders

2024-08-23 Thread Jonathan Cameron
On Fri, 16 Aug 2024 09:44:17 -0500 ira.we...@intel.com wrote: > From: Navneet Singh > > To support Dynamic Capacity Devices (DCD) endpoint decoders will need to > map DC partitions (regions). In addition to assigning the size of the > DC partition, the decoder must assign any skip value from th

Re: [PATCH v3 07/25] cxl/core: Separate region mode from decoder mode

2024-08-23 Thread Jonathan Cameron
On Fri, 16 Aug 2024 09:44:15 -0500 ira.we...@intel.com wrote: > From: Navneet Singh > > Until now region modes and decoder modes were equivalent in that both > modes were either PMEM or RAM. The addition of Dynamic > Capacity partitions defines up to 8 DC partitions per device. > > The region

Re: [PATCH v3 06/25] cxl/mem: Read dynamic capacity configuration from the device

2024-08-23 Thread Jonathan Cameron
On Fri, 16 Aug 2024 09:44:14 -0500 ira.we...@intel.com wrote: > From: Navneet Singh > > Devices which optionally support Dynamic Capacity (DC) are configured > via mailbox commands. CXL 3.1 requires the host to issue the Get DC > Configuration command in order to properly configure DCDs. Witho

Re: [PATCH v3 03/25] dax: Document dax dev range tuple

2024-08-23 Thread Jonathan Cameron
On Fri, 16 Aug 2024 09:44:11 -0500 Ira Weiny wrote: > The device DAX structure is being enhanced to track additional DCD > information. > > The current range tuple was not fully documented. Document it prior to > adding information for DC. > > Suggested-by: Jonathan Cameron > Signed-off-by: I

Re: [PATCH v3 11/25] cxl/mem: Expose DCD partition capabilities in sysfs

2024-08-23 Thread Dave Jiang
On 8/22/24 7:28 PM, Ira Weiny wrote: > Dave Jiang wrote: >> >> >> On 8/16/24 7:44 AM, ira.we...@intel.com wrote: >>> From: Navneet Singh >>> >>> To properly configure CXL regions on Dynamic Capacity Devices (DCD), >>> user space will need to know the details of the DC partitions available. >>>

Re: [PATCH v3 21/25] dax/region: Create resources on sparse DAX regions

2024-08-23 Thread Ira Weiny
Dave Jiang wrote: > > > On 8/16/24 7:44 AM, ira.we...@intel.com wrote: > > From: Navneet Singh > > [snip] > > diff --git a/drivers/cxl/core/extent.c b/drivers/cxl/core/extent.c > > index d7d526a51e2b..103b0bec3a4a 100644 > > --- a/drivers/cxl/core/extent.c > > +++ b/drivers/cxl/core/extent.c

Re: [PATCH v3 19/25] cxl/region/extent: Expose region extent information in sysfs

2024-08-22 Thread Ira Weiny
Dave Jiang wrote: > > > On 8/16/24 7:44 AM, ira.we...@intel.com wrote: > > From: Navneet Singh > > > > Extent information can be helpful to the user to coordinate memory usage > > with the external orchestrator and FM. > > > > Expose the details of region extents by creating the following > >

Re: [PATCH v3 18/25] cxl/extent: Process DCD events and realize region extents

2024-08-22 Thread Ira Weiny
Dave Jiang wrote: > > > On 8/16/24 7:44 AM, ira.we...@intel.com wrote: > > From: Navneet Singh > > [snip] > > > > Process DCD events and create region devices. > > > > Signed-off-by: Navneet Singh > > Co-developed-by: Ira Weiny > > Signed-off-by: Ira Weiny > > A few nits below, but in g

Re: [PATCH v3 11/25] cxl/mem: Expose DCD partition capabilities in sysfs

2024-08-22 Thread Ira Weiny
Dave Jiang wrote: > > > On 8/16/24 7:44 AM, ira.we...@intel.com wrote: > > From: Navneet Singh > > > > To properly configure CXL regions on Dynamic Capacity Devices (DCD), > > user space will need to know the details of the DC partitions available. > > > > Expose dynamic capacity capabilities

Re: [PATCH v3 09/25] cxl/hdm: Add dynamic capacity size support to endpoint decoders

2024-08-22 Thread Ira Weiny
Dave Jiang wrote: > > > On 8/16/24 7:44 AM, ira.we...@intel.com wrote: > > From: Navneet Singh > > [snip] > > +static int dc_mode_to_region_index(enum cxl_decoder_mode mode) > > +{ > > + return mode - CXL_DECODER_DC0; > > +} > > + > > +static int cxl_request_skip(struct cxl_endpoint_decoder

Re: [PATCH v3 06/25] cxl/mem: Read dynamic capacity configuration from the device

2024-08-22 Thread Ira Weiny
Fan Ni wrote: > On Fri, Aug 16, 2024 at 02:45:47PM -0700, Dave Jiang wrote: [snip] > > > + > > > +/** > > > + * cxl_dev_dynamic_capacity_identify() - Reads the dynamic capacity > > > + *information from the device. > > > + * @mds: The memory device state >

Re: [PATCH v3 06/25] cxl/mem: Read dynamic capacity configuration from the device

2024-08-22 Thread Ira Weiny
Fan Ni wrote: > On Fri, Aug 16, 2024 at 02:45:47PM -0700, Dave Jiang wrote: > > > > > + > > > +/** > > > + * cxl_dev_dynamic_capacity_identify() - Reads the dynamic capacity > > > + *information from the device. > > > + * @mds: The memory device state > > >

Re: [PATCH v3 15/25] cxl/pci: Factor out interrupt policy check

2024-08-22 Thread Fan Ni
On Fri, Aug 16, 2024 at 09:44:23AM -0500, Ira Weiny wrote: > Dynamic Capacity Devices (DCD) require event interrupts to process > memory addition or removal. BIOS may have control over non-DCD event > processing. DCD interrupt configuration needs to be separate from > memory event interrupt confi

Re: [PATCH v3 14/25] cxl/events: Split event msgnum configuration from irq setup

2024-08-22 Thread Fan Ni
On Fri, Aug 16, 2024 at 09:44:22AM -0500, Ira Weiny wrote: > Dynamic Capacity Devices (DCD) require event interrupts to process > memory addition or removal. BIOS may have control over non-DCD event > processing. DCD interrupt configuration needs to be separate from > memory event interrupt confi

Re: [PATCH v3 12/25] cxl/region: Refactor common create region code

2024-08-22 Thread Fan Ni
On Fri, Aug 16, 2024 at 09:44:20AM -0500, Ira Weiny wrote: > create_pmem_region_store() and create_ram_region_store() are identical > with the exception of the region mode. With the addition of DC region > mode this would end up being 3 copies of the same code. > > Refactor create_pmem_region_sto

Re: [PATCH v3 13/25] cxl/region: Add sparse DAX region support

2024-08-22 Thread Fan Ni
On Fri, Aug 16, 2024 at 09:44:21AM -0500, ira.we...@intel.com wrote: > From: Navneet Singh > > Dynamic Capacity CXL regions must allow memory to be added or removed > dynamically. In addition to the quantity of memory available the > location of the memory within a DC partition is dynamic based

Re: [PATCH v3 02/25] printk: Add print format (%par) for struct range

2024-08-22 Thread Andy Shevchenko
On Thu, Aug 22, 2024 at 12:53:32PM -0500, Ira Weiny wrote: > Petr Mladek wrote: > > On Fri 2024-08-16 09:44:10, Ira Weiny wrote: ... > > > + %par[range 0x6000-0x6fff] or > > > > It seems that it is always 64-bit. It prints: > > > > struct range { > > u64 start; > > u64 e

Re: [PATCH v3 02/25] printk: Add print format (%par) for struct range

2024-08-22 Thread Ira Weiny
Petr Mladek wrote: > On Fri 2024-08-16 09:44:10, Ira Weiny wrote: > > The use of struct range in the CXL subsystem is growing. In particular, > > the addition of Dynamic Capacity devices uses struct range in a number > > of places which are reported in debug and error messages. > > > > To wit req

Re: [PATCH v3 24/25] tools/testing/cxl: Make event logs dynamic

2024-08-20 Thread Dave Jiang
On 8/16/24 7:44 AM, Ira Weiny wrote: > The test event logs were created as static arrays as an easy way to mock > events. Dynamic Capacity Device (DCD) test support requires events be > generated dynamically when extents are created or destroyed. > > Modify the event log storage to be dynamica

Re: [PATCH v3 23/25] cxl/mem: Trace Dynamic capacity Event Record

2024-08-20 Thread Dave Jiang
On 8/16/24 7:44 AM, ira.we...@intel.com wrote: > From: Navneet Singh > > CXL rev 3.1 section 8.2.9.2.1 adds the Dynamic Capacity Event Records. > User space can use trace events for debugging of DC capacity changes. > > Add DC trace points to the trace log. > > Signed-off-by: Navneet Singh

Re: [PATCH v3 06/25] cxl/mem: Read dynamic capacity configuration from the device

2024-08-20 Thread Fan Ni
On Fri, Aug 16, 2024 at 02:45:47PM -0700, Dave Jiang wrote: > > > On 8/16/24 7:44 AM, ira.we...@intel.com wrote: > > From: Navneet Singh > > > > Devices which optionally support Dynamic Capacity (DC) are configured > > via mailbox commands. CXL 3.1 requires the host to issue the Get DC > > Con

Re: [PATCH v3 02/25] printk: Add print format (%par) for struct range

2024-08-20 Thread Petr Mladek
On Fri 2024-08-16 09:44:10, Ira Weiny wrote: > The use of struct range in the CXL subsystem is growing. In particular, > the addition of Dynamic Capacity devices uses struct range in a number > of places which are reported in debug and error messages. > > To wit requiring the printing of the star

Re: [PATCH v3 22/25] cxl/region: Read existing extents on region creation

2024-08-19 Thread Dave Jiang
On 8/16/24 7:44 AM, ira.we...@intel.com wrote: > From: Navneet Singh > > Dynamic capacity device extents may be left in an accepted state on a > device due to an unexpected host crash. In this case it is expected > that the creation of a new region on top of a DC partition can read > those ex

Re: [PATCH v3 21/25] dax/region: Create resources on sparse DAX regions

2024-08-19 Thread Dave Jiang
On 8/16/24 7:44 AM, ira.we...@intel.com wrote: > From: Navneet Singh > > DAX regions which map dynamic capacity partitions require that memory be > allowed to come and go. Recall sparse regions were created for this > purpose. Now that extents can be realized within DAX regions the DAX > reg

Re: [PATCH v3 20/25] dax/bus: Factor out dev dax resize logic

2024-08-19 Thread Dave Jiang
On 8/16/24 7:44 AM, Ira Weiny wrote: > Dynamic Capacity regions must limit dev dax resources to those areas > which have extents backing real memory. Such DAX regions are dubbed > 'sparse' regions. In order to manage where memory is available four > alternatives were considered: > > 1) Create

Re: [PATCH v3 19/25] cxl/region/extent: Expose region extent information in sysfs

2024-08-19 Thread Dave Jiang
On 8/16/24 7:44 AM, ira.we...@intel.com wrote: > From: Navneet Singh > > Extent information can be helpful to the user to coordinate memory usage > with the external orchestrator and FM. > > Expose the details of region extents by creating the following > sysfs entries. > > /sys/bus/

Re: [PATCH v3 18/25] cxl/extent: Process DCD events and realize region extents

2024-08-19 Thread Dave Jiang
On 8/16/24 7:44 AM, ira.we...@intel.com wrote: > From: Navneet Singh > > A dynamic capacity device (DCD) sends events to signal the host for > changes in the availability of Dynamic Capacity (DC) memory. These > events contain extents describing a DPA range and meta data for memory > to be ad

Re: [PATCH v3 17/25] cxl/core: Return endpoint decoder information from region search

2024-08-19 Thread Dave Jiang
On 8/16/24 7:44 AM, Ira Weiny wrote: > cxl_dpa_to_region() finds the region from a tuple. > The search involves finding the device endpoint decoder as well. > > Dynamic capacity extent processing uses the endpoint decoder HPA > information to calculate the HPA offset. In addition, well behave

Re: [PATCH v3 21/25] dax/region: Create resources on sparse DAX regions

2024-08-18 Thread Markus Elfring
… > +++ b/drivers/cxl/core/extent.c > @@ -271,20 +271,67 @@ static void calc_hpa_range(struct cxl_endpoint_decoder > *cxled, > hpa_range->end = hpa_range->start + range_len(dpa_range) - 1; > } > > +static int cxlr_notify_extent(struct cxl_region *cxlr, enum dc_event event, > +

Re: [PATCH v3 16/25] cxl/mem: Configure dynamic capacity interrupts

2024-08-16 Thread Dave Jiang
On 8/16/24 7:44 AM, ira.we...@intel.com wrote: > From: Navneet Singh > > Dynamic Capacity Devices (DCD) support extent change notifications > through the event log mechanism. The interrupt mailbox commands were > extended in CXL 3.1 to support these notifications. Firmware can't > configure

Re: [PATCH v3 14/25] cxl/events: Split event msgnum configuration from irq setup

2024-08-16 Thread Dave Jiang
On 8/16/24 7:44 AM, Ira Weiny wrote: > Dynamic Capacity Devices (DCD) require event interrupts to process > memory addition or removal. BIOS may have control over non-DCD event > processing. DCD interrupt configuration needs to be separate from > memory event interrupt configuration. > > Spli

Re: [PATCH v3 13/25] cxl/region: Add sparse DAX region support

2024-08-16 Thread Dave Jiang
On 8/16/24 7:44 AM, ira.we...@intel.com wrote: > From: Navneet Singh > > Dynamic Capacity CXL regions must allow memory to be added or removed > dynamically. In addition to the quantity of memory available the > location of the memory within a DC partition is dynamic based on the > extents of

Re: [PATCH v3 12/25] cxl/region: Refactor common create region code

2024-08-16 Thread Dave Jiang
On 8/16/24 7:44 AM, Ira Weiny wrote: > create_pmem_region_store() and create_ram_region_store() are identical > with the exception of the region mode. With the addition of DC region > mode this would end up being 3 copies of the same code. > > Refactor create_pmem_region_store() and create_ram

Re: [PATCH v3 11/25] cxl/mem: Expose DCD partition capabilities in sysfs

2024-08-16 Thread Dave Jiang
On 8/16/24 7:44 AM, ira.we...@intel.com wrote: > From: Navneet Singh > > To properly configure CXL regions on Dynamic Capacity Devices (DCD), > user space will need to know the details of the DC partitions available. > > Expose dynamic capacity capabilities through sysfs. > > Signed-off-by:

Re: [PATCH v3 10/25] cxl/port: Add endpoint decoder DC mode support to sysfs

2024-08-16 Thread Dave Jiang
On 8/16/24 7:44 AM, ira.we...@intel.com wrote: > From: Navneet Singh > > Endpoint decoder mode is used to represent the partition the decoder > points to such as ram or pmem. > > Expand the mode to allow a decoder to point to a specific DC partition > (Region). > > Signed-off-by: Navneet Sin

Re: [PATCH v3 09/25] cxl/hdm: Add dynamic capacity size support to endpoint decoders

2024-08-16 Thread Dave Jiang
On 8/16/24 7:44 AM, ira.we...@intel.com wrote: > From: Navneet Singh > > To support Dynamic Capacity Devices (DCD) endpoint decoders will need to > map DC partitions (regions). In addition to assigning the size of the > DC partition, the decoder must assign any skip value from the previous >

Re: [PATCH v3 08/25] cxl/region: Add dynamic capacity decoder and region modes

2024-08-16 Thread Dave Jiang
On 8/16/24 7:44 AM, ira.we...@intel.com wrote: > From: Navneet Singh > > One or more decoders each pointing to a Dynamic Capacity (DC) partition > form a CXL software region. The region mode reflects composition of > that entire software region. Decoder mode reflects a specific DC > partitio

Re: [PATCH v3 07/25] cxl/core: Separate region mode from decoder mode

2024-08-16 Thread Dave Jiang
On 8/16/24 7:44 AM, ira.we...@intel.com wrote: > From: Navneet Singh > > Until now region modes and decoder modes were equivalent in that both > modes were either PMEM or RAM. The addition of Dynamic > Capacity partitions defines up to 8 DC partitions per device. > > The region mode is thus

Re: [PATCH v3 06/25] cxl/mem: Read dynamic capacity configuration from the device

2024-08-16 Thread Dave Jiang
On 8/16/24 7:44 AM, ira.we...@intel.com wrote: > From: Navneet Singh > > Devices which optionally support Dynamic Capacity (DC) are configured > via mailbox commands. CXL 3.1 requires the host to issue the Get DC > Configuration command in order to properly configure DCDs. Without the > Get

Re: [PATCH v3 03/25] dax: Document dax dev range tuple

2024-08-16 Thread Dave Jiang
On 8/16/24 7:44 AM, Ira Weiny wrote: > The device DAX structure is being enhanced to track additional DCD > information. > > The current range tuple was not fully documented. Document it prior to > adding information for DC. > > Suggested-by: Jonathan Cameron > Signed-off-by: Ira Weiny Rev

Re: [PATCH] btrfs: Annotate structs with __counted_by()

2024-08-14 Thread David Sterba
On Wed, Aug 14, 2024 at 09:01:42PM +0200, Thorsten Blum wrote: > On 14. Aug 2024, at 20:02, Nathan Chancellor wrote: > > On Mon, Aug 12, 2024 at 02:03:44PM +0200, Thorsten Blum wrote: > >> On 12. Aug 2024, at 12:54, Johannes Thumshirn > >> wrote: > >>> On 12.08.24 12:37, Thorsten Blum wrote: > >

Re: [PATCH] btrfs: Annotate structs with __counted_by()

2024-08-14 Thread Thorsten Blum
On 14. Aug 2024, at 20:02, Nathan Chancellor wrote: > On Mon, Aug 12, 2024 at 02:03:44PM +0200, Thorsten Blum wrote: >> On 12. Aug 2024, at 12:54, Johannes Thumshirn >> wrote: >>> On 12.08.24 12:37, Thorsten Blum wrote: Add the __counted_by compiler attribute to the flexible array member >>

Re: [PATCH] btrfs: Annotate structs with __counted_by()

2024-08-14 Thread Nathan Chancellor
On Mon, Aug 12, 2024 at 02:03:44PM +0200, Thorsten Blum wrote: > On 12. Aug 2024, at 12:54, Johannes Thumshirn > wrote: > > On 12.08.24 12:37, Thorsten Blum wrote: > >> Add the __counted_by compiler attribute to the flexible array member > >> stripes to improve access bounds-checking via CONFIG_U

Re: [PATCH] btrfs: Annotate struct name_cache_entry with __counted_by()

2024-08-13 Thread David Sterba
On Tue, Aug 13, 2024 at 12:53:15PM +0200, Thorsten Blum wrote: > Add the __counted_by compiler attribute to the flexible array member > name to improve access bounds-checking via CONFIG_UBSAN_BOUNDS and > CONFIG_FORTIFY_SOURCE. > > Signed-off-by: Thorsten Blum Thanks, Reviewed-by: David Sterba

Re: [PATCH] btrfs: Annotate structs with __counted_by()

2024-08-12 Thread Thorsten Blum
On 12. Aug 2024, at 12:54, Johannes Thumshirn wrote: > On 12.08.24 12:37, Thorsten Blum wrote: >> Add the __counted_by compiler attribute to the flexible array member >> stripes to improve access bounds-checking via CONFIG_UBSAN_BOUNDS and >> CONFIG_FORTIFY_SOURCE. >> >> Signed-off-by: Thorsten

Re: [PATCH] btrfs: Annotate structs with __counted_by()

2024-08-12 Thread David Sterba
On Mon, Aug 12, 2024 at 12:36:20PM +0200, Thorsten Blum wrote: > Add the __counted_by compiler attribute to the flexible array member > stripes to improve access bounds-checking via CONFIG_UBSAN_BOUNDS and > CONFIG_FORTIFY_SOURCE. > > Signed-off-by: Thorsten Blum Reviewed-by: David Sterba

  1   2   3   4   5   6   7   8   9   10   >