Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
If prefix caching is enabled, and the blocks are swapped out, the left-over caches will be in the evictor group if there are no references. In the meantime, the cache blocks will be evicted, for example, 2 out of 10 cached blocks. Let's say the remaining 8 blocks in the evictor are the last available blocks in the allocator, and the sequence wants to swapped in, the free blocks will count as 8. The touched blocks is calculated as 2, which is incorrect because the cache is not shared by any other blocks. In this case the correct touched blocks should be 10, and can't swap in. In the regular case, if the lookahead slots are more than the free slots, it first need to occupy the block containing the free slots, then plus the remaining required blocks.