summaryrefslogtreecommitdiff
path: root/fs/signalfd.c
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2022-04-29 04:04:10 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2022-06-20 13:21:32 +0300
commit8e1c69149f27189cff93a0cfe9402e576d89ce29 (patch)
tree36e76246c10090ba17890a7123785959dbb9cf98 /fs/signalfd.c
parenta1040b0d42acf69bb4f6dbdc54c2dcd78eea1de5 (diff)
downloadlinux-8e1c69149f27189cff93a0cfe9402e576d89ce29.tar.xz
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 <seanjc@google.com> Message-Id: <20220429010416.2788472-5-seanjc@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'fs/signalfd.c')
0 files changed, 0 insertions, 0 deletions