Lines Matching refs:swap_info_struct

48 static bool swap_count_continued(struct swap_info_struct *, pgoff_t,
50 static void free_swap_count_continuations(struct swap_info_struct *);
91 struct swap_info_struct *swap_info[MAX_SWAPFILES];
101 static struct swap_info_struct *swap_type_to_swap_info(int type) in swap_type_to_swap_info()
125 static int __try_to_reclaim_swap(struct swap_info_struct *si, in __try_to_reclaim_swap()
153 static inline struct swap_extent *first_se(struct swap_info_struct *sis) in first_se()
169 static int discard_swap(struct swap_info_struct *si) in discard_swap()
203 offset_to_swap_extent(struct swap_info_struct *sis, unsigned long offset) in offset_to_swap_extent()
224 struct swap_info_struct *sis = page_swap_info(page); in swap_page_sector()
239 static void discard_swap_cluster(struct swap_info_struct *si, in discard_swap_cluster()
349 static inline struct swap_cluster_info *lock_cluster(struct swap_info_struct *si, in lock_cluster()
373 struct swap_info_struct *si, unsigned long offset) in lock_cluster_or_swap_info()
386 static inline void unlock_cluster_or_swap_info(struct swap_info_struct *si, in unlock_cluster_or_swap_info()
451 static void swap_cluster_schedule_discard(struct swap_info_struct *si, in swap_cluster_schedule_discard()
468 static void __free_cluster(struct swap_info_struct *si, unsigned long idx) in __free_cluster()
480 static void swap_do_scheduled_discard(struct swap_info_struct *si) in swap_do_scheduled_discard()
505 struct swap_info_struct *si; in swap_discard_work()
507 si = container_of(work, struct swap_info_struct, discard_work); in swap_discard_work()
516 struct swap_info_struct *si; in swap_users_ref_free()
518 si = container_of(ref, struct swap_info_struct, users); in swap_users_ref_free()
522 static void alloc_cluster(struct swap_info_struct *si, unsigned long idx) in alloc_cluster()
531 static void free_cluster(struct swap_info_struct *si, unsigned long idx) in free_cluster()
554 static void inc_cluster_info_page(struct swap_info_struct *p, in inc_cluster_info_page()
574 static void dec_cluster_info_page(struct swap_info_struct *p, in dec_cluster_info_page()
595 scan_swap_map_ssd_cluster_conflict(struct swap_info_struct *si, in scan_swap_map_ssd_cluster_conflict()
618 static bool scan_swap_map_try_ssd_cluster(struct swap_info_struct *si, in scan_swap_map_try_ssd_cluster()
672 static void __del_from_avail_list(struct swap_info_struct *p) in __del_from_avail_list()
680 static void del_from_avail_list(struct swap_info_struct *p) in del_from_avail_list()
687 static void swap_range_alloc(struct swap_info_struct *si, unsigned long offset, in swap_range_alloc()
704 static void add_to_avail_list(struct swap_info_struct *p) in add_to_avail_list()
716 static void swap_range_free(struct swap_info_struct *si, unsigned long offset, in swap_range_free()
749 static void set_cluster_next(struct swap_info_struct *si, unsigned long next) in set_cluster_next()
777 static int scan_swap_map_slots(struct swap_info_struct *si, in scan_swap_map_slots()
994 static int swap_alloc_cluster(struct swap_info_struct *si, swp_entry_t *slot) in swap_alloc_cluster()
1026 static void swap_free_cluster(struct swap_info_struct *si, unsigned long idx) in swap_free_cluster()
1042 struct swap_info_struct *si, *next; in get_swap_pages()
1124 static struct swap_info_struct *__swap_info_get(swp_entry_t entry) in __swap_info_get()
1126 struct swap_info_struct *p; in __swap_info_get()
1153 static struct swap_info_struct *_swap_info_get(swp_entry_t entry) in _swap_info_get()
1155 struct swap_info_struct *p; in _swap_info_get()
1170 static struct swap_info_struct *swap_info_get(swp_entry_t entry) in swap_info_get()
1172 struct swap_info_struct *p; in swap_info_get()
1180 static struct swap_info_struct *swap_info_get_cont(swp_entry_t entry, in swap_info_get_cont()
1181 struct swap_info_struct *q) in swap_info_get_cont()
1183 struct swap_info_struct *p; in swap_info_get_cont()
1196 static unsigned char __swap_entry_free_locked(struct swap_info_struct *p, in __swap_entry_free_locked()
1265 struct swap_info_struct *get_swap_device(swp_entry_t entry) in get_swap_device()
1267 struct swap_info_struct *si; in get_swap_device()
1299 static unsigned char __swap_entry_free(struct swap_info_struct *p, in __swap_entry_free()
1315 static void swap_entry_free(struct swap_info_struct *p, swp_entry_t entry) in swap_entry_free()
1338 struct swap_info_struct *p; in swap_free()
1353 struct swap_info_struct *si; in put_swap_page()
1398 struct swap_info_struct *si; in split_swap_cluster()
1421 struct swap_info_struct *p, *prev; in swapcache_free_entries()
1455 struct swap_info_struct *p; in page_swapcount()
1473 struct swap_info_struct *si; in __swap_count()
1485 static int swap_swapcount(struct swap_info_struct *si, swp_entry_t entry) in swap_swapcount()
1505 struct swap_info_struct *si; in __swp_swapcount()
1522 struct swap_info_struct *p; in swp_swapcount()
1561 static bool swap_page_trans_huge_swapped(struct swap_info_struct *si, in swap_page_trans_huge_swapped()
1591 struct swap_info_struct *si; in page_swapped()
1609 struct swap_info_struct *si; in page_trans_huge_map_swapcount()
1697 struct swap_info_struct *p; in reuse_swap_page()
1757 struct swap_info_struct *p; in free_swap_and_cache()
1778 struct swap_info_struct *si = swap_type_to_swap_info(type); in get_swap_page_of_type()
1810 struct swap_info_struct *sis = swap_info[type]; in swap_type_of()
1834 struct swap_info_struct *sis = swap_info[type]; in find_first_swap()
1852 struct swap_info_struct *si = swap_type_to_swap_info(type); in swapdev_block()
1873 struct swap_info_struct *sis = swap_info[type]; in count_swap_pages()
1946 struct swap_info_struct *si; in unuse_pte_range()
2126 static unsigned int find_next_to_unuse(struct swap_info_struct *si, in find_next_to_unuse()
2164 struct swap_info_struct *si = swap_info[type]; in try_to_unuse()
2288 static void destroy_swap_extents(struct swap_info_struct *sis) in destroy_swap_extents()
2315 add_swap_extent(struct swap_info_struct *sis, unsigned long start_page, in add_swap_extent()
2385 static int setup_swap_extents(struct swap_info_struct *sis, sector_t *span) in setup_swap_extents()
2413 static int swap_node(struct swap_info_struct *p) in swap_node()
2425 static void setup_swap_info(struct swap_info_struct *p, int prio, in setup_swap_info()
2454 static void _enable_swap_info(struct swap_info_struct *p) in _enable_swap_info()
2475 static void enable_swap_info(struct swap_info_struct *p, int prio, in enable_swap_info()
2497 static void reinsert_swap_info(struct swap_info_struct *p) in reinsert_swap_info()
2520 struct swap_info_struct *p = NULL; in SYSCALL_DEFINE1()
2570 struct swap_info_struct *si = p; in SYSCALL_DEFINE1()
2717 struct swap_info_struct *si; in swap_start()
2738 struct swap_info_struct *si = v; in swap_next()
2763 struct swap_info_struct *si = v; in swap_show()
2835 static struct swap_info_struct *alloc_swap_info(void) in alloc_swap_info()
2837 struct swap_info_struct *p; in alloc_swap_info()
2838 struct swap_info_struct *defer = NULL; in alloc_swap_info()
2896 static int claim_swapfile(struct swap_info_struct *p, struct inode *inode) in claim_swapfile()
2956 static unsigned long read_swap_header(struct swap_info_struct *p, in read_swap_header()
3032 static int setup_swap_map_and_extents(struct swap_info_struct *p, in setup_swap_map_and_extents()
3117 static bool swap_discardable(struct swap_info_struct *si) in swap_discardable()
3129 struct swap_info_struct *p; in SYSCALL_DEFINE2()
3403 struct swap_info_struct *si = swap_info[type]; in si_swapinfo()
3426 struct swap_info_struct *p; in __swap_duplicate()
3525 struct swap_info_struct *swp_swap_info(swp_entry_t entry) in swp_swap_info()
3530 struct swap_info_struct *page_swap_info(struct page *page) in page_swap_info()
3569 struct swap_info_struct *si; in add_swap_count_continuation()
3679 static bool swap_count_continued(struct swap_info_struct *si, in swap_count_continued()
3763 static void free_swap_count_continuations(struct swap_info_struct *si) in free_swap_count_continuations()
3784 struct swap_info_struct *si, *next; in __cgroup_throttle_swaprate()