Lines Matching refs:mss
422 static void smaps_page_accumulate(struct mem_size_stats *mss, in smaps_page_accumulate() argument
426 mss->pss += pss; in smaps_page_accumulate()
429 mss->pss_anon += pss; in smaps_page_accumulate()
431 mss->pss_shmem += pss; in smaps_page_accumulate()
433 mss->pss_file += pss; in smaps_page_accumulate()
436 mss->pss_locked += pss; in smaps_page_accumulate()
440 mss->private_dirty += size; in smaps_page_accumulate()
442 mss->shared_dirty += size; in smaps_page_accumulate()
445 mss->private_clean += size; in smaps_page_accumulate()
447 mss->shared_clean += size; in smaps_page_accumulate()
451 static void smaps_account(struct mem_size_stats *mss, struct page *page, in smaps_account() argument
463 mss->anonymous += size; in smaps_account()
465 mss->lazyfree += size; in smaps_account()
468 mss->resident += size; in smaps_account()
471 mss->referenced += size; in smaps_account()
489 smaps_page_accumulate(mss, page, size, size << PSS_SHIFT, dirty, in smaps_account()
498 smaps_page_accumulate(mss, page, PAGE_SIZE, pss, dirty, locked, in smaps_account()
507 struct mem_size_stats *mss = walk->private; in smaps_pte_hole() local
509 mss->swap += shmem_partial_swap_usage( in smaps_pte_hole()
521 struct mem_size_stats *mss = walk->private; in smaps_pte_entry() local
537 mss->swap += PAGE_SIZE; in smaps_pte_entry()
543 mss->swap_pss += pss_delta; in smaps_pte_entry()
545 mss->swap_pss += (u64)PAGE_SIZE << PSS_SHIFT; in smaps_pte_entry()
552 } else if (unlikely(IS_ENABLED(CONFIG_SHMEM) && mss->check_shmem_swap in smaps_pte_entry()
557 mss->swap += PAGE_SIZE; in smaps_pte_entry()
564 smaps_account(mss, page, false, young, dirty, locked, migration); in smaps_pte_entry()
571 struct mem_size_stats *mss = walk->private; in smaps_pmd_entry() local
591 mss->anonymous_thp += HPAGE_PMD_SIZE; in smaps_pmd_entry()
593 mss->shmem_thp += HPAGE_PMD_SIZE; in smaps_pmd_entry()
597 mss->file_thp += HPAGE_PMD_SIZE; in smaps_pmd_entry()
599 smaps_account(mss, page, true, pmd_young(*pmd), pmd_dirty(*pmd), in smaps_pmd_entry()
723 struct mem_size_stats *mss = walk->private; in smaps_hugetlb_range() local
737 mss->shared_hugetlb += huge_page_size(hstate_vma(vma)); in smaps_hugetlb_range()
739 mss->private_hugetlb += huge_page_size(hstate_vma(vma)); in smaps_hugetlb_range()
765 struct mem_size_stats *mss, unsigned long start) in smap_gather_stats() argument
775 mss->check_shmem_swap = false; in smap_gather_stats()
791 mss->swap += shmem_swapped; in smap_gather_stats()
793 mss->check_shmem_swap = true; in smap_gather_stats()
800 walk_page_vma(vma, ops, mss); in smap_gather_stats()
802 walk_page_range(vma->vm_mm, start, vma->vm_end, ops, mss); in smap_gather_stats()
809 static void __show_smap(struct seq_file *m, const struct mem_size_stats *mss, in __show_smap() argument
812 SEQ_PUT_DEC("Rss: ", mss->resident); in __show_smap()
813 SEQ_PUT_DEC(" kB\nPss: ", mss->pss >> PSS_SHIFT); in __show_smap()
820 mss->pss_anon >> PSS_SHIFT); in __show_smap()
822 mss->pss_file >> PSS_SHIFT); in __show_smap()
824 mss->pss_shmem >> PSS_SHIFT); in __show_smap()
826 SEQ_PUT_DEC(" kB\nShared_Clean: ", mss->shared_clean); in __show_smap()
827 SEQ_PUT_DEC(" kB\nShared_Dirty: ", mss->shared_dirty); in __show_smap()
828 SEQ_PUT_DEC(" kB\nPrivate_Clean: ", mss->private_clean); in __show_smap()
829 SEQ_PUT_DEC(" kB\nPrivate_Dirty: ", mss->private_dirty); in __show_smap()
830 SEQ_PUT_DEC(" kB\nReferenced: ", mss->referenced); in __show_smap()
831 SEQ_PUT_DEC(" kB\nAnonymous: ", mss->anonymous); in __show_smap()
832 SEQ_PUT_DEC(" kB\nLazyFree: ", mss->lazyfree); in __show_smap()
833 SEQ_PUT_DEC(" kB\nAnonHugePages: ", mss->anonymous_thp); in __show_smap()
834 SEQ_PUT_DEC(" kB\nShmemPmdMapped: ", mss->shmem_thp); in __show_smap()
835 SEQ_PUT_DEC(" kB\nFilePmdMapped: ", mss->file_thp); in __show_smap()
836 SEQ_PUT_DEC(" kB\nShared_Hugetlb: ", mss->shared_hugetlb); in __show_smap()
838 mss->private_hugetlb >> 10, 7); in __show_smap()
839 SEQ_PUT_DEC(" kB\nSwap: ", mss->swap); in __show_smap()
841 mss->swap_pss >> PSS_SHIFT); in __show_smap()
843 mss->pss_locked >> PSS_SHIFT); in __show_smap()
851 struct mem_size_stats mss; in show_smap() local
853 memset(&mss, 0, sizeof(mss)); in show_smap()
858 smap_gather_stats(vma, &mss, 0); in show_smap()
867 __show_smap(m, &mss, false); in show_smap()
885 struct mem_size_stats mss; in show_smaps_rollup() local
901 memset(&mss, 0, sizeof(mss)); in show_smaps_rollup()
910 smap_gather_stats(vma, &mss, 0); in show_smaps_rollup()
972 smap_gather_stats(vma, &mss, last_vma_end); in show_smaps_rollup()
983 __show_smap(m, &mss, true); in show_smaps_rollup()