linux/include/trace/events
Peter Xu fb04a1eddb KVM: X86: Implement ring-based dirty memory tracking
This patch is heavily based on previous work from Lei Cao
<lei.cao@stratus.com> and Paolo Bonzini <pbonzini@redhat.com>. [1]

KVM currently uses large bitmaps to track dirty memory.  These bitmaps
are copied to userspace when userspace queries KVM for its dirty page
information.  The use of bitmaps is mostly sufficient for live
migration, as large parts of memory are be dirtied from one log-dirty
pass to another.  However, in a checkpointing system, the number of
dirty pages is small and in fact it is often bounded---the VM is
paused when it has dirtied a pre-defined number of pages. Traversing a
large, sparsely populated bitmap to find set bits is time-consuming,
as is copying the bitmap to user-space.

A similar issue will be there for live migration when the guest memory
is huge while the page dirty procedure is trivial.  In that case for
each dirty sync we need to pull the whole dirty bitmap to userspace
and analyse every bit even if it's mostly zeros.

The preferred data structure for above scenarios is a dense list of
guest frame numbers (GFN).  This patch series stores the dirty list in
kernel memory that can be memory mapped into userspace to allow speedy
harvesting.

This patch enables dirty ring for X86 only.  However it should be
easily extended to other archs as well.

[1] https://patchwork.kernel.org/patch/10471409/

Signed-off-by: Lei Cao <lei.cao@stratus.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <20201001012222.5767-1-peterx@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-11-15 09:49:15 -05:00
..
9p.h
afs.h afs: Fix afs_invalidatepage to adjust the dirty region 2020-10-29 13:53:04 +00:00
alarmtimer.h
asoc.h
avc.h selinux: add basic filtering for audit trace events 2020-08-21 17:07:29 -04:00
bcache.h bcache: add set_uuid in struct cache_set 2020-10-02 14:25:30 -06:00
block.h
bpf_test_run.h
bridge.h
btrfs.h btrfs: use own btree inode io_tree owner id 2020-10-07 12:13:22 +02:00
cachefiles.h
cgroup.h
clk.h
cma.h
compaction.h
context_tracking.h
cpuhp.h
devfreq.h
devlink.h devlink: Add a tracepoint for trap reports 2020-09-30 18:01:26 -07:00
dma_fence.h
erofs.h
ext4.h ext4: disable fast commit with data journalling 2020-11-06 23:01:05 -05:00
f2fs.h f2fs: trace: fix typo 2020-09-11 11:11:25 -07:00
fib.h
fib6.h
filelock.h locks: Remove extra "0x" in tracepoint format specifier 2020-09-01 18:09:34 -04:00
filemap.h
fs_dax.h
fscache.h
fsi.h
fsi_master_aspeed.h
fsi_master_ast_cf.h
fsi_master_gpio.h
gpio.h
gpu_mem.h
host1x.h
huge_memory.h
hwmon.h
i2c.h
ib_mad.h
ib_umad.h
initcall.h
intel-sst.h
intel_iommu.h
intel_ish.h
io_uring.h
iocost.h iocost: add iocg_forgive_debt tracepoint 2020-09-25 08:35:02 -06:00
iommu.h
ipi.h
irq.h
irq_matrix.h
iscsi.h
jbd2.h
kmem.h
kvm.h KVM: X86: Implement ring-based dirty memory tracking 2020-11-15 09:49:15 -05:00
kyber.h
libata.h
lock.h
mce.h
mdio.h
migrate.h mm/vmstat: add events for THP migration without split 2020-08-12 10:57:57 -07:00
mlxsw.h
mmap.h
mmc.h
mmflags.h mm: Add PG_arch_2 page flag 2020-09-04 12:46:06 +01:00
module.h
napi.h
nbd.h
neigh.h
net.h
net_probe_common.h
nilfs2.h
nmi.h
objagg.h
oom.h
page_isolation.h
page_pool.h
page_ref.h
pagemap.h
percpu.h
power.h
power_cpu_migrate.h
preemptirq.h
printk.h
pwc.h
pwm.h
qdisc.h
qla.h
qrtr.h
random.h random32: add a tracepoint for prandom_u32() 2020-08-13 15:11:14 -07:00
rcu.h rcu/trace: Print negative GP numbers correctly 2020-08-24 18:36:04 -07:00
rdma.h RDMA/core: Move the rdma_show_ib_cm_event() macro 2020-08-24 16:01:47 -03:00
rdma_core.h
regulator.h
rpcgss.h
rpcrdma.h NFS Client Updates for Linux 5.10 2020-10-20 13:26:30 -07:00
rpm.h
rseq.h
rtc.h
rxrpc.h rxrpc: Fix a missing NULL-pointer check in a trace 2020-09-14 16:18:59 +01:00
sched.h sched/debug: Add new tracepoint to track cpu_capacity 2020-10-03 16:30:52 +02:00
scmi.h
scsi.h
sctp.h
signal.h
siox.h
skb.h
smbus.h
sock.h
spi.h
spmi.h
sunrpc.h SUNRPC: Fix general protection fault in trace_rpc_xdr_overflow() 2020-11-05 17:20:12 -05:00
sunvnet.h
swiotlb.h
syscalls.h
target.h scsi: target: core: Add CONTROL field for trace events 2020-10-02 18:36:19 -04:00
task.h
tcp.h
tegra_apb_dma.h
thermal.h
thermal_power_allocator.h
thp.h
timer.h
tlb.h
udp.h
ufs.h
v4l2.h
vb2.h
vmscan.h
vsock_virtio_transport_common.h
wbt.h
workqueue.h
writeback.h
xdp.h
xen.h x86/paravirt: Remove set_pte_at() pv-op 2020-08-15 13:52:12 +02:00