[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 01/28] memory: add early bail out from cpu_physical_m
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 01/28] memory: add early bail out from cpu_physical_memory_set_dirty_range |
Date: |
Mon, 8 Feb 2016 18:02:52 +0100 |
This condition is true in the common case, so we can cut out the body of
the function. In addition, this makes it easier for the compiler to do
at least partial inlining, even if it decides that fully inlining the
function is unreasonable.
Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
include/exec/ram_addr.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h
index 606e277..f2e872d 100644
--- a/include/exec/ram_addr.h
+++ b/include/exec/ram_addr.h
@@ -165,6 +165,10 @@ static inline void
cpu_physical_memory_set_dirty_range(ram_addr_t start,
unsigned long end, page;
unsigned long **d = ram_list.dirty_memory;
+ if (!mask && !xen_enabled()) {
+ return;
+ }
+
end = TARGET_PAGE_ALIGN(start + length) >> TARGET_PAGE_BITS;
page = start >> TARGET_PAGE_BITS;
if (likely(mask & (1 << DIRTY_MEMORY_MIGRATION))) {
--
1.8.3.1
- [Qemu-devel] [PULL 00/28] Misc changes for 2016-02-08, Paolo Bonzini, 2016/02/08
- [Qemu-devel] [PULL 01/28] memory: add early bail out from cpu_physical_memory_set_dirty_range,
Paolo Bonzini <=
- [Qemu-devel] [PULL 03/28] qemu-char: Keep pty slave file descriptor open until the master is closed, Paolo Bonzini, 2016/02/08
- [Qemu-devel] [PULL 02/28] memory: RCU ram_list.dirty_memory[] for safe RAM hotplug, Paolo Bonzini, 2016/02/08
- [Qemu-devel] [PULL 06/28] scsi: push WWN fields up to SCSIDevice, Paolo Bonzini, 2016/02/08
- [Qemu-devel] [PULL 07/28] scsi-generic: grab device and port SAS addresses from backend, Paolo Bonzini, 2016/02/08
- [Qemu-devel] [PULL 05/28] include/qemu/atomic.h: default to __atomic functions, Paolo Bonzini, 2016/02/08
- [Qemu-devel] [PULL 04/28] configure: sanity check the glib library that pkg-config finds, Paolo Bonzini, 2016/02/08
- [Qemu-devel] [PULL 09/28] qemu-nbd: Fix unintended texi verbatim formatting, Paolo Bonzini, 2016/02/08
- [Qemu-devel] [PULL 12/28] scripts/kvm/kvm_stat: Fix tracefs access checking, Paolo Bonzini, 2016/02/08
- [Qemu-devel] [PULL 14/28] kvm-all: trace: strerror fixup, Paolo Bonzini, 2016/02/08
- [Qemu-devel] [PULL 17/28] target-i386: Introduce mo_stacksize, Paolo Bonzini, 2016/02/08