Lines Matching refs:type
130 static struct swap_info_struct *swap_type_to_swap_info(int type) in swap_type_to_swap_info() argument
132 if (type >= MAX_SWAPFILES) in swap_type_to_swap_info()
135 return READ_ONCE(swap_info[type]); /* rcu_dereference() */ in swap_type_to_swap_info()
215 swp_entry_t entry = swp_entry(si->type, offset); in __try_to_reclaim_swap()
1134 zswap_invalidate(swp_entry(si->type, offset + i)); in swap_range_free()
1143 arch_swap_invalidate_page(si->type, offset); in swap_range_free()
1148 clear_shadow_from_swap_cache(si->type, begin, end); in swap_range_free()
1201 *entry = swp_entry(si->type, found); in swap_alloc_fast()
1229 *entry = swp_entry(si->type, offset); in swap_alloc_slow()
1604 swap_entries_put_map(sis, swp_entry(sis->type, offset), nr); in swap_free_nr()
1856 swp_entry_t get_swap_page_of_type(int type) in get_swap_page_of_type() argument
1858 struct swap_info_struct *si = swap_type_to_swap_info(type); in get_swap_page_of_type()
1870 entry = swp_entry(si->type, offset); in get_swap_page_of_type()
1890 int type; in swap_type_of() local
1896 for (type = 0; type < nr_swapfiles; type++) { in swap_type_of()
1897 struct swap_info_struct *sis = swap_info[type]; in swap_type_of()
1907 return type; in swap_type_of()
1917 int type; in find_first_swap() local
1920 for (type = 0; type < nr_swapfiles; type++) { in find_first_swap()
1921 struct swap_info_struct *sis = swap_info[type]; in find_first_swap()
1927 return type; in find_first_swap()
1937 sector_t swapdev_block(int type, pgoff_t offset) in swapdev_block() argument
1939 struct swap_info_struct *si = swap_type_to_swap_info(type); in swapdev_block()
1954 unsigned int count_swap_pages(int type, int free) in count_swap_pages() argument
1959 if ((unsigned int)type < nr_swapfiles) { in count_swap_pages()
1960 struct swap_info_struct *sis = swap_info[type]; in count_swap_pages()
2088 unsigned int type) in unuse_pte_range() argument
2093 si = swap_info[type]; in unuse_pte_range()
2114 if (swp_type(entry) != type) in unuse_pte_range()
2161 unsigned int type) in unuse_pmd_range() argument
2171 ret = unuse_pte_range(vma, pmd, addr, next, type); in unuse_pmd_range()
2180 unsigned int type) in unuse_pud_range() argument
2191 ret = unuse_pmd_range(vma, pud, addr, next, type); in unuse_pud_range()
2200 unsigned int type) in unuse_p4d_range() argument
2211 ret = unuse_pud_range(vma, p4d, addr, next, type); in unuse_p4d_range()
2218 static int unuse_vma(struct vm_area_struct *vma, unsigned int type) in unuse_vma() argument
2232 ret = unuse_p4d_range(vma, pgd, addr, next, type); in unuse_vma()
2239 static int unuse_mm(struct mm_struct *mm, unsigned int type) in unuse_mm() argument
2248 ret = unuse_vma(vma, type); in unuse_mm()
2290 static int try_to_unuse(unsigned int type) in try_to_unuse() argument
2296 struct swap_info_struct *si = swap_info[type]; in try_to_unuse()
2305 retval = shmem_unuse(type); in try_to_unuse()
2324 retval = unuse_mm(mm, type); in try_to_unuse()
2346 entry = swp_entry(type, i); in try_to_unuse()
2401 unsigned int type; in drain_mmlist() local
2403 for (type = 0; type < nr_swapfiles; type++) in drain_mmlist()
2404 if (swap_usage_in_pages(swap_info[type])) in drain_mmlist()
2747 err = try_to_unuse(p->type); in SYSCALL_DEFINE1()
2795 arch_swap_invalidate_area(p->type); in SYSCALL_DEFINE1()
2796 zswap_swapoff(p->type); in SYSCALL_DEFINE1()
2804 swap_cgroup_swapoff(p->type); in SYSCALL_DEFINE1()
2805 exit_swap_address_space(p->type); in SYSCALL_DEFINE1()
2853 int type; in swap_start() local
2861 for (type = 0; (si = swap_type_to_swap_info(type)); type++) { in swap_start()
2874 int type; in swap_next() local
2877 type = 0; in swap_next()
2879 type = si->type + 1; in swap_next()
2882 for (; (si = swap_type_to_swap_info(type)); type++) { in swap_next()
2974 unsigned int type; in alloc_swap_info() local
2988 for (type = 0; type < nr_swapfiles; type++) { in alloc_swap_info()
2989 if (!(swap_info[type]->flags & SWP_USED)) in alloc_swap_info()
2992 if (type >= MAX_SWAPFILES) { in alloc_swap_info()
2998 if (type >= nr_swapfiles) { in alloc_swap_info()
2999 p->type = type; in alloc_swap_info()
3004 smp_store_release(&swap_info[type], p); /* rcu_assign_pointer() */ in alloc_swap_info()
3008 p = swap_info[type]; in alloc_swap_info()
3378 error = swap_cgroup_swapon(si->type, maxpages); in SYSCALL_DEFINE2()
3448 error = init_swap_address_space(si->type, maxpages); in SYSCALL_DEFINE2()
3452 error = zswap_swapon(si->type, maxpages); in SYSCALL_DEFINE2()
3488 zswap_swapoff(si->type); in SYSCALL_DEFINE2()
3490 exit_swap_address_space(si->type); in SYSCALL_DEFINE2()
3498 swap_cgroup_swapoff(si->type); in SYSCALL_DEFINE2()
3522 unsigned int type; in si_swapinfo() local
3526 for (type = 0; type < nr_swapfiles; type++) { in si_swapinfo()
3527 struct swap_info_struct *si = swap_info[type]; in si_swapinfo()