Re: [PATCH 12/15] KVM: arm64: vgic-its: Pick cache victim based on usage count

Oliver Upton
2024-01-25T09:22:49Z

On Wed, Jan 24, 2024 at 08:49:06PM +0000, Oliver Upton wrote:

[...]

> +static struct vgic_translation_cache_entry *vgic_its_cache_victim(struct vgic_dist *dist)
> +{
> + struct vgic_translation_cache_entry *cte, *victim = NULL;
> + u64 min, tmp;
> +
> + /*
> + * Find the least used cache entry since the last cache miss, preferring
> + * older entries in the case of a tie. Note that usage accounting is
> + * deliberately non-atomic, so this is all best-effort.
> + */

This comment is stale, and does not reflect the fact that I'm very
obviously using atomics below.

--
Thanks,
Oliver