summaryrefslogtreecommitdiffstats
path: root/mm/debug_vm_pgtable.c
diff options
context:
space:
mode:
authorPeter Xu <peterx@redhat.com>2021-11-05 21:36:05 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2021-11-06 21:30:33 +0100
commit230100321518a4e3a027b3b1b7e93b3e02324def (patch)
tree07e4a5bd09f430ee6f4a73a1700a612956ce99d0 /mm/debug_vm_pgtable.c
parentmm/smaps: use vma->vm_pgoff directly when counting partial swap (diff)
downloadlinux-230100321518a4e3a027b3b1b7e93b3e02324def.tar.xz
linux-230100321518a4e3a027b3b1b7e93b3e02324def.zip
mm/smaps: simplify shmem handling of pte holes
Firstly, check_shmem_swap variable is actually not necessary, because it's always set with pte_hole hook; checking each would work. Meanwhile, the check within smaps_pte_entry is not easy to follow. E.g., pte_none() check is not needed as "!pte_present && !is_swap_pte" is the same. Since at it, use the pte_hole() helper rather than dup the page cache lookup. Still keep the CONFIG_SHMEM part so the code can be optimized to nop for !SHMEM. There will be a very slight functional change in smaps_pte_entry(), that for !SHMEM we'll return early for pte_none (before checking page==NULL), but that's even nicer. Link: https://lkml.kernel.org/r/20210917164756.8586-4-peterx@redhat.com Signed-off-by: Peter Xu <peterx@redhat.com> Cc: Hugh Dickins <hughd@google.com> Cc: Matthew Wilcox <willy@infradead.org> Cc: Vlastimil Babka <vbabka@suse.cz> Cc: Andrea Arcangeli <aarcange@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/debug_vm_pgtable.c')
0 files changed, 0 insertions, 0 deletions