Lines Matching refs:swap_info_struct

53 static bool swap_count_continued(struct swap_info_struct *, pgoff_t,
55 static void free_swap_count_continuations(struct swap_info_struct *);
92 * swap_info_struct changes between not-full/full, it needs to
93 * add/remove itself to/from this list, but the swap_info_struct->lock
95 * before any swap_info_struct->lock.
100 static struct swap_info_struct *swap_info[MAX_SWAPFILES];
110 static struct swap_info_struct *swap_type_to_swap_info(int type)
138 static int __try_to_reclaim_swap(struct swap_info_struct *si,
167 static inline struct swap_extent *first_se(struct swap_info_struct *sis)
183 static int discard_swap(struct swap_info_struct *si)
217 offset_to_swap_extent(struct swap_info_struct *sis, unsigned long offset)
238 struct swap_info_struct *sis = swp_swap_info(folio->swap);
253 static void discard_swap_cluster(struct swap_info_struct *si,
351 static inline struct swap_cluster_info *lock_cluster(struct swap_info_struct *si,
375 struct swap_info_struct *si, unsigned long offset)
388 static inline void unlock_cluster_or_swap_info(struct swap_info_struct *si,
426 * only acquired when we held swap_info_struct->lock
453 static void swap_cluster_schedule_discard(struct swap_info_struct *si,
470 static void __free_cluster(struct swap_info_struct *si, unsigned long idx)
482 static void swap_do_scheduled_discard(struct swap_info_struct *si)
507 struct swap_info_struct *si;
509 si = container_of(work, struct swap_info_struct, discard_work);
518 struct swap_info_struct *si;
520 si = container_of(ref, struct swap_info_struct, users);
524 static void alloc_cluster(struct swap_info_struct *si, unsigned long idx)
533 static void free_cluster(struct swap_info_struct *si, unsigned long idx)
557 static void add_cluster_info_page(struct swap_info_struct *p,
577 static void inc_cluster_info_page(struct swap_info_struct *p,
588 static void dec_cluster_info_page(struct swap_info_struct *p,
609 scan_swap_map_ssd_cluster_conflict(struct swap_info_struct *si,
646 static bool scan_swap_map_try_ssd_cluster(struct swap_info_struct *si,
701 static void __del_from_avail_list(struct swap_info_struct *p)
710 static void del_from_avail_list(struct swap_info_struct *p)
717 static void swap_range_alloc(struct swap_info_struct *si, unsigned long offset,
734 static void add_to_avail_list(struct swap_info_struct *p)
744 static void swap_range_free(struct swap_info_struct *si, unsigned long offset,
782 static void set_cluster_next(struct swap_info_struct *si, unsigned long next)
809 static bool swap_offset_available_and_locked(struct swap_info_struct *si,
825 static int scan_swap_map_slots(struct swap_info_struct *si,
1058 static void swap_free_cluster(struct swap_info_struct *si, unsigned long idx)
1075 struct swap_info_struct *si, *next;
1149 static struct swap_info_struct *_swap_info_get(swp_entry_t entry)
1151 struct swap_info_struct *p;
1183 static struct swap_info_struct *swap_info_get_cont(swp_entry_t entry,
1184 struct swap_info_struct *q)
1186 struct swap_info_struct *p;
1199 static unsigned char __swap_entry_free_locked(struct swap_info_struct *p,
1252 * return pointer to swap_info_struct, and keep the swap entry valid
1278 struct swap_info_struct *get_swap_device(swp_entry_t entry)
1280 struct swap_info_struct *si;
1292 * fields of swap_info_struct.
1313 static unsigned char __swap_entry_free(struct swap_info_struct *p,
1329 static void swap_entry_free(struct swap_info_struct *p, swp_entry_t entry)
1352 struct swap_info_struct *p;
1367 struct swap_info_struct *si;
1416 struct swap_info_struct *p, *prev;
1444 struct swap_info_struct *si = swp_swap_info(entry);
1455 int swap_swapcount(struct swap_info_struct *si, swp_entry_t entry)
1474 struct swap_info_struct *p;
1513 static bool swap_page_trans_huge_swapped(struct swap_info_struct *si,
1544 struct swap_info_struct *si = _swap_info_get(entry);
1613 struct swap_info_struct *si;
1686 struct swap_info_struct *si = swap_type_to_swap_info(type);
1718 struct swap_info_struct *sis = swap_info[type];
1742 struct swap_info_struct *sis = swap_info[type];
1760 struct swap_info_struct *si = swap_type_to_swap_info(type);
1781 struct swap_info_struct *sis = swap_info[type];
1902 struct swap_info_struct *si;
2078 static unsigned int find_next_to_unuse(struct swap_info_struct *si,
2110 struct swap_info_struct *si = swap_info[type];
2229 static void destroy_swap_extents(struct swap_info_struct *sis)
2256 add_swap_extent(struct swap_info_struct *sis, unsigned long start_page,
2323 static int setup_swap_extents(struct swap_info_struct *sis, sector_t *span)
2352 static int swap_node(struct swap_info_struct *p)
2364 static void setup_swap_info(struct swap_info_struct *p, int prio,
2393 static void _enable_swap_info(struct swap_info_struct *p)
2403 * which on removal of any swap_info_struct with an auto-assigned
2408 * swap_info_struct.
2417 static void enable_swap_info(struct swap_info_struct *p, int prio,
2437 static void reinsert_swap_info(struct swap_info_struct *p)
2464 struct swap_info_struct *p = NULL;
2513 struct swap_info_struct *si = p;
2657 struct swap_info_struct *si;
2678 struct swap_info_struct *si = v;
2703 struct swap_info_struct *si = v;
2775 static struct swap_info_struct *alloc_swap_info(void)
2777 struct swap_info_struct *p;
2778 struct swap_info_struct *defer = NULL;
2806 * Publish the swap_info_struct after initializing it.
2836 static int claim_swapfile(struct swap_info_struct *p, struct inode *inode)
2897 static unsigned long read_swap_header(struct swap_info_struct *p,
2972 static int setup_swap_map_and_extents(struct swap_info_struct *p,
3055 struct swap_info_struct *p;
3331 struct swap_info_struct *si = swap_info[type];
3354 struct swap_info_struct *p;
3450 void swapcache_clear(struct swap_info_struct *si, swp_entry_t entry)
3463 struct swap_info_struct *swp_swap_info(swp_entry_t entry)
3501 struct swap_info_struct *si;
3606 static bool swap_count_continued(struct swap_info_struct *si,
3690 static void free_swap_count_continuations(struct swap_info_struct *si)
3711 struct swap_info_struct *si, *next;