Lines Matching refs:swap_info_struct
52 static bool swap_count_continued(struct swap_info_struct *, pgoff_t,
54 static void free_swap_count_continuations(struct swap_info_struct *);
55 static void swap_entries_free(struct swap_info_struct *si,
58 static void swap_range_alloc(struct swap_info_struct *si,
61 static struct swap_cluster_info *lock_cluster(struct swap_info_struct *si,
100 * swap_info_struct changes between not-full/full, it needs to
101 * add/remove itself to/from this list, but the swap_info_struct->lock
103 * before any swap_info_struct->lock.
108 static struct swap_info_struct *swap_info[MAX_SWAPFILES];
119 struct swap_info_struct *si[SWAP_NR_ORDERS];
130 static struct swap_info_struct *swap_type_to_swap_info(int type)
158 static long swap_usage_in_pages(struct swap_info_struct *si)
173 static bool swap_only_has_cache(struct swap_info_struct *si,
188 static bool swap_is_last_map(struct swap_info_struct *si,
212 static int __try_to_reclaim_swap(struct swap_info_struct *si,
279 static inline struct swap_extent *first_se(struct swap_info_struct *sis)
295 static int discard_swap(struct swap_info_struct *si)
329 offset_to_swap_extent(struct swap_info_struct *sis, unsigned long offset)
350 struct swap_info_struct *sis = swp_swap_info(folio->swap);
365 static void discard_swap_cluster(struct swap_info_struct *si,
424 static inline unsigned int cluster_index(struct swap_info_struct *si,
430 static inline struct swap_cluster_info *offset_to_cluster(struct swap_info_struct *si,
436 static inline unsigned int cluster_offset(struct swap_info_struct *si,
442 static inline struct swap_cluster_info *lock_cluster(struct swap_info_struct *si,
458 static void move_cluster(struct swap_info_struct *si,
482 static void swap_cluster_schedule_discard(struct swap_info_struct *si,
490 static void __free_cluster(struct swap_info_struct *si, struct swap_cluster_info *ci)
507 struct swap_info_struct *si, struct list_head *list)
542 static bool swap_do_scheduled_discard(struct swap_info_struct *si)
579 struct swap_info_struct *si;
581 si = container_of(work, struct swap_info_struct, discard_work);
588 struct swap_info_struct *si;
590 si = container_of(ref, struct swap_info_struct, users);
598 static void free_cluster(struct swap_info_struct *si, struct swap_cluster_info *ci)
622 static void partial_free_cluster(struct swap_info_struct *si,
638 static void relocate_cluster(struct swap_info_struct *si,
666 static void inc_cluster_info_page(struct swap_info_struct *si,
679 static bool cluster_reclaim_range(struct swap_info_struct *si,
717 static bool cluster_scan_range(struct swap_info_struct *si,
745 static bool cluster_alloc_range(struct swap_info_struct *si, struct swap_cluster_info *ci,
771 static unsigned int alloc_swap_scan_cluster(struct swap_info_struct *si,
828 static void swap_reclaim_full_clusters(struct swap_info_struct *si, bool force)
870 struct swap_info_struct *si;
872 si = container_of(work, struct swap_info_struct, reclaim_work);
881 static unsigned long cluster_alloc_swap_entry(struct swap_info_struct *si, int order,
996 static void del_from_avail_list(struct swap_info_struct *si, bool swapoff)
1035 static void add_to_avail_list(struct swap_info_struct *si, bool swapon)
1082 static bool swap_usage_add(struct swap_info_struct *si, unsigned int nr_entries)
1098 static void swap_usage_sub(struct swap_info_struct *si, unsigned int nr_entries)
1110 static void swap_range_alloc(struct swap_info_struct *si,
1120 static void swap_range_free(struct swap_info_struct *si, unsigned long offset,
1159 static bool get_swap_device_info(struct swap_info_struct *si)
1165 * fields of swap_info_struct, and si->flags (SWP_WRITEOK) is
1183 struct swap_info_struct *si;
1187 * Once allocated, swap_info_struct will never be completely freed,
1216 struct swap_info_struct *si, *next;
1323 static struct swap_info_struct *_swap_info_get(swp_entry_t entry)
1325 struct swap_info_struct *si;
1357 static unsigned char swap_entry_put_locked(struct swap_info_struct *si,
1412 * return pointer to swap_info_struct, and keep the swap entry valid
1438 struct swap_info_struct *get_swap_device(swp_entry_t entry)
1440 struct swap_info_struct *si;
1465 static void swap_entries_put_cache(struct swap_info_struct *si,
1481 static bool swap_entries_put_map(struct swap_info_struct *si,
1527 static bool swap_entries_put_map_nr(struct swap_info_struct *si,
1560 static void swap_entries_free(struct swap_info_struct *si,
1595 struct swap_info_struct *sis;
1615 struct swap_info_struct *si;
1627 struct swap_info_struct *si = swp_swap_info(entry);
1638 bool swap_entry_swapped(struct swap_info_struct *si, swp_entry_t entry)
1657 struct swap_info_struct *si;
1696 static bool swap_page_trans_huge_swapped(struct swap_info_struct *si,
1727 struct swap_info_struct *si = _swap_info_get(entry);
1803 struct swap_info_struct *si;
1858 struct swap_info_struct *si = swap_type_to_swap_info(type);
1897 struct swap_info_struct *sis = swap_info[type];
1921 struct swap_info_struct *sis = swap_info[type];
1939 struct swap_info_struct *si = swap_type_to_swap_info(type);
1960 struct swap_info_struct *sis = swap_info[type];
2091 struct swap_info_struct *si;
2264 static unsigned int find_next_to_unuse(struct swap_info_struct *si,
2296 struct swap_info_struct *si = swap_info[type];
2415 static void destroy_swap_extents(struct swap_info_struct *sis)
2442 add_swap_extent(struct swap_info_struct *sis, unsigned long start_page,
2509 static int setup_swap_extents(struct swap_info_struct *sis, sector_t *span)
2538 static int swap_node(struct swap_info_struct *si)
2550 static void setup_swap_info(struct swap_info_struct *si, int prio,
2581 static void _enable_swap_info(struct swap_info_struct *si)
2590 * which on removal of any swap_info_struct with an auto-assigned
2595 * swap_info_struct.
2603 static void enable_swap_info(struct swap_info_struct *si, int prio,
2624 static void reinsert_swap_info(struct swap_info_struct *si)
2638 static void wait_for_allocation(struct swap_info_struct *si)
2656 static void flush_percpu_swap_cluster(struct swap_info_struct *si)
2659 struct swap_info_struct **pcp_si;
2676 struct swap_info_struct *p = NULL;
2725 struct swap_info_struct *si = p;
2852 struct swap_info_struct *si;
2873 struct swap_info_struct *si = v;
2898 struct swap_info_struct *si = v;
2970 static struct swap_info_struct *alloc_swap_info(void)
2972 struct swap_info_struct *p;
2973 struct swap_info_struct *defer = NULL;
3001 * Publish the swap_info_struct after initializing it.
3032 static int claim_swapfile(struct swap_info_struct *si, struct inode *inode)
3080 static unsigned long read_swap_header(struct swap_info_struct *si,
3143 static int setup_swap_map(struct swap_info_struct *si,
3176 static struct swap_cluster_info *setup_clusters(struct swap_info_struct *si,
3261 struct swap_info_struct *si;
3527 struct swap_info_struct *si = swap_info[type];
3549 struct swap_info_struct *si;
3666 void swapcache_clear(struct swap_info_struct *si, swp_entry_t entry, int nr)
3671 struct swap_info_struct *swp_swap_info(swp_entry_t entry)
3693 struct swap_info_struct *si;
3796 static bool swap_count_continued(struct swap_info_struct *si,
3880 static void free_swap_count_continuations(struct swap_info_struct *si)
3906 struct swap_info_struct *si, *next;