diff options
| author | Sean Christopherson <[email protected]> | 2022-04-29 01:04:10 +0000 |
|---|---|---|
| committer | Paolo Bonzini <[email protected]> | 2022-06-20 06:21:32 -0400 |
| commit | 8e1c69149f27189cff93a0cfe9402e576d89ce29 (patch) | |
| tree | 36e76246c10090ba17890a7123785959dbb9cf98 /tools/perf/scripts/python | |
| parent | a1040b0d42acf69bb4f6dbdc54c2dcd78eea1de5 (diff) | |
KVM: Avoid pfn_to_page() and vice versa when releasing pages
Invert the order of KVM's page/pfn release helpers so that the "inner"
helper operates on a page instead of a pfn. As pointed out by Linus[*],
converting between struct page and a pfn isn't necessarily cheap, and
that's not even counting the overhead of is_error_noslot_pfn() and
kvm_is_reserved_pfn(). Even if the checks were dirt cheap, there's no
reason to convert from a page to a pfn and back to a page, just to mark
the page dirty/accessed or to put a reference to the page.
Opportunistically drop a stale declaration of kvm_set_page_accessed()
from kvm_host.h (there was no implementation).
No functional change intended.
[*] https://lore.kernel.org/all/CAHk-=wifQimj2d6npq-wCi5onYPjzQg4vyO4tFcPJJZr268cRw@mail.gmail.com
Signed-off-by: Sean Christopherson <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions