KVM: halt_polling: improve grow/shrink settings
Right now halt_poll_ns can be change during runtime. The grow and shrink factors can only be set during module load. Lets fix several aspects of grow shrink: - make grow/shrink changeable by root - make all variables unsigned int - read the variables once to prevent races Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:

gecommit door
Paolo Bonzini

bovenliggende
efef127c30
commit
6b6de68c63
@@ -359,14 +359,15 @@ TRACE_EVENT(
|
||||
#endif
|
||||
|
||||
TRACE_EVENT(kvm_halt_poll_ns,
|
||||
TP_PROTO(bool grow, unsigned int vcpu_id, int new, int old),
|
||||
TP_PROTO(bool grow, unsigned int vcpu_id, unsigned int new,
|
||||
unsigned int old),
|
||||
TP_ARGS(grow, vcpu_id, new, old),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field(bool, grow)
|
||||
__field(unsigned int, vcpu_id)
|
||||
__field(int, new)
|
||||
__field(int, old)
|
||||
__field(unsigned int, new)
|
||||
__field(unsigned int, old)
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
@@ -376,7 +377,7 @@ TRACE_EVENT(kvm_halt_poll_ns,
|
||||
__entry->old = old;
|
||||
),
|
||||
|
||||
TP_printk("vcpu %u: halt_poll_ns %d (%s %d)",
|
||||
TP_printk("vcpu %u: halt_poll_ns %u (%s %u)",
|
||||
__entry->vcpu_id,
|
||||
__entry->new,
|
||||
__entry->grow ? "grow" : "shrink",
|
||||
|
Verwijs in nieuw issue
Block a user