qemu-patch-raspberry4/docs
Emilio G. Cota 194125e3eb translate-all: protect TB jumps with a per-destination-TB lock
This applies to both user-mode and !user-mode emulation.

Instead of relying on a global lock, protect the list of incoming
jumps with tb->jmp_lock. This lock also protects tb->cflags,
so update all tb->cflags readers outside tb->jmp_lock to use
atomic reads via tb_cflags().

In order to find the destination TB (and therefore its jmp_lock)
from the origin TB, we introduce tb->jmp_dest[].

I considered not using a linked list of jumps, which simplifies
code and makes the struct smaller. However, it unnecessarily increases
memory usage, which results in a performance decrease. See for
instance these numbers booting+shutting down debian-arm:
                      Time (s)  Rel. err (%)  Abs. err (s)  Rel. slowdown (%)
------------------------------------------------------------------------------
 before                  20.88          0.74      0.154512                 0.
 after                   20.81          0.38      0.079078        -0.33524904
 GTree                   21.02          0.28      0.058856         0.67049808
 GHashTable + xxhash     21.63          1.08      0.233604          3.5919540

Using a hash table or a binary tree to keep track of the jumps
doesn't really pay off, not only due to the increased memory usage,
but also because most TBs have only 0 or 1 jumps to them. The maximum
number of jumps when booting debian-arm that I measured is 35, but
as we can see in the histogram below a TB with that many incoming jumps
is extremely rare; the average TB has 0.80 incoming jumps.

n_jumps: 379208; avg jumps/tb: 0.801099
dist: [0.0,1.0)|▄█▁▁▁▁▁▁▁▁▁▁▁ ▁▁▁▁▁▁ ▁▁▁  ▁▁▁     ▁|[34.0,35.0]

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Emilio G. Cota <cota@braap.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2018-06-15 08:18:48 -10:00
..
config
devel translate-all: protect TB jumps with a per-destination-TB lock 2018-06-15 08:18:48 -10:00
interop acpi, vhost, misc: fixes, features 2018-06-04 10:15:16 +01:00
specs Merge tpm 2018/05/23 v4 2018-05-29 09:57:09 +01:00
spin
amd-memory-encryption.txt target/i386: add Secure Encrypted Virtualization (SEV) object 2018-03-13 12:04:03 +01:00
block-replication.txt
bootindex.txt
can.txt net/can: documentation 2018-02-13 11:44:13 +01:00
ccid.txt
COLO-FT.txt
colo-proxy.txt
generic-loader.txt
igd-assign.txt
image-fuzzer.txt
memory-hotplug.txt
multi-thread-compression.txt
multiseat.txt
nvdimm.txt nvdimm: make persistence option symbolic 2018-06-11 22:19:57 +03:00
pci_expander_bridge.txt
pcie.txt docs: pcie: Spell out machine type needs for PCIe features 2018-03-01 16:25:37 +02:00
pcie_pci_bridge.txt pci: removed the is_express field since a uniform interface was inserted 2018-02-08 21:06:41 +02:00
pr-manager.rst
pvrdma.txt docs: add pvrdma device documentation. 2018-02-19 13:03:24 +02:00
qcow2-cache.txt docs: Document the new default sizes of the qcow2 caches 2018-05-15 16:15:21 +02:00
qdev-device-use.txt net: Remove the deprecated "vlan" parameter 2018-05-14 15:47:14 +08:00
qemu-block-drivers.texi docs: Document share-rw property more thoroughly 2018-02-13 12:27:17 +01:00
qemu_logo.pdf
qemupciserial.inf
rdma.txt Use HTTPS for qemu.org and other domains 2017-11-21 13:34:13 +00:00
replay.txt replay: update documentation 2018-03-12 17:10:38 +01:00
spice-port-fqdn.txt
throttle.txt
usb-storage.txt
usb2.txt usb: update docs 2018-06-12 12:06:52 +02:00
virtio-balloon-stats.txt virtio-balloon: add hugetlb page allocation counts 2018-05-23 03:14:40 +03:00
xbzrle.txt
xen-save-devices-state.txt Fix up dangling references to qmp-commands.* in comment and doc 2018-03-02 13:48:26 -06:00