[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 34/45] memory: reorder MemoryRegion fields
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 34/45] memory: reorder MemoryRegion fields |
Date: |
Thu, 17 Dec 2015 18:46:30 +0100 |
Order fields so that all fields accessed during a RAM read/write fit in
the same cache line.
Signed-off-by: Paolo Bonzini <address@hidden>
---
include/exec/memory.h | 24 ++++++++++++++----------
1 file changed, 14 insertions(+), 10 deletions(-)
diff --git a/include/exec/memory.h b/include/exec/memory.h
index 9bbd247..5b1fd12 100644
--- a/include/exec/memory.h
+++ b/include/exec/memory.h
@@ -159,27 +159,32 @@ typedef struct MemoryRegionIoeventfd
MemoryRegionIoeventfd;
struct MemoryRegion {
Object parent_obj;
+
/* All fields are private - violators will be prosecuted */
- const MemoryRegionOps *ops;
+
+ /* The following fields should fit in a cache line */
+ bool romd_mode;
+ bool ram;
+ bool subpage;
+ bool readonly; /* For RAM regions */
+ bool rom_device;
+ bool flush_coalesced_mmio;
+ bool global_locking;
+ uint8_t dirty_log_mask;
+ ram_addr_t ram_addr;
const MemoryRegionIOMMUOps *iommu_ops;
+
+ const MemoryRegionOps *ops;
void *opaque;
MemoryRegion *container;
Int128 size;
hwaddr addr;
void (*destructor)(MemoryRegion *mr);
- ram_addr_t ram_addr;
uint64_t align;
- bool subpage;
bool terminates;
- bool romd_mode;
- bool ram;
bool skip_dump;
- bool readonly; /* For RAM regions */
bool enabled;
- bool rom_device;
bool warning_printed; /* For reservations */
- bool flush_coalesced_mmio;
- bool global_locking;
uint8_t vga_logging_count;
MemoryRegion *alias;
hwaddr alias_offset;
@@ -189,7 +194,6 @@ struct MemoryRegion {
QTAILQ_ENTRY(MemoryRegion) subregions_link;
QTAILQ_HEAD(coalesced_ranges, CoalescedMemoryRange) coalesced;
const char *name;
- uint8_t dirty_log_mask;
unsigned ioeventfd_nb;
MemoryRegionIoeventfd *ioeventfds;
NotifierList iommu_notify;
--
2.5.0
- [Qemu-devel] [PULL 19/45] kvm: x86: add support for KVM_CAP_SPLIT_IRQCHIP, (continued)
- [Qemu-devel] [PULL 19/45] kvm: x86: add support for KVM_CAP_SPLIT_IRQCHIP, Paolo Bonzini, 2015/12/17
- [Qemu-devel] [PULL 23/45] cris: avoid "naked" qemu_log, Paolo Bonzini, 2015/12/17
- [Qemu-devel] [PULL 22/45] alpha: convert "naked" qemu_log to tracepoint, Paolo Bonzini, 2015/12/17
- [Qemu-devel] [PULL 24/45] microblaze: avoid "naked" qemu_log, Paolo Bonzini, 2015/12/17
- [Qemu-devel] [PULL 21/45] qemu-log: introduce qemu_log_separate, Paolo Bonzini, 2015/12/17
- [Qemu-devel] [PULL 27/45] tricore: avoid "naked" qemu_log, Paolo Bonzini, 2015/12/17
- [Qemu-devel] [PULL 25/45] s390x: avoid "naked" qemu_log, Paolo Bonzini, 2015/12/17
- [Qemu-devel] [PULL 26/45] ppc: cleanup logging, Paolo Bonzini, 2015/12/17
- [Qemu-devel] [PULL 29/45] user: introduce "-d page", Paolo Bonzini, 2015/12/17
- [Qemu-devel] [PULL 32/45] exec: always call qemu_get_ram_ptr within rcu_read_lock, Paolo Bonzini, 2015/12/17
- [Qemu-devel] [PULL 34/45] memory: reorder MemoryRegion fields,
Paolo Bonzini <=
- [Qemu-devel] [PULL 31/45] linux-user: convert DEBUG_SIGNAL logging to tracepoints, Paolo Bonzini, 2015/12/17
- [Qemu-devel] [PULL 30/45] linux-user: avoid "naked" qemu_log, Paolo Bonzini, 2015/12/17
- [Qemu-devel] [PULL 28/45] xtensa: avoid "naked" qemu_log, Paolo Bonzini, 2015/12/17
- [Qemu-devel] [PULL 35/45] memory: avoid unnecessary object_ref/unref, Paolo Bonzini, 2015/12/17
- [Qemu-devel] [PULL 40/45] rcu: optimize rcu_read_lock, Paolo Bonzini, 2015/12/17
- [Qemu-devel] [PULL 37/45] memory: extract first iteration of address_space_read and address_space_write, Paolo Bonzini, 2015/12/17
- [Qemu-devel] [PULL 41/45] target-i386: kvm: clear unusable segments' flags in migration, Paolo Bonzini, 2015/12/17
- [Qemu-devel] [PULL 43/45] scsi: always call notifier on async cancellation, Paolo Bonzini, 2015/12/17