From 612263cf33062f7441a5d0e3b37c65991fdc3210 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Wed, 9 Dec 2015 11:44:25 +0100 Subject: memory: avoid unnecessary object_ref/unref For the common case of DMA into non-hotplugged RAM, it is unnecessary but expensive to do object_ref/unref. Add back an owner field to MemoryRegion, so that these memory regions can skip the reference counting. Signed-off-by: Paolo Bonzini --- include/exec/memory.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/exec/memory.h') diff --git a/include/exec/memory.h b/include/exec/memory.h index 5b1fd123cd..24b7cba737 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -172,6 +172,7 @@ struct MemoryRegion { bool global_locking; uint8_t dirty_log_mask; ram_addr_t ram_addr; + Object *owner; const MemoryRegionIOMMUOps *iommu_ops; const MemoryRegionOps *ops; -- cgit v1.2.3