Lines Matching refs:mss
402 static void smaps_page_accumulate(struct mem_size_stats *mss, in smaps_page_accumulate() argument
406 mss->pss += pss; in smaps_page_accumulate()
409 mss->pss_anon += pss; in smaps_page_accumulate()
411 mss->pss_shmem += pss; in smaps_page_accumulate()
413 mss->pss_file += pss; in smaps_page_accumulate()
416 mss->pss_locked += pss; in smaps_page_accumulate()
420 mss->private_dirty += size; in smaps_page_accumulate()
422 mss->shared_dirty += size; in smaps_page_accumulate()
425 mss->private_clean += size; in smaps_page_accumulate()
427 mss->shared_clean += size; in smaps_page_accumulate()
431 static void smaps_account(struct mem_size_stats *mss, struct page *page, in smaps_account() argument
442 mss->anonymous += size; in smaps_account()
444 mss->lazyfree += size; in smaps_account()
447 mss->resident += size; in smaps_account()
450 mss->referenced += size; in smaps_account()
461 smaps_page_accumulate(mss, page, size, size << PSS_SHIFT, dirty, in smaps_account()
470 smaps_page_accumulate(mss, page, PAGE_SIZE, pss, dirty, locked, in smaps_account()
479 struct mem_size_stats *mss = walk->private; in smaps_pte_hole() local
482 mss->swap += shmem_partial_swap_usage(walk->vma->vm_file->f_mapping, in smaps_pte_hole()
505 struct mem_size_stats *mss = walk->private; in smaps_pte_entry() local
518 mss->swap += PAGE_SIZE; in smaps_pte_entry()
524 mss->swap_pss += pss_delta; in smaps_pte_entry()
526 mss->swap_pss += (u64)PAGE_SIZE << PSS_SHIFT; in smaps_pte_entry()
538 smaps_account(mss, page, false, pte_young(*pte), pte_dirty(*pte), locked); in smaps_pte_entry()
545 struct mem_size_stats *mss = walk->private; in smaps_pmd_entry() local
562 mss->anonymous_thp += HPAGE_PMD_SIZE; in smaps_pmd_entry()
564 mss->shmem_thp += HPAGE_PMD_SIZE; in smaps_pmd_entry()
568 mss->file_thp += HPAGE_PMD_SIZE; in smaps_pmd_entry()
569 smaps_account(mss, page, true, pmd_young(*pmd), pmd_dirty(*pmd), locked); in smaps_pmd_entry()
692 struct mem_size_stats *mss = walk->private; in smaps_hugetlb_range() local
708 mss->shared_hugetlb += huge_page_size(hstate_vma(vma)); in smaps_hugetlb_range()
710 mss->private_hugetlb += huge_page_size(hstate_vma(vma)); in smaps_hugetlb_range()
736 struct mem_size_stats *mss, unsigned long start) in smap_gather_stats() argument
760 mss->swap += shmem_swapped; in smap_gather_stats()
768 walk_page_vma(vma, ops, mss); in smap_gather_stats()
770 walk_page_range(vma->vm_mm, start, vma->vm_end, ops, mss); in smap_gather_stats()
777 static void __show_smap(struct seq_file *m, const struct mem_size_stats *mss, in __show_smap() argument
780 SEQ_PUT_DEC("Rss: ", mss->resident); in __show_smap()
781 SEQ_PUT_DEC(" kB\nPss: ", mss->pss >> PSS_SHIFT); in __show_smap()
788 mss->pss_anon >> PSS_SHIFT); in __show_smap()
790 mss->pss_file >> PSS_SHIFT); in __show_smap()
792 mss->pss_shmem >> PSS_SHIFT); in __show_smap()
794 SEQ_PUT_DEC(" kB\nShared_Clean: ", mss->shared_clean); in __show_smap()
795 SEQ_PUT_DEC(" kB\nShared_Dirty: ", mss->shared_dirty); in __show_smap()
796 SEQ_PUT_DEC(" kB\nPrivate_Clean: ", mss->private_clean); in __show_smap()
797 SEQ_PUT_DEC(" kB\nPrivate_Dirty: ", mss->private_dirty); in __show_smap()
798 SEQ_PUT_DEC(" kB\nReferenced: ", mss->referenced); in __show_smap()
799 SEQ_PUT_DEC(" kB\nAnonymous: ", mss->anonymous); in __show_smap()
800 SEQ_PUT_DEC(" kB\nLazyFree: ", mss->lazyfree); in __show_smap()
801 SEQ_PUT_DEC(" kB\nAnonHugePages: ", mss->anonymous_thp); in __show_smap()
802 SEQ_PUT_DEC(" kB\nShmemPmdMapped: ", mss->shmem_thp); in __show_smap()
803 SEQ_PUT_DEC(" kB\nFilePmdMapped: ", mss->file_thp); in __show_smap()
804 SEQ_PUT_DEC(" kB\nShared_Hugetlb: ", mss->shared_hugetlb); in __show_smap()
806 mss->private_hugetlb >> 10, 7); in __show_smap()
807 SEQ_PUT_DEC(" kB\nSwap: ", mss->swap); in __show_smap()
809 mss->swap_pss >> PSS_SHIFT); in __show_smap()
811 mss->pss_locked >> PSS_SHIFT); in __show_smap()
818 struct mem_size_stats mss; in show_smap() local
820 memset(&mss, 0, sizeof(mss)); in show_smap()
822 smap_gather_stats(vma, &mss, 0); in show_smap()
831 __show_smap(m, &mss, false); in show_smap()
846 struct mem_size_stats mss; in show_smaps_rollup() local
862 memset(&mss, 0, sizeof(mss)); in show_smaps_rollup()
871 smap_gather_stats(vma, &mss, 0); in show_smaps_rollup()
933 smap_gather_stats(vma, &mss, last_vma_end); in show_smaps_rollup()
944 __show_smap(m, &mss, true); in show_smaps_rollup()