]> xenbits.xensource.com Git - pvdrivers/win/xenbus.git/commit
Re-work Cache->Cursor handling in CacheDestroySlab()
authorOwen Smith <owen.smith@cloud.com>
Mon, 20 May 2024 09:15:20 +0000 (10:15 +0100)
committerPaul Durrant <pdurrant@amazon.com>
Fri, 31 May 2024 10:19:41 +0000 (11:19 +0100)
commitb96a064701daf21c90bcd84a12c92ae26aad9d74
treecc057ec2498349b347127db7086039d251516261
parent93111835893548709e2465d1869eed469d1f4254
Re-work Cache->Cursor handling in CacheDestroySlab()

Since the advent of lazy slab spilling in commit 7f8b622668fb ("Improve the
performance of the slab allocator"), if the cursor slab is being destroyed,
it no longer means it is the only slab in the last. Remove the ASSERTions
and simply set the new cursor to the current cursor's Flink. This will
either be the next slab which (because slabs are kept in decreasing order
of occupancy) will also be empty, or it will be the list anchor (which
indicates that all slabs in the list are full). Call CacheAudit() after
slab removal to re-verify these invariants.

Also clean up a typo in a commit comment in CacheAudit().

Signed-off-by: Owen Smith <owen.smith@cloud.com>
[Re-worked original patch]
Signed-off-by: Paul Durrant <pdurrant@amazon.com>
src/xenbus/cache.c