diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2021-09-16 18:15:36 +0000 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2021-10-18 14:43:44 -0400 |
commit | 869b44211adc878be7149cc4ae57207f924f7390 (patch) | |
tree | d42d05ac366c18ff3ed79cea7ef335074f77971a /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | c68dc1b577eabd5605c6c7c08f3e07ae18d30d5d (diff) |
kvm: x86: protect masterclock with a seqcount
Protect the reference point for kvmclock with a seqcount, so that
kvmclock updates for all vCPUs can proceed in parallel. Xen runstate
updates will also run in parallel and not bounce the kvmclock cacheline.
Of the variables that were protected by pvclock_gtod_sync_lock,
nr_vcpus_matched_tsc is different because it is updated outside
pvclock_update_vm_gtod_copy and read inside it. Therefore, we
need to keep it protected by a spinlock. In fact it must now
be a raw spinlock, because pvclock_update_vm_gtod_copy, being the
write-side of a seqcount, is non-preemptible. Since we already
have tsc_write_lock which is a raw spinlock, we can just use
tsc_write_lock as the lock that protects the write-side of the
seqcount.
Co-developed-by: Oliver Upton <oupton@google.com>
Message-Id: <20210916181538.968978-6-oupton@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions