You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
kerf: Compute pool availability from /proc/iomem in kerf show
The baseline device tree only snapshots the memory pool at init time,
so kerf show kept printing the full pool size even after instances
allocated memory from it. With lazy_cma the pool and every allocation
carved out of it are registered in /proc/iomem, so use that as the
single source of truth.
Centralize /proc/iomem parsing in resources.py with a shared line
parser, a canonical pool lookup keyed on MULTIKERNEL_POOL_NAME, and a
new get_pool_allocated_bytes() that sums all regions nested inside the
pool range, merging overlapping and nested intervals to avoid double
counting. Replace the duplicated pool-lookup copies in init and the
dtc validator with the canonical helper; the validator's old copy
matched any line containing "multikernel" and could grab the wrong
region.
kerf show now prints Pool Allocated and Pool Available lines derived
from /proc/iomem, falling back to the baseline snapshot when the pool
is not registered.
Signed-off-by: Cong Wang <cwang@multikernel.io>
0 commit comments