diff options
author | Alison Schofield <[email protected]> | 2023-11-13 14:13:24 -0800 |
---|---|---|
committer | Dan Williams <[email protected]> | 2023-12-04 17:19:03 -0800 |
commit | 659aa050a53817157b7459529538598a6449c1d3 (patch) | |
tree | 46f51a30dabf7415363a43fa47e4643262b66ec7 /scripts/generate_rust_analyzer.py | |
parent | e05501e8a84eee4f819f31b9ce663bddd01b3b69 (diff) |
kernel/resource: Increment by align value in get_free_mem_region()
Currently get_free_mem_region() searches for available capacity
in increments equal to the region size being requested. This can
cause the search to take giant steps through the resource leaving
needless gaps and missing available space.
Specifically 'cxl create-region' fails with ERANGE even though capacity
of the given size and CXL's expected 256M x InterleaveWays alignment can
be satisfied.
Replace the total-request-size increment with a next alignment increment
so that the next possible address is always examined for availability.
Fixes: 14b80582c43e ("resource: Introduce alloc_free_mem_region()")
Reported-by: Dmytro Adamenko <[email protected]>
Reported-by: Dan Williams <[email protected]>
Signed-off-by: Alison Schofield <[email protected]>
Reviewed-by: Dave Jiang <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Cc: Jason Gunthorpe <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
Diffstat (limited to 'scripts/generate_rust_analyzer.py')
0 files changed, 0 insertions, 0 deletions