[PATCH 0/3] btrfs: Convert kmap/memset/kunmap to memzero_user()

2021-03-09 Thread ira . weiny
From: Ira Weiny Previously this was submitted to convert to zero_user()[1]. zero_user() is not the same as memzero_user() and in fact some zero_user() calls may be better off as memzero_user(). Regardless it was incorrect to convert btrfs to zero_user(). This series corrects this by lifting

[PATCH 3/3] btrfs: Use memzero_page() instead of open coded kmap pattern

2021-03-09 Thread ira . weiny
From: Ira Weiny There are many places where kmap/memset/kunmap patterns occur. Use the newly lifted memzero_page() to eliminate direct uses of kmap and leverage the new core functions use of kmap_local_page(). The development of this patch was aided by the following coccinelle script

[PATCH 1/3] iov_iter: Lift memzero_page() to highmem.h

2021-03-09 Thread ira . weiny
From: Ira Weiny memzero_page() can replace the kmap/memset/kunmap pattern in other places in the code. While zero_user() has the same interface it is not the same call and its use should be limited and some of those calls may be better converted from zero_user() to memzero_page().[1] But that

[PATCH 2/3] mm/highmem: Convert memzero_page() to kmap_local_page()

2021-03-09 Thread ira . weiny
From: Ira Weiny The memset() does not need to be performed atomically. Use kmap_local_page() which will improved performance for this call. Cc: Chaitanya Kulkarni Cc: David Sterba Signed-off-by: Ira Weiny --- include/linux/highmem.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

Re: [PATCH 0/3] btrfs: Convert kmap/memset/kunmap to memzero_user()

2021-03-11 Thread Ira Weiny
On Wed, Mar 10, 2021 at 03:58:36PM -0800, Andrew Morton wrote: > On Tue, 9 Mar 2021 13:21:34 -0800 ira.we...@intel.com wrote: > > > Previously this was submitted to convert to zero_user()[1]. zero_user() is > > not > > the same as memzero_user() and in fact some zero_user() calls may be better

[PATCH v3 00/25] DCD: Add support for Dynamic Capacity Devices (DCD)

2024-08-16 Thread Ira Weiny
ier to review and understand the flow - Link to v1: https://lore.kernel.org/r/20240324-dcd-type2-upstream-v1-0-b7b00d623...@intel.com - Link to v2: https://lore.kernel.org/all/20240816-dcd-type2-upstream-v2-0-20189a10a...@intel.com/ --- Ira Weiny (11): range: Add range_overlaps(

[PATCH v3 01/25] range: Add range_overlaps()

2024-08-16 Thread Ira Weiny
Thumshirn Reviewed-by: Fan Ni Reviewed-by: Dave Jiang Reviewed-by: Jonathan Cameron Signed-off-by: Ira Weiny [1] https://lore.kernel.org/all/65949f79ef908_8dc6829...@dwillia2-xfh.jf.intel.com.notmuch/ --- fs/btrfs/ordered-data.c | 10 +- include/linux/range.h | 7 +++ 2 files

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

2024-08-16 Thread Ira Weiny
list) Link: https://lore.kernel.org/all/663922b475e50_d54d729...@dwillia2-xfh.jf.intel.com.notmuch/ [1] Suggested-by: "Dan Williams" Signed-off-by: Ira Weiny --- Documentation/core-api/printk-formats.rst | 14 lib/vsprintf.c| 37 ++

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

