Skip to contentSkip to conversation

xen: Remove invalidation of mapcache_grants on IOREQ_TYPE_INVALIDATE

PATCH In review Edgar E. Iglesias 2 participants 3 messages Feb 6, 2025 – Mar 7, 2025

lore
Share & tools
lore
#0 lore raw

cover xen: Remove invalidation of mapcache_grants on IOREQ_TYPE_INVALIDATE

From: "Edgar E. Iglesias" <[email protected]>

Olaf reported a slowdown in boot time on x86 HVM guests and Stefano provided a patch that removes the invalidation of the grants mapcache since not needed, more details here:
https://lore.kernel.org/all/Z5oIvUINVDfrrVla@zapote/T/

Cheers,
Edgar

Stefano Stabellini (1):
xen: No need to flush the mapcache for grants

 hw/xen/xen-mapcache.c | 1 -
 1 file changed, 1 deletion(-)
Signature · 1 line
2.43.0
#1 lore raw

PATCH 1/1 xen: No need to flush the mapcache for grants

From: Stefano Stabellini <[email protected]>

On IOREQ_TYPE_INVALIDATE we need to invalidate the mapcache for regular mappings. Since recently we started reusing the mapcache also to keep track of grants mappings. However, there is no need to remove grant mappings on IOREQ_TYPE_INVALIDATE requests, we shouldn't do that. So remove the function call.

Fixes 9ecdd4bf08 (xen: mapcache: Add support for grant mappings)
---
 hw/xen/xen-mapcache.c | 1 -
 1 file changed, 1 deletion(-)
hw/xen/xen-mapcache.c +0 -1
index 00bfbcc6fb..698b5c53ed 100644
@@ -700,7 +700,6 @@ void xen_invalidate_map_cache(void)
     bdrv_drain_all();
 
     xen_invalidate_map_cache_single(mapcache);
-    xen_invalidate_map_cache_single(mapcache_grants);
 }
 
 static uint8_t *xen_replace_cache_entry_unlocked(MapCache *mc,
Signature · 1 line
2.43.0
Reviewed-by on v1 1/1
#2 lore raw

Re: [PATCH v1 1/1] xen: No need to flush the mapcache for grants

Quoted 8 lines · Edgar E. Iglesias

From: Stefano Stabellini <[email protected]>

On IOREQ_TYPE_INVALIDATE we need to invalidate the mapcache for regular mappings. Since recently we started reusing the mapcache also to keep track of grants mappings. However, there is no need to remove grant mappings on IOREQ_TYPE_INVALIDATE requests, we shouldn't do that. So remove the function call.

Quoted 6 lines
Fixes 9ecdd4bf08 (xen: mapcache: Add support for grant mappings)

Thanks,

Signature · 1 line
Anthony PERARD