]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
cxl/region: Split commit_store() into __commit() and queue_reset() helpers
authorDan Williams <dan.j.williams@intel.com>
Fri, 11 Jul 2025 23:49:29 +0000 (16:49 -0700)
committerDave Jiang <dave.jiang@intel.com>
Wed, 16 Jul 2025 18:34:36 +0000 (11:34 -0700)
commita235d7d963e82ac026eca968b71da376534dc9b9
treeb121e33f6bfae52caed8f9bd18d3064b06dc8ed4
parent55a89d9c99a9a79a7c2c7cb88c2ae9e86868a60b
cxl/region: Split commit_store() into __commit() and queue_reset() helpers

The complexity of dropping the lock is removed in favor of splitting commit
operations to a helper, and leaving all the complexities of "decommit" for
commit_store() to coordinate the different locking contexts.

The CPU cache-invalidation in the decommit path is solely handled now by
cxl_region_decode_reset(). Previously the CPU caches were being needlessly
flushed twice in the decommit path where the first flush had no guarantee
that the memory would not be immediately re-dirtied.

Cc: Davidlohr Bueso <dave@stgolabs.net>
Cc: Jonathan Cameron <jonathan.cameron@huawei.com>
Cc: Dave Jiang <dave.jiang@intel.com>
Cc: Alison Schofield <alison.schofield@intel.com>
Cc: Vishal Verma <vishal.l.verma@intel.com>
Cc: Ira Weiny <ira.weiny@intel.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Reviewed-by: Fabio M. De Francesco <fabio.m.de.francesco@linux.intel.com>
Link: https://patch.msgid.link/20250711234932.671292-6-dan.j.williams@intel.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
drivers/cxl/core/region.c