Lines Matching full:mss
673 static void smaps_page_accumulate(struct mem_size_stats *mss, in smaps_page_accumulate() argument
677 mss->pss += pss; in smaps_page_accumulate()
680 mss->pss_anon += pss; in smaps_page_accumulate()
682 mss->pss_shmem += pss; in smaps_page_accumulate()
684 mss->pss_file += pss; in smaps_page_accumulate()
687 mss->pss_locked += pss; in smaps_page_accumulate()
690 mss->pss_dirty += pss; in smaps_page_accumulate()
692 mss->private_dirty += size; in smaps_page_accumulate()
694 mss->shared_dirty += size; in smaps_page_accumulate()
697 mss->private_clean += size; in smaps_page_accumulate()
699 mss->shared_clean += size; in smaps_page_accumulate()
703 static void smaps_account(struct mem_size_stats *mss, struct page *page, in smaps_account() argument
716 mss->anonymous += size; in smaps_account()
719 mss->lazyfree += size; in smaps_account()
723 mss->ksm += size; in smaps_account()
725 mss->resident += size; in smaps_account()
728 mss->referenced += size; in smaps_account()
746 smaps_page_accumulate(mss, folio, size, size << PSS_SHIFT, in smaps_account()
760 smaps_page_accumulate(mss, folio, PAGE_SIZE, pss, in smaps_account()
769 struct mem_size_stats *mss = walk->private; in smaps_pte_hole() local
772 mss->swap += shmem_partial_swap_usage(walk->vma->vm_file->f_mapping, in smaps_pte_hole()
795 struct mem_size_stats *mss = walk->private; in smaps_pte_entry() local
813 mss->swap += PAGE_SIZE; in smaps_pte_entry()
819 mss->swap_pss += pss_delta; in smaps_pte_entry()
821 mss->swap_pss += (u64)PAGE_SIZE << PSS_SHIFT; in smaps_pte_entry()
836 smaps_account(mss, page, false, young, dirty, locked, present); in smaps_pte_entry()
843 struct mem_size_stats *mss = walk->private; in smaps_pmd_entry() local
863 mss->anonymous_thp += HPAGE_PMD_SIZE; in smaps_pmd_entry()
865 mss->shmem_thp += HPAGE_PMD_SIZE; in smaps_pmd_entry()
869 mss->file_thp += HPAGE_PMD_SIZE; in smaps_pmd_entry()
871 smaps_account(mss, page, true, pmd_young(*pmd), pmd_dirty(*pmd), in smaps_pmd_entry()
1008 struct mem_size_stats *mss = walk->private; in smaps_hugetlb_range() local
1028 mss->shared_hugetlb += huge_page_size(hstate_vma(vma)); in smaps_hugetlb_range()
1030 mss->private_hugetlb += huge_page_size(hstate_vma(vma)); in smaps_hugetlb_range()
1053 * address @start, and keep them in @mss.
1058 struct mem_size_stats *mss, unsigned long start) in smap_gather_stats() argument
1081 mss->swap += shmem_swapped; in smap_gather_stats()
1089 walk_page_vma(vma, ops, mss); in smap_gather_stats()
1091 walk_page_range(vma->vm_mm, start, vma->vm_end, ops, mss); in smap_gather_stats()
1098 static void __show_smap(struct seq_file *m, const struct mem_size_stats *mss, in __show_smap() argument
1101 SEQ_PUT_DEC("Rss: ", mss->resident); in __show_smap()
1102 SEQ_PUT_DEC(" kB\nPss: ", mss->pss >> PSS_SHIFT); in __show_smap()
1103 SEQ_PUT_DEC(" kB\nPss_Dirty: ", mss->pss_dirty >> PSS_SHIFT); in __show_smap()
1110 mss->pss_anon >> PSS_SHIFT); in __show_smap()
1112 mss->pss_file >> PSS_SHIFT); in __show_smap()
1114 mss->pss_shmem >> PSS_SHIFT); in __show_smap()
1116 SEQ_PUT_DEC(" kB\nShared_Clean: ", mss->shared_clean); in __show_smap()
1117 SEQ_PUT_DEC(" kB\nShared_Dirty: ", mss->shared_dirty); in __show_smap()
1118 SEQ_PUT_DEC(" kB\nPrivate_Clean: ", mss->private_clean); in __show_smap()
1119 SEQ_PUT_DEC(" kB\nPrivate_Dirty: ", mss->private_dirty); in __show_smap()
1120 SEQ_PUT_DEC(" kB\nReferenced: ", mss->referenced); in __show_smap()
1121 SEQ_PUT_DEC(" kB\nAnonymous: ", mss->anonymous); in __show_smap()
1122 SEQ_PUT_DEC(" kB\nKSM: ", mss->ksm); in __show_smap()
1123 SEQ_PUT_DEC(" kB\nLazyFree: ", mss->lazyfree); in __show_smap()
1124 SEQ_PUT_DEC(" kB\nAnonHugePages: ", mss->anonymous_thp); in __show_smap()
1125 SEQ_PUT_DEC(" kB\nShmemPmdMapped: ", mss->shmem_thp); in __show_smap()
1126 SEQ_PUT_DEC(" kB\nFilePmdMapped: ", mss->file_thp); in __show_smap()
1127 SEQ_PUT_DEC(" kB\nShared_Hugetlb: ", mss->shared_hugetlb); in __show_smap()
1129 mss->private_hugetlb >> 10, 7); in __show_smap()
1130 SEQ_PUT_DEC(" kB\nSwap: ", mss->swap); in __show_smap()
1132 mss->swap_pss >> PSS_SHIFT); in __show_smap()
1134 mss->pss_locked >> PSS_SHIFT); in __show_smap()
1141 struct mem_size_stats mss = {}; in show_smap() local
1143 smap_gather_stats(vma, &mss, 0); in show_smap()
1152 __show_smap(m, &mss, false); in show_smap()
1168 struct mem_size_stats mss = {}; in show_smaps_rollup() local
1196 smap_gather_stats(vma, &mss, 0); in show_smaps_rollup()
1255 smap_gather_stats(vma, &mss, 0); in show_smaps_rollup()
1262 smap_gather_stats(vma, &mss, last_vma_end); in show_smaps_rollup()
1273 __show_smap(m, &mss, true); in show_smaps_rollup()