2024-08-16 Thread Ira Weiny
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 --- Changes: [iweiny: move to start of series

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

2024-08-16 Thread Ira Weiny
ed-by: Jonathan Cameron Signed-off-by: Ira Weiny --- Changes: [iweiny: keep tags for early simple patch] [Davidlohr, Jonathan, djiang: move to beginning of series] [Dave feel free to pick this up if you like] --- drivers/cxl/pci.c | 8 1 file changed, 4 insertions(+), 4 deletions(-)

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

2024-08-16 Thread ira . weiny
Release DC Signed-off-by: Navneet Singh Reviewed-by: Jonathan Cameron Reviewed-by: Fan Ni Reviewed-by: Dave Jiang Reviewed-by: Davidlohr Bueso Co-developed-by: Ira Weiny Signed-off-by: Ira Weiny --- Changes: [iweiny: Keep tags for this early simple patch] [Davidlohr: update commit message

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

2024-08-16 Thread ira . weiny
: Navneet Singh Co-developed-by: Ira Weiny Signed-off-by: Ira Weiny --- Changes: [Li, Ming: Fix bug in total_bytes calculation] [iweiny: update commit message] [Jonathan: fix formatting] [Jonathan: Define block line size] [Jonathan/Fan: use regions returned field instead of macro in get config]

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

2024-08-16 Thread ira . weiny
constructing regions with decoders which have been flagged as dead. Suggested-by: Jonathan Cameron Signed-off-by: Navneet Singh Co-developed-by: Ira Weiny Signed-off-by: Ira Weiny --- Changes: [iweiny: rebase] [Jonathan: remove dead code] [Jonathan: clarify commit message] --- drivers/cxl/core

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

2024-08-16 Thread ira . weiny
specification r3.1. Define the new modes and helper functions required to make the association between these new modes. Reviewed-by: Jonathan Cameron Reviewed-by: Fan Ni Signed-off-by: Navneet Singh Co-developed-by: Ira Weiny Signed-off-by: Ira Weiny --- Changes: [iweiny: keep tags on simple patch

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

2024-08-16 Thread ira . weiny
storage of a single skip resource in the xarray. Signed-off-by: Navneet Singh Co-developed-by: Ira Weiny Signed-off-by: Ira Weiny --- Changes: [Jonathan: Use an example only mapping 1/2 of DC1] [iweiny: Update cover letter] [iweiny: Fix 0day bugs https://lore.kernel.org/all/202408090138

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

2024-08-16 Thread ira . weiny
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 Singh Co-developed-by: Ira Weiny Signed-off-by: Ira Weiny

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

2024-08-16 Thread ira . weiny
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: Navneet Singh Co-developed-by: Ira Weiny Signed-off-by: Ira

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

2024-08-16 Thread Ira Weiny
to be used in subsequent DC code. Suggested-by: Fan Ni Signed-off-by: Ira Weiny --- drivers/cxl/core/region.c | 28 +++- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/drivers/cxl/core/region.c b/drivers/cxl/core/region.c index 650fe33f2ed4..f85b26b39b2f

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

2024-08-16 Thread Ira Weiny
preparation for separate DCD interrupts configuration. Signed-off-by: Ira Weiny --- drivers/cxl/pci.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/cxl/pci.c b/drivers/cxl/pci.c index f7f03599bc83..17bea49bbf4d 100644 --- a/drivers/cxl/pci.c

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

2024-08-16 Thread Ira Weiny
. Reviewed-by: Dave Jiang Reviewed-by: Jonathan Cameron Signed-off-by: Ira Weiny --- Changes: [iweiny: reword commit message] [iweiny: keep review tags on simple patch] --- drivers/cxl/pci.c | 23 --- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/drivers/cxl/pci.c b

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

2024-08-16 Thread ira . weiny
devices on sparse regions. Interleaving is deferred for now. Add checks. Signed-off-by: Navneet Singh Co-developed-by: Ira Weiny Signed-off-by: Ira Weiny --- Changes: [Fan: use single function for dc region store] [djiang: avoid setting dev_size twice] [djbw: Check DCD support and interleave

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

2024-08-16 Thread Ira Weiny
decoder. Return the endpoint decoder found to be used in subsequent DCD code. Signed-off-by: Ira Weiny --- drivers/cxl/core/core.h | 6 -- drivers/cxl/core/mbox.c | 2 +- drivers/cxl/core/memdev.c | 4 ++-- drivers/cxl/core/region.c | 8 +++- 4 files changed, 14 insertions(+), 6

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

2024-08-16 Thread ira . weiny
ol of memory events. Configure DCD event log interrupts on devices supporting dynamic capacity. Disable DCD if interrupts are not supported. Care is taken to preserve the interrupt policy set by the FW if FW first has been selected by the BIOS. Signed-off-by: Navneet Singh Co-developed-by: Ira

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

2024-08-16 Thread ira . weiny
CD events and create region devices. Signed-off-by: Navneet Singh Co-developed-by: Ira Weiny Signed-off-by: Ira Weiny --- Changes: [iweiny: combine this with the extent surface patches to better show the lifetime extent objects in review] [iweiny: clean up commit message.] [iweiny: move

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

2024-08-16 Thread Ira Weiny
ce for the dax ranges. Future patches will use the same algorithm with individual extent resources as the parent. Signed-off-by: Ira Weiny --- Changes: [iweiny: Rebase on new DAX region locking] [iweiny: Reword commit message] [iweiny: Drop reviews] --- dr

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

2024-08-16 Thread ira . weiny
/dax_regionX/extentX.Y/offset /sys/bus/cxl/devices/dax_regionX/extentX.Y/length /sys/bus/cxl/devices/dax_regionX/extentX.Y/tag Signed-off-by: Navneet Singh Co-developed-by: Ira Weiny Signed-off-by: Ira Weiny --- Changes: [iweiny: split this out] [Jonathan: add documentation for

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

2024-08-16 Thread ira . weiny
such that it can manage the hardware appropriately. Signed-off-by: Navneet Singh Co-developed-by: Ira Weiny Signed-off-by: Ira Weiny --- Changes: [iweiny: patch reorder] [iweiny: move hunks from other patches to clarify code changes and add/release flows WRT dax regions] [iweiny: use %par

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

2024-08-16 Thread ira . weiny
the driver are read during driver load. Signed-off-by: Navneet Singh Co-developed-by: Ira Weiny Signed-off-by: Ira Weiny --- Changes: [iweiny: Leverage the new add path from the event processing code such that the adding and surfacing of extents flows through the same code

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

2024-08-16 Thread ira . weiny
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 Signed-off-by: Ira Weiny --- Changes: [Alison: Update commit

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

2024-08-16 Thread Ira Weiny
: Ira Weiny --- Changes: [iweiny: rebase] --- tools/testing/cxl/test/mem.c | 278 ++- 1 file changed, 171 insertions(+), 107 deletions(-) diff --git a/tools/testing/cxl/test/mem.c b/tools/testing/cxl/test/mem.c index 129f179b0ac5..674fc7f086cd 100644 --- a

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

2024-08-16 Thread Ira Weiny
memory data. Add sysfs entries on the mock device to inject and delete extents. The inject format is ::: The delete format is : Directly call the event irq callback to simulate irqs to process the test extents. Add DC mailbox commands to the CEL and implement those commands. Signed-off-by: Ira

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 mess

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 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 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 11/25] cxl/mem: Expose DCD partition capabilities in sysfs

2024-08-22 Thread Ira Weiny
gt; > Expose dynamic capacity capabilities through sysfs. > > > > Signed-off-by: Navneet Singh > > Co-developed-by: Ira Weiny > > Signed-off-by: Ira Weiny > > > > --- > > Changes: > > [iweiny: remove review tags] > > [Davidlohr/Fan/Jona

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 > >

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

2024-08-22 Thread Ira Weiny
s/bus/cxl/devices/dax_regionX/extentX.Y/tag > > > > Signed-off-by: Navneet Singh > > Co-developed-by: Ira Weiny > > Signed-off-by: Ira Weiny > > > > --- > > Changes: > > [iweiny: split this out] > > [Jonathan: add documentation for exten

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 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 23/25] cxl/mem: Trace Dynamic capacity Event Record

2024-08-26 Thread Ira Weiny
gt; > Add DC trace points to the trace log. > > > > Signed-off-by: Navneet Singh > > Signed-off-by: Ira Weiny > Reviewed-by: Dave Jiang > > small nit below > > > > > --- > > Changes: > > [Alison: Updat

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: > > > > >

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

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

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 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 orde

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 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

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 sp

Re: [PATCH v4 08/28] cxl/mem: Read dynamic capacity configuration from the device

2024-10-13 Thread Ira Weiny
oad (Total number of supported extents, number > > of available extents, total number of supported tags, and number of > > available tags). Avoid defining those fields to use the more useful > > dynamic C array. > > > > Cc: "Li, Ming" > > Si

Re: [PATCH v4 02/28] printk: Add print format (%pra) for struct range

2024-10-13 Thread Ira Weiny
Andy Shevchenko wrote: > On Wed, Oct 09, 2024 at 03:30:14PM +0200, Rasmus Villemoes wrote: > > ... > > > Rather than the struct assignments, I think it's easier to read if you > > just do > > > > struct range r; > > > > r.start = 0xc0ffee00ba5eba11; > > r.end = r.start; > > ... > > >

Re: [PATCH v4 04/28] range: Add range_overlaps()

2024-10-13 Thread Ira Weiny
Andy Shevchenko wrote: > On Wed, Oct 09, 2024 at 05:45:10PM +0300, Andy Shevchenko wrote: > > On Tue, Oct 08, 2024 at 06:10:32PM +0200, David Sterba wrote: > > > On Mon, Oct 07, 2024 at 06:16:10PM -0500, Ira Weiny wrote: > > ... > > > > > +static inli

Re: [PATCH v4 13/28] cxl/mem: Expose DCD partition capabilities in sysfs

2024-10-13 Thread Ira Weiny
Fan Ni wrote: > On Mon, Oct 07, 2024 at 06:16:19PM -0500, ira.we...@intel.com wrote: > > From: Navneet Singh > > [snip] > > + > > +static ssize_t show_read_only_dcN(struct cxl_memdev *cxlmd, char *buf, int > > pos) > > +{ > > + struct cxl_memdev_state *mds = to_cxl_memdev_state(cxlmd->cxlds)

Re: [PATCH v4 21/28] cxl/extent: Process DCD events and realize region extents

2024-10-13 Thread Ira Weiny
Li, Ming4 wrote: > On 10/10/2024 3:49 AM, Ira Weiny wrote: > > Li, Ming4 wrote: > >> On 10/8/2024 7:16 AM, ira.we...@intel.com wrote: > >>> From: Navneet Singh [snip] > > This should fix it: > > > > diff --git a/drivers/cxl/core/mbox.c

Re: [PATCH v4 21/28] cxl/extent: Process DCD events and realize region extents

2024-10-09 Thread Ira Weiny
Li, Ming4 wrote: > On 10/8/2024 7:16 AM, ira.we...@intel.com wrote: > > From: Navneet Singh > > [snip] > > > > Signed-off-by: Navneet Singh > > Co-developed-by: Ira Weiny > > Signed-off-by: Ira Weiny > > > Hi Ira, > > I guess you missed

Re: [PATCH v4 01/28] test printk: Add very basic struct resource tests

2024-10-11 Thread Ira Weiny
Petr Mladek wrote: > On Mon 2024-10-07 18:16:07, Ira Weiny wrote: > > The printk tests for struct resource were stubbed out. struct range > > printing will leverage the struct resource implementation. > > > > To prevent regression add some basic sanity tests for s

Re: [PATCH v4 12/28] cxl/cdat: Gather DSMAS data for DCD regions

2024-10-11 Thread Ira Weiny
Rafael J. Wysocki wrote: > On Tue, Oct 8, 2024 at 1:17 AM Ira Weiny wrote: > > [snip] > > diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h > > index 199afc2cd122..387fc821703a 100644 > > --- a/include/acpi/actbl1.h > > +++ b/include/acpi/actbl1

Re: [PATCH v4 05/28] dax: Document dax dev range tuple

2024-10-11 Thread Ira Weiny
Jonathan Cameron wrote: > On Mon, 07 Oct 2024 18:16: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

Re: [PATCH v4 02/28] printk: Add print format (%pra) for struct range

2024-10-11 Thread Ira Weiny
Rasmus Villemoes wrote: > Ira Weiny writes: > > > --- > > Documentation/core-api/printk-formats.rst | 13 > > lib/test_printf.c | 26 +++ > > lib/vsprintf.c| 55 > >

[PATCH v4 11/28] cxl/hdm: Add dynamic capacity size support to endpoint decoders

2024-10-07 Thread ira . weiny
storage of a single skip resource in the xarray. Signed-off-by: Navneet Singh Co-developed-by: Ira Weiny Signed-off-by: Ira Weiny --- Changes: [djiang: s/skip_res/skip_xa/] --- drivers/cxl/core/hdm.c | 196 drivers/cxl/core/port.c | 2 + drivers

[PATCH v4 20/28] cxl/core: Return endpoint decoder information from region search

2024-10-07 Thread Ira Weiny
decoder. Return the endpoint decoder found to be used in subsequent DCD code. Signed-off-by: Ira Weiny --- drivers/cxl/core/core.h | 6 -- drivers/cxl/core/mbox.c | 2 +- drivers/cxl/core/memdev.c | 4 ++-- drivers/cxl/core/region.c | 8 +++- 4 files changed, 14 insertions(+), 6

[PATCH v4 13/28] cxl/mem: Expose DCD partition capabilities in sysfs

2024-10-07 Thread ira . weiny
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: Navneet Singh Co-developed-by: Ira Weiny Signed-off-by: Ira

[PATCH v4 12/28] cxl/cdat: Gather DSMAS data for DCD regions

2024-10-07 Thread Ira Weiny
Cc: acpica-de...@lists.linux.dev Signed-off-by: Ira Weiny --- Changes: [iweiny: new patch] [iweiny: Gather shareable/read-only flags for later use] --- drivers/cxl/core/cdat.c | 38 ++ drivers/cxl/core/mbox.c | 2 ++ drivers/cxl/cxlmem.h| 3 +++ include

[PATCH v4 10/28] cxl/region: Add dynamic capacity decoder and region modes

2024-10-07 Thread ira . weiny
specification r3.1. Define the new modes and helper functions required to make the association between these new modes. Reviewed-by: Jonathan Cameron Reviewed-by: Fan Ni Signed-off-by: Navneet Singh Co-developed-by: Ira Weiny Signed-off-by: Ira Weiny --- Changes: [iweiny: keep tags on simple patch

[PATCH v4 15/28] cxl/region: Refactor common create region code

2024-10-07 Thread Ira Weiny
to be used in subsequent DC code. Suggested-by: Fan Ni Signed-off-by: Ira Weiny --- drivers/cxl/core/region.c | 28 +++- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/drivers/cxl/core/region.c b/drivers/cxl/core/region.c index ab00203f285a..2ca6148d108c

[PATCH v4 06/28] cxl/pci: Delay event buffer allocation

2024-10-07 Thread Ira Weiny
ed-by: Jonathan Cameron Signed-off-by: Ira Weiny --- Changes: [iweiny: keep tags for early simple patch] [Davidlohr, Jonathan, djiang: move to beginning of series] [Dave feel free to pick this up if you like] --- drivers/cxl/pci.c | 8 1 file changed, 4 insertions(+), 4 deletions(-)

[PATCH v4 05/28] dax: Document dax dev range tuple

2024-10-07 Thread Ira Weiny
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 --- Changes: [iweiny: move to start of series

[PATCH v4 16/28] cxl/region: Add sparse DAX region support

2024-10-07 Thread ira . weiny
devices on sparse regions. Interleaving is deferred for now. Add checks. Signed-off-by: Navneet Singh Co-developed-by: Ira Weiny Signed-off-by: Ira Weiny --- Changes: [Fan: use single function for dc region store] [djiang: avoid setting dev_size twice] [djbw: Check DCD support and interleave

[PATCH v4 23/28] dax/bus: Factor out dev dax resize logic

2024-10-07 Thread Ira Weiny
ce for the dax ranges. Future patches will use the same algorithm with individual extent resources as the parent. Signed-off-by: Ira Weiny --- Changes: [Jonathan: Fix handling of alloc] --- drivers/dax/bus.c | 129 +- 1 file changed, 79 insert

[PATCH v4 19/28] cxl/mem: Configure dynamic capacity interrupts

2024-10-07 Thread ira . weiny
ol of memory events. Configure DCD event log interrupts on devices supporting dynamic capacity. Disable DCD if interrupts are not supported. Care is taken to preserve the interrupt policy set by the FW if FW first has been selected by the BIOS. Signed-off-by: Navneet Singh Co-developed-by: Ira

[PATCH v4 22/28] cxl/region/extent: Expose region extent information in sysfs

2024-10-07 Thread ira . weiny
/dax_regionX/extentX.Y/offset /sys/bus/cxl/devices/dax_regionX/extentX.Y/length /sys/bus/cxl/devices/dax_regionX/extentX.Y/tag Signed-off-by: Navneet Singh Co-developed-by: Ira Weiny Signed-off-by: Ira Weiny --- Changes: [djiang: Split sysfs docs up] [iweiny: Adjust sysfs docs dates

[PATCH v4 21/28] cxl/extent: Process DCD events and realize region extents

2024-10-07 Thread ira . weiny
sting DAX devices as having a 0 tag which makes the most logical sense as a default. Process DCD events and create region devices. Signed-off-by: Navneet Singh Co-developed-by: Ira Weiny Signed-off-by: Ira Weiny --- Changes: [Jonathan/jgroves/iweiny: restrict tags to 0] [iweiny: rebase to 6.1

[PATCH v4 14/28] cxl/port: Add endpoint decoder DC mode support to sysfs

2024-10-07 Thread ira . weiny
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 Singh Co-developed-by: Ira Weiny Signed-off-by: Ira Weiny

[PATCH v4 17/28] cxl/events: Split event msgnum configuration from irq setup

2024-10-07 Thread Ira Weiny
preparation for separate DCD interrupts configuration. Signed-off-by: Ira Weiny --- drivers/cxl/pci.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/cxl/pci.c b/drivers/cxl/pci.c index fc5ab74448cc..29a863331bec 100644 --- a/drivers/cxl/pci.c

[PATCH v4 18/28] cxl/pci: Factor out interrupt policy check

2024-10-07 Thread Ira Weiny
. Reviewed-by: Dave Jiang Reviewed-by: Jonathan Cameron Signed-off-by: Ira Weiny --- Changes: [iweiny: reword commit message] [iweiny: keep review tags on simple patch] --- drivers/cxl/pci.c | 23 --- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/drivers/cxl/pci.c b

[PATCH v4 28/28] tools/testing/cxl: Add DC Regions to mock mem data

2024-10-07 Thread Ira Weiny
memory data. Add sysfs entries on the mock device to inject and delete extents. The inject format is ::: The delete format is : Directly call the event irq callback to simulate irqs to process the test extents. Add DC mailbox commands to the CEL and implement those commands. Signed-off-by: Ira

[PATCH v4 24/28] dax/region: Create resources on sparse DAX regions

2024-10-07 Thread ira . weiny
such that it can manage the hardware appropriately. Signed-off-by: Navneet Singh Co-developed-by: Ira Weiny Signed-off-by: Ira Weiny --- Changes: [djiang: clarify the use of dax_region_{add,rm}_resource() and dax_avail_size()] [djiang: use guard(device)() and clean up notify function

[PATCH v4 27/28] tools/testing/cxl: Make event logs dynamic

2024-10-07 Thread Ira Weiny
. Simplify log processing by using the event log array index as the handle. Add a lock to manage concurrency required when user space is allowed to control DCD extents Signed-off-by: Ira Weiny --- Changes: [iweiny: rebase to 6.12] --- tools/testing/cxl/test/mem.c | 268

[PATCH v4 25/28] cxl/region: Read existing extents on region creation

2024-10-07 Thread ira . weiny
seen prior to the driver are read during driver load. Signed-off-by: Navneet Singh Co-developed-by: Ira Weiny Signed-off-by: Ira Weiny --- Changes: [iweiny: adjust for mailbox split] [djiang: Update commit messages] [djiang: s/cxl_read_extent_list/cxl_process_extent_list/] [djian

[PATCH v4 26/28] cxl/mem: Trace Dynamic capacity Event Record

2024-10-07 Thread ira . weiny
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 Signed-off-by: Ira Weiny --- Changes: [djiang: Use 3.1 spec

[PATCH v4 00/28] DCD: Add support for Dynamic Capacity Devices (DCD)

2024-10-07 Thread Ira Weiny
Andy: Share logic between printing struct resource and struct range - Link to v3: https://patch.msgid.link/20240816-dcd-type2-upstream-v3-0-7c9b96cba...@intel.com --- Ira Weiny (14): test printk: Add very basic struct resource tests printk: Add print format (%pra) for struct range cxl/cdat

[PATCH v4 02/28] printk: Add print format (%pra) for struct range

2024-10-07 Thread Ira Weiny
.org/all/66cea3bf3332f_f937b29424@iweiny-mobl.notmuch/ [2] Suggested-by: "Dan Williams" Signed-off-by: Ira Weiny --- Changes: [Andy: create new hex_range() and use it in both range/resource] [Petr/Andy: Use %pra] [Andy: Add test case start > end] [Petr: Update documentation] [Petr: use

[PATCH v4 03/28] cxl/cdat: Use %pra for dpa range outputs

2024-10-07 Thread Ira Weiny
...@vger.kernel.org (open list) Signed-off-by: Ira Weiny --- drivers/cxl/core/cdat.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/cxl/core/cdat.c b/drivers/cxl/core/cdat.c index ef1621d40f05..438869df241a 100644 --- a/drivers/cxl/core/cdat.c +++ b/drivers/cxl/core

[PATCH v4 01/28] test printk: Add very basic struct resource tests

2024-10-07 Thread Ira Weiny
Senozhatsky Cc: linux-...@vger.kernel.org Signed-off-by: Ira Weiny --- [lkp: ensure phys_addr_t is within limits for all arch's] --- lib/test_printf.c | 44 1 file changed, 44 insertions(+) diff --git a/lib/test_printf.c b/lib/test_printf.c

[PATCH v4 08/28] cxl/mem: Read dynamic capacity configuration from the device

2024-10-07 Thread ira . weiny
: Navneet Singh Co-developed-by: Ira Weiny Signed-off-by: Ira Weiny --- Changes: [iweiny: Adjust for mailbox split] [djiang: remove setting region names to ''] [fan: Clean up dev_{err,dbg}] --- drivers/cxl/core/mbox.c | 166 +++- driv

[PATCH v4 09/28] cxl/core: Separate region mode from decoder mode

2024-10-07 Thread ira . weiny
constructing regions with decoders which have been flagged as dead. Suggested-by: Jonathan Cameron Signed-off-by: Navneet Singh Co-developed-by: Ira Weiny Signed-off-by: Ira Weiny --- Changes: [iweiny: rebase] [Jonathan: remove dead code] [Jonathan: clarify commit message] --- drivers/cxl/core/cdat.c

[PATCH v4 04/28] range: Add range_overlaps()

2024-10-07 Thread Ira Weiny
Thumshirn Reviewed-by: Fan Ni Reviewed-by: Dave Jiang Reviewed-by: Jonathan Cameron Signed-off-by: Ira Weiny [1] https://lore.kernel.org/all/65949f79ef908_8dc6829...@dwillia2-xfh.jf.intel.com.notmuch/ --- fs/btrfs/ordered-data.c | 10 +- include/linux/range.h | 7 +++ 2 files

[PATCH v4 07/28] cxl/mbox: Flag support for Dynamic Capacity Devices (DCD)

2024-10-07 Thread ira . weiny
Release DC Signed-off-by: Navneet Singh Reviewed-by: Jonathan Cameron Reviewed-by: Fan Ni Reviewed-by: Dave Jiang Reviewed-by: Davidlohr Bueso Co-developed-by: Ira Weiny Signed-off-by: Ira Weiny --- Changes: [iweiny: Keep tags for this early simple patch] [Davidlohr: update commit message

Re: [PATCH v4 22/28] cxl/region/extent: Expose region extent information in sysfs

2024-10-18 Thread Ira Weiny
; > /sys/bus/cxl/devices/dax_regionX/extentX.Y/tag > > > > Signed-off-by: Navneet Singh > > Co-developed-by: Ira Weiny > > Signed-off-by: Ira Weiny > > > Trivial comments inline. > > Reviewed-by: Jonathan Cameron Thanks! > > > ---

Re: [PATCH v4 21/28] cxl/extent: Process DCD events and realize region extents

2024-10-21 Thread Ira Weiny
Jonathan Cameron wrote: > On Thu, 17 Oct 2024 16:15:03 -0500 > Ira Weiny wrote: > > > Jonathan Cameron wrote: > > > On Wed, 9 Oct 2024 14:49:09 -0500 > > > Ira Weiny wrote: > > > > > > > Li, Ming4 wrote: > > > > >

Re: [PATCH v4 21/28] cxl/extent: Process DCD events and realize region extents

2024-10-21 Thread Ira Weiny
Jonathan Cameron wrote: > On Thu, 17 Oct 2024 16:39:57 -0500 > Ira Weiny wrote: > > > Jonathan Cameron wrote: > > > On Mon, 07 Oct 2024 18:16:27 -0500 > > > ira.we...@intel.com wrote: > > > [snip] > > > > Simplify extent tracking with

Re: [PATCH v4 23/28] dax/bus: Factor out dev dax resize logic

2024-10-21 Thread Ira Weiny
Jonathan Cameron wrote: > On Mon, 07 Oct 2024 18:16:29 -0500 > Ira Weiny wrote: [snip] > > Signed-off-by: Ira Weiny > > --- > > Changes: > > [Jonathan: Fix handling of alloc] > > Trivial comments inline. > Not an area I know much about, so treat this

Re: [PATCH v4 13/28] cxl/mem: Expose DCD partition capabilities in sysfs

2024-10-16 Thread Ira Weiny
vailable. > > > > Expose dynamic capacity capabilities through sysfs. > > > > Signed-off-by: Navneet Singh > > Co-developed-by: Ira Weiny > > Signed-off-by: Ira Weiny > Some trivial stuff inline that I'm not that bothered about either way. >

Re: [PATCH v4 21/28] cxl/extent: Process DCD events and realize region extents

2024-10-17 Thread Ira Weiny
Jonathan Cameron wrote: > On Wed, 9 Oct 2024 14:49:09 -0500 > Ira Weiny wrote: > > > Li, Ming4 wrote: > > > On 10/8/2024 7:16 AM, ira.we...@intel.com wrote: > > > > From: Navneet Singh > > > > [snip] > > > > > >

Re: [PATCH v4 21/28] cxl/extent: Process DCD events and realize region extents

2024-10-17 Thread Ira Weiny
e DAX > > region driver can co-drive them and synchronize with the DAX layer. > > Synchronization and management is handled in a subsequent patch. > > > > Tag support within the DAX layer is not yet supported. To maintain > > compatibility legacy DAX/

Re: [PATCH v4 15/28] cxl/region: Refactor common create region code

2024-10-17 Thread Ira Weiny
Jonathan Cameron wrote: > On Mon, 07 Oct 2024 18:16:21 -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 bein

Re: [PATCH v4 02/28] printk: Add print format (%pra) for struct range

2024-10-17 Thread Ira Weiny
Bagas Sanjaya wrote: > On Mon, Oct 07, 2024 at 06:16:08PM -0500, Ira Weiny wrote: > > +Struct Range > > + > > + > > +:: > > + > > + %pra[range 0x6000-0x6fff] > > + %pra[range 0x6000] > &

Re: [PATCH v4 04/28] range: Add range_overlaps()

2024-10-10 Thread Ira Weiny
David Sterba wrote: > On Mon, Oct 07, 2024 at 06:16:10PM -0500, Ira Weiny wrote: > > --- a/include/linux/range.h >> +++ b/include/linux/range.h > > +/* True if any part of r1 overlaps r2 */ > > +static inline bool range_overlaps(struct range *r1, struct range *r2) >

Re: [PATCH v4 00/28] DCD: Add support for Dynamic Capacity Devices (DCD)

2024-10-10 Thread Ira Weiny
Fan Ni wrote: > On Tue, Oct 08, 2024 at 03:57:13PM -0700, Fan Ni wrote: > > On Mon, Oct 07, 2024 at 06:16:06PM -0500, Ira Weiny wrote: > > > A git tree of this series can be found here: > > > > > > https://github.com/weiny2/linux-kernel/tree/dcd-v4

Re: [PATCH v4 00/28] DCD: Add support for Dynamic Capacity Devices (DCD)

2024-10-10 Thread Ira Weiny
Fan Ni wrote: > On Tue, Oct 08, 2024 at 03:57:13PM -0700, Fan Ni wrote: > > On Mon, Oct 07, 2024 at 06:16:06PM -0500, Ira Weiny wrote: > > > A git tree of this series can be found here: > > > > > > https://github.com/weiny2/linux-kernel/tree/dcd-v4

  1   2   >