summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2022-11-04 01:31:00 +0100
committerDan Williams <dan.j.williams@intel.com>2022-11-05 00:03:43 +0100
commit8f401ec1c8975eabfe4c089de91cbe058deabf71 (patch)
treecc1d28f74278adbc2279efa2a926194f16b6f0f4 /tools
parentcxl/region: Fix 'distance' calculation with passthrough ports (diff)
downloadlinux-8f401ec1c8975eabfe4c089de91cbe058deabf71.tar.xz
linux-8f401ec1c8975eabfe4c089de91cbe058deabf71.zip
cxl/region: Recycle region ids
At region creation time the next region-id is atomically cached so that there is predictability of region device names. If that region is destroyed and then a new one is created the region id increments. That ends up looking like a memory leak, or is otherwise surprising that identifiers roll forward even after destroying all previously created regions. Try to reuse rather than free old region ids at region release time. While this fixes a cosmetic issue, the needlessly advancing memory region-id gives the appearance of a memory leak, hence the "Fixes" tag, but no "Cc: stable" tag. Cc: Ben Widawsky <bwidawsk@kernel.org> Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com> Fixes: 779dd20cfb56 ("cxl/region: Add region creation support") Reviewed-by: Dave Jiang <dave.jiang@intel.com> Reviewed-by: Vishal Verma <vishal.l.verma@intel.com> Link: https://lore.kernel.org/r/166752186062.947915.13200195701224993317.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions