Commit 97b6847
KVM: Cap vcpu->halt_poll_ns before halting rather than after
Cap vcpu->halt_poll_ns based on the max halt polling time just before
halting, rather than after the last halt. This arguably provides better
accuracy if an admin disables halt polling in between halts, although
the improvement is nominal.
A side-effect of this change is that grow_halt_poll_ns() no longer needs
to access vcpu->kvm->max_halt_poll_ns, which will be useful in a future
commit where the max halt polling time can come from the module parameter
halt_poll_ns instead.
Signed-off-by: David Matlack <dmatlack@google.com>
Message-Id: <20221117001657.1067231-2-dmatlack@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>1 parent 6d3085e commit 97b6847
1 file changed
Lines changed: 6 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3377 | 3377 | | |
3378 | 3378 | | |
3379 | 3379 | | |
3380 | | - | |
3381 | | - | |
3382 | | - | |
3383 | 3380 | | |
3384 | 3381 | | |
3385 | 3382 | | |
| |||
3492 | 3489 | | |
3493 | 3490 | | |
3494 | 3491 | | |
3495 | | - | |
3496 | 3492 | | |
3497 | 3493 | | |
| 3494 | + | |
3498 | 3495 | | |
3499 | 3496 | | |
| 3497 | + | |
| 3498 | + | |
| 3499 | + | |
| 3500 | + | |
| 3501 | + | |
3500 | 3502 | | |
3501 | 3503 | | |
3502 | 3504 | | |
| |||
0 commit comments