Lines Matching refs:si

125 static int __try_to_reclaim_swap(struct swap_info_struct *si,  in __try_to_reclaim_swap()  argument
128 swp_entry_t entry = swp_entry(si->type, offset); in __try_to_reclaim_swap()
169 static int discard_swap(struct swap_info_struct *si) in discard_swap() argument
177 se = first_se(si); in discard_swap()
181 err = blkdev_issue_discard(si->bdev, start_block, in discard_swap()
192 err = blkdev_issue_discard(si->bdev, start_block, in discard_swap()
239 static void discard_swap_cluster(struct swap_info_struct *si, in discard_swap_cluster() argument
242 struct swap_extent *se = offset_to_swap_extent(si, start_page); in discard_swap_cluster()
256 if (blkdev_issue_discard(si->bdev, start_block, in discard_swap_cluster()
349 static inline struct swap_cluster_info *lock_cluster(struct swap_info_struct *si, in lock_cluster() argument
354 ci = si->cluster_info; in lock_cluster()
373 struct swap_info_struct *si, unsigned long offset) in lock_cluster_or_swap_info() argument
378 ci = lock_cluster(si, offset); in lock_cluster_or_swap_info()
381 spin_lock(&si->lock); 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() argument
392 spin_unlock(&si->lock); in unlock_cluster_or_swap_info()
451 static void swap_cluster_schedule_discard(struct swap_info_struct *si, in swap_cluster_schedule_discard() argument
460 memset(si->swap_map + idx * SWAPFILE_CLUSTER, in swap_cluster_schedule_discard()
463 cluster_list_add_tail(&si->discard_clusters, si->cluster_info, idx); in swap_cluster_schedule_discard()
465 schedule_work(&si->discard_work); in swap_cluster_schedule_discard()
468 static void __free_cluster(struct swap_info_struct *si, unsigned long idx) in __free_cluster() argument
470 struct swap_cluster_info *ci = si->cluster_info; in __free_cluster()
473 cluster_list_add_tail(&si->free_clusters, ci, idx); in __free_cluster()
480 static void swap_do_scheduled_discard(struct swap_info_struct *si) in swap_do_scheduled_discard() argument
485 info = si->cluster_info; in swap_do_scheduled_discard()
487 while (!cluster_list_empty(&si->discard_clusters)) { in swap_do_scheduled_discard()
488 idx = cluster_list_del_first(&si->discard_clusters, info); in swap_do_scheduled_discard()
489 spin_unlock(&si->lock); in swap_do_scheduled_discard()
491 discard_swap_cluster(si, idx * SWAPFILE_CLUSTER, in swap_do_scheduled_discard()
494 spin_lock(&si->lock); in swap_do_scheduled_discard()
495 ci = lock_cluster(si, idx * SWAPFILE_CLUSTER); in swap_do_scheduled_discard()
496 __free_cluster(si, idx); in swap_do_scheduled_discard()
497 memset(si->swap_map + idx * SWAPFILE_CLUSTER, in swap_do_scheduled_discard()
505 struct swap_info_struct *si; in swap_discard_work() local
507 si = container_of(work, struct swap_info_struct, discard_work); in swap_discard_work()
509 spin_lock(&si->lock); in swap_discard_work()
510 swap_do_scheduled_discard(si); in swap_discard_work()
511 spin_unlock(&si->lock); in swap_discard_work()
516 struct swap_info_struct *si; in swap_users_ref_free() local
518 si = container_of(ref, struct swap_info_struct, users); in swap_users_ref_free()
519 complete(&si->comp); in swap_users_ref_free()
522 static void alloc_cluster(struct swap_info_struct *si, unsigned long idx) in alloc_cluster() argument
524 struct swap_cluster_info *ci = si->cluster_info; in alloc_cluster()
526 VM_BUG_ON(cluster_list_first(&si->free_clusters) != idx); in alloc_cluster()
527 cluster_list_del_first(&si->free_clusters, ci); in alloc_cluster()
531 static void free_cluster(struct swap_info_struct *si, unsigned long idx) in free_cluster() argument
533 struct swap_cluster_info *ci = si->cluster_info + idx; in free_cluster()
541 if ((si->flags & (SWP_WRITEOK | SWP_PAGE_DISCARD)) == in free_cluster()
543 swap_cluster_schedule_discard(si, idx); in free_cluster()
547 __free_cluster(si, idx); in free_cluster()
595 scan_swap_map_ssd_cluster_conflict(struct swap_info_struct *si, in scan_swap_map_ssd_cluster_conflict() argument
602 conflict = !cluster_list_empty(&si->free_clusters) && in scan_swap_map_ssd_cluster_conflict()
603 offset != cluster_list_first(&si->free_clusters) && in scan_swap_map_ssd_cluster_conflict()
604 cluster_is_free(&si->cluster_info[offset]); in scan_swap_map_ssd_cluster_conflict()
609 percpu_cluster = this_cpu_ptr(si->percpu_cluster); 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() argument
626 cluster = this_cpu_ptr(si->percpu_cluster); in scan_swap_map_try_ssd_cluster()
628 if (!cluster_list_empty(&si->free_clusters)) { in scan_swap_map_try_ssd_cluster()
629 cluster->index = si->free_clusters.head; in scan_swap_map_try_ssd_cluster()
632 } else if (!cluster_list_empty(&si->discard_clusters)) { in scan_swap_map_try_ssd_cluster()
638 swap_do_scheduled_discard(si); in scan_swap_map_try_ssd_cluster()
639 *scan_base = this_cpu_read(*si->cluster_next_cpu); in scan_swap_map_try_ssd_cluster()
651 max = min_t(unsigned long, si->max, in scan_swap_map_try_ssd_cluster()
654 ci = lock_cluster(si, tmp); in scan_swap_map_try_ssd_cluster()
656 if (!si->swap_map[tmp]) in scan_swap_map_try_ssd_cluster()
687 static void swap_range_alloc(struct swap_info_struct *si, unsigned long offset, in swap_range_alloc() argument
692 if (offset == si->lowest_bit) in swap_range_alloc()
693 si->lowest_bit += nr_entries; in swap_range_alloc()
694 if (end == si->highest_bit) in swap_range_alloc()
695 WRITE_ONCE(si->highest_bit, si->highest_bit - nr_entries); in swap_range_alloc()
696 si->inuse_pages += nr_entries; in swap_range_alloc()
697 if (si->inuse_pages == si->pages) { in swap_range_alloc()
698 si->lowest_bit = si->max; in swap_range_alloc()
699 si->highest_bit = 0; in swap_range_alloc()
700 del_from_avail_list(si); in swap_range_alloc()
716 static void swap_range_free(struct swap_info_struct *si, unsigned long offset, in swap_range_free() argument
723 if (offset < si->lowest_bit) in swap_range_free()
724 si->lowest_bit = offset; in swap_range_free()
725 if (end > si->highest_bit) { in swap_range_free()
726 bool was_full = !si->highest_bit; in swap_range_free()
728 WRITE_ONCE(si->highest_bit, end); in swap_range_free()
729 if (was_full && (si->flags & SWP_WRITEOK)) in swap_range_free()
730 add_to_avail_list(si); in swap_range_free()
733 si->inuse_pages -= nr_entries; in swap_range_free()
734 if (si->flags & SWP_BLKDEV) in swap_range_free()
736 si->bdev->bd_disk->fops->swap_slot_free_notify; in swap_range_free()
740 arch_swap_invalidate_page(si->type, offset); in swap_range_free()
741 frontswap_invalidate_page(si->type, offset); in swap_range_free()
743 swap_slot_free_notify(si->bdev, offset); in swap_range_free()
746 clear_shadow_from_swap_cache(si->type, begin, end); in swap_range_free()
749 static void set_cluster_next(struct swap_info_struct *si, unsigned long next) in set_cluster_next() argument
753 if (!(si->flags & SWP_SOLIDSTATE)) { in set_cluster_next()
754 si->cluster_next = next; in set_cluster_next()
758 prev = this_cpu_read(*si->cluster_next_cpu); in set_cluster_next()
767 if (si->highest_bit <= si->lowest_bit) in set_cluster_next()
769 next = si->lowest_bit + in set_cluster_next()
770 prandom_u32_max(si->highest_bit - si->lowest_bit + 1); in set_cluster_next()
772 next = max_t(unsigned int, next, si->lowest_bit); in set_cluster_next()
774 this_cpu_write(*si->cluster_next_cpu, next); in set_cluster_next()
777 static int scan_swap_map_slots(struct swap_info_struct *si, in scan_swap_map_slots() argument
800 si->flags += SWP_SCANNING; in scan_swap_map_slots()
806 if (si->flags & SWP_SOLIDSTATE) in scan_swap_map_slots()
807 scan_base = this_cpu_read(*si->cluster_next_cpu); in scan_swap_map_slots()
809 scan_base = si->cluster_next; in scan_swap_map_slots()
813 if (si->cluster_info) { in scan_swap_map_slots()
814 if (!scan_swap_map_try_ssd_cluster(si, &offset, &scan_base)) in scan_swap_map_slots()
816 } else if (unlikely(!si->cluster_nr--)) { in scan_swap_map_slots()
817 if (si->pages - si->inuse_pages < SWAPFILE_CLUSTER) { in scan_swap_map_slots()
818 si->cluster_nr = SWAPFILE_CLUSTER - 1; in scan_swap_map_slots()
822 spin_unlock(&si->lock); in scan_swap_map_slots()
830 scan_base = offset = si->lowest_bit; in scan_swap_map_slots()
834 for (; last_in_cluster <= si->highest_bit; offset++) { in scan_swap_map_slots()
835 if (si->swap_map[offset]) in scan_swap_map_slots()
838 spin_lock(&si->lock); in scan_swap_map_slots()
840 si->cluster_next = offset; in scan_swap_map_slots()
841 si->cluster_nr = SWAPFILE_CLUSTER - 1; in scan_swap_map_slots()
851 spin_lock(&si->lock); in scan_swap_map_slots()
852 si->cluster_nr = SWAPFILE_CLUSTER - 1; in scan_swap_map_slots()
856 if (si->cluster_info) { in scan_swap_map_slots()
857 while (scan_swap_map_ssd_cluster_conflict(si, offset)) { in scan_swap_map_slots()
861 if (!scan_swap_map_try_ssd_cluster(si, &offset, in scan_swap_map_slots()
866 if (!(si->flags & SWP_WRITEOK)) in scan_swap_map_slots()
868 if (!si->highest_bit) in scan_swap_map_slots()
870 if (offset > si->highest_bit) in scan_swap_map_slots()
871 scan_base = offset = si->lowest_bit; in scan_swap_map_slots()
873 ci = lock_cluster(si, offset); in scan_swap_map_slots()
875 if (vm_swap_full() && si->swap_map[offset] == SWAP_HAS_CACHE) { in scan_swap_map_slots()
878 spin_unlock(&si->lock); in scan_swap_map_slots()
879 swap_was_freed = __try_to_reclaim_swap(si, offset, TTRS_ANYWAY); in scan_swap_map_slots()
880 spin_lock(&si->lock); in scan_swap_map_slots()
887 if (si->swap_map[offset]) { in scan_swap_map_slots()
894 WRITE_ONCE(si->swap_map[offset], usage); in scan_swap_map_slots()
895 inc_cluster_info_page(si, si->cluster_info, offset); in scan_swap_map_slots()
898 swap_range_alloc(si, offset, 1); in scan_swap_map_slots()
899 slots[n_ret++] = swp_entry(si->type, offset); in scan_swap_map_slots()
902 if ((n_ret == nr) || (offset >= si->highest_bit)) in scan_swap_map_slots()
911 spin_unlock(&si->lock); in scan_swap_map_slots()
913 spin_lock(&si->lock); in scan_swap_map_slots()
918 if (si->cluster_info) { in scan_swap_map_slots()
919 if (scan_swap_map_try_ssd_cluster(si, &offset, &scan_base)) in scan_swap_map_slots()
921 } else if (si->cluster_nr && !si->swap_map[++offset]) { in scan_swap_map_slots()
923 --si->cluster_nr; in scan_swap_map_slots()
938 scan_limit = si->highest_bit; in scan_swap_map_slots()
941 if (!si->swap_map[offset]) in scan_swap_map_slots()
947 set_cluster_next(si, offset + 1); in scan_swap_map_slots()
948 si->flags -= SWP_SCANNING; in scan_swap_map_slots()
952 spin_unlock(&si->lock); in scan_swap_map_slots()
953 while (++offset <= READ_ONCE(si->highest_bit)) { in scan_swap_map_slots()
954 if (data_race(!si->swap_map[offset])) { in scan_swap_map_slots()
955 spin_lock(&si->lock); in scan_swap_map_slots()
959 READ_ONCE(si->swap_map[offset]) == SWAP_HAS_CACHE) { in scan_swap_map_slots()
960 spin_lock(&si->lock); in scan_swap_map_slots()
969 offset = si->lowest_bit; in scan_swap_map_slots()
971 if (data_race(!si->swap_map[offset])) { in scan_swap_map_slots()
972 spin_lock(&si->lock); in scan_swap_map_slots()
976 READ_ONCE(si->swap_map[offset]) == SWAP_HAS_CACHE) { in scan_swap_map_slots()
977 spin_lock(&si->lock); in scan_swap_map_slots()
987 spin_lock(&si->lock); in scan_swap_map_slots()
990 si->flags -= SWP_SCANNING; in scan_swap_map_slots()
994 static int swap_alloc_cluster(struct swap_info_struct *si, swp_entry_t *slot) in swap_alloc_cluster() argument
1009 if (cluster_list_empty(&si->free_clusters)) in swap_alloc_cluster()
1012 idx = cluster_list_first(&si->free_clusters); in swap_alloc_cluster()
1014 ci = lock_cluster(si, offset); in swap_alloc_cluster()
1015 alloc_cluster(si, idx); in swap_alloc_cluster()
1018 memset(si->swap_map + offset, SWAP_HAS_CACHE, SWAPFILE_CLUSTER); in swap_alloc_cluster()
1020 swap_range_alloc(si, offset, SWAPFILE_CLUSTER); in swap_alloc_cluster()
1021 *slot = swp_entry(si->type, offset); in swap_alloc_cluster()
1026 static void swap_free_cluster(struct swap_info_struct *si, unsigned long idx) in swap_free_cluster() argument
1031 ci = lock_cluster(si, offset); in swap_free_cluster()
1032 memset(si->swap_map + offset, 0, SWAPFILE_CLUSTER); in swap_free_cluster()
1034 free_cluster(si, idx); in swap_free_cluster()
1036 swap_range_free(si, offset, SWAPFILE_CLUSTER); in swap_free_cluster()
1042 struct swap_info_struct *si, *next; in get_swap_pages() local
1064 plist_for_each_entry_safe(si, next, &swap_avail_heads[node], avail_lists[node]) { in get_swap_pages()
1066 plist_requeue(&si->avail_lists[node], &swap_avail_heads[node]); in get_swap_pages()
1068 spin_lock(&si->lock); in get_swap_pages()
1069 if (!si->highest_bit || !(si->flags & SWP_WRITEOK)) { in get_swap_pages()
1071 if (plist_node_empty(&si->avail_lists[node])) { in get_swap_pages()
1072 spin_unlock(&si->lock); in get_swap_pages()
1075 WARN(!si->highest_bit, in get_swap_pages()
1077 si->type); in get_swap_pages()
1078 WARN(!(si->flags & SWP_WRITEOK), in get_swap_pages()
1080 si->type); in get_swap_pages()
1081 __del_from_avail_list(si); in get_swap_pages()
1082 spin_unlock(&si->lock); in get_swap_pages()
1086 if (si->flags & SWP_BLKDEV) in get_swap_pages()
1087 n_ret = swap_alloc_cluster(si, swp_entries); in get_swap_pages()
1089 n_ret = scan_swap_map_slots(si, SWAP_HAS_CACHE, in get_swap_pages()
1091 spin_unlock(&si->lock); in get_swap_pages()
1095 si->type); in get_swap_pages()
1267 struct swap_info_struct *si; in get_swap_device() local
1272 si = swp_swap_info(entry); in get_swap_device()
1273 if (!si) in get_swap_device()
1275 if (!percpu_ref_tryget_live(&si->users)) in get_swap_device()
1286 if (offset >= si->max) in get_swap_device()
1289 return si; in get_swap_device()
1295 percpu_ref_put(&si->users); in get_swap_device()
1353 struct swap_info_struct *si; in put_swap_page() local
1359 si = _swap_info_get(entry); in put_swap_page()
1360 if (!si) in put_swap_page()
1363 ci = lock_cluster_or_swap_info(si, offset); in put_swap_page()
1366 map = si->swap_map + offset; in put_swap_page()
1375 unlock_cluster_or_swap_info(si, ci); in put_swap_page()
1376 spin_lock(&si->lock); in put_swap_page()
1378 swap_free_cluster(si, idx); in put_swap_page()
1379 spin_unlock(&si->lock); in put_swap_page()
1384 if (!__swap_entry_free_locked(si, offset + i, SWAP_HAS_CACHE)) { in put_swap_page()
1385 unlock_cluster_or_swap_info(si, ci); in put_swap_page()
1389 lock_cluster_or_swap_info(si, offset); in put_swap_page()
1392 unlock_cluster_or_swap_info(si, ci); in put_swap_page()
1398 struct swap_info_struct *si; in split_swap_cluster() local
1402 si = _swap_info_get(entry); in split_swap_cluster()
1403 if (!si) in split_swap_cluster()
1405 ci = lock_cluster(si, offset); in split_swap_cluster()
1473 struct swap_info_struct *si; in __swap_count() local
1477 si = get_swap_device(entry); in __swap_count()
1478 if (si) { in __swap_count()
1479 count = swap_count(si->swap_map[offset]); in __swap_count()
1480 put_swap_device(si); in __swap_count()
1485 static int swap_swapcount(struct swap_info_struct *si, swp_entry_t entry) in swap_swapcount() argument
1491 ci = lock_cluster_or_swap_info(si, offset); in swap_swapcount()
1492 count = swap_count(si->swap_map[offset]); in swap_swapcount()
1493 unlock_cluster_or_swap_info(si, ci); in swap_swapcount()
1505 struct swap_info_struct *si; in __swp_swapcount() local
1507 si = get_swap_device(entry); in __swp_swapcount()
1508 if (si) { in __swp_swapcount()
1509 count = swap_swapcount(si, entry); in __swp_swapcount()
1510 put_swap_device(si); in __swp_swapcount()
1561 static bool swap_page_trans_huge_swapped(struct swap_info_struct *si, in swap_page_trans_huge_swapped() argument
1565 unsigned char *map = si->swap_map; in swap_page_trans_huge_swapped()
1571 ci = lock_cluster_or_swap_info(si, offset); in swap_page_trans_huge_swapped()
1584 unlock_cluster_or_swap_info(si, ci); in swap_page_trans_huge_swapped()
1591 struct swap_info_struct *si; in page_swapped() local
1598 si = _swap_info_get(entry); in page_swapped()
1599 if (si) in page_swapped()
1600 return swap_page_trans_huge_swapped(si, entry); in page_swapped()
1609 struct swap_info_struct *si; in page_trans_huge_map_swapcount() local
1633 si = _swap_info_get(entry); in page_trans_huge_map_swapcount()
1634 if (si) { in page_trans_huge_map_swapcount()
1635 map = si->swap_map; in page_trans_huge_map_swapcount()
1640 ci = lock_cluster(si, offset); in page_trans_huge_map_swapcount()
1778 struct swap_info_struct *si = swap_type_to_swap_info(type); in get_swap_page_of_type() local
1781 if (!si) in get_swap_page_of_type()
1785 spin_lock(&si->lock); in get_swap_page_of_type()
1786 if ((si->flags & SWP_WRITEOK) && scan_swap_map_slots(si, 1, 1, &entry)) in get_swap_page_of_type()
1788 spin_unlock(&si->lock); in get_swap_page_of_type()
1852 struct swap_info_struct *si = swap_type_to_swap_info(type); in swapdev_block() local
1855 if (!si || !(si->flags & SWP_WRITEOK)) in swapdev_block()
1857 se = offset_to_swap_extent(si, offset); in swapdev_block()
1946 struct swap_info_struct *si; in unuse_pte_range() local
1951 si = swap_info[type]; in unuse_pte_range()
1962 if (frontswap && !frontswap_test(si, offset)) in unuse_pte_range()
1966 swap_map = &si->swap_map[offset]; in unuse_pte_range()
2126 static unsigned int find_next_to_unuse(struct swap_info_struct *si, in find_next_to_unuse() argument
2138 for (i = prev + 1; i < si->max; i++) { in find_next_to_unuse()
2139 count = READ_ONCE(si->swap_map[i]); in find_next_to_unuse()
2141 if (!frontswap || frontswap_test(si, i)) in find_next_to_unuse()
2147 if (i == si->max) in find_next_to_unuse()
2164 struct swap_info_struct *si = swap_info[type]; in try_to_unuse() local
2169 if (!READ_ONCE(si->inuse_pages)) in try_to_unuse()
2185 while (READ_ONCE(si->inuse_pages) && in try_to_unuse()
2214 while (READ_ONCE(si->inuse_pages) && in try_to_unuse()
2216 (i = find_next_to_unuse(si, i, frontswap)) != 0) { in try_to_unuse()
2256 if (READ_ONCE(si->inuse_pages)) { in try_to_unuse()
2570 struct swap_info_struct *si = p; in SYSCALL_DEFINE1() local
2573 plist_for_each_entry_continue(si, &swap_active_head, list) { in SYSCALL_DEFINE1()
2574 si->prio++; in SYSCALL_DEFINE1()
2575 si->list.prio--; in SYSCALL_DEFINE1()
2577 if (si->avail_lists[nid].prio != 1) in SYSCALL_DEFINE1()
2578 si->avail_lists[nid].prio--; in SYSCALL_DEFINE1()
2717 struct swap_info_struct *si; in swap_start() local
2726 for (type = 0; (si = swap_type_to_swap_info(type)); type++) { in swap_start()
2727 if (!(si->flags & SWP_USED) || !si->swap_map) in swap_start()
2730 return si; in swap_start()
2738 struct swap_info_struct *si = v; in swap_next() local
2744 type = si->type + 1; in swap_next()
2747 for (; (si = swap_type_to_swap_info(type)); type++) { in swap_next()
2748 if (!(si->flags & SWP_USED) || !si->swap_map) in swap_next()
2750 return si; in swap_next()
2763 struct swap_info_struct *si = v; in swap_show() local
2768 if (si == SEQ_START_TOKEN) { in swap_show()
2773 bytes = si->pages << (PAGE_SHIFT - 10); in swap_show()
2774 inuse = si->inuse_pages << (PAGE_SHIFT - 10); in swap_show()
2776 file = si->swap_file; in swap_show()
2784 si->prio); in swap_show()
3117 static bool swap_discardable(struct swap_info_struct *si) in swap_discardable() argument
3119 struct request_queue *q = bdev_get_queue(si->bdev); in swap_discardable()
3403 struct swap_info_struct *si = swap_info[type]; in si_swapinfo() local
3405 if ((si->flags & SWP_USED) && !(si->flags & SWP_WRITEOK)) in si_swapinfo()
3406 nr_to_be_unused += si->inuse_pages; in si_swapinfo()
3569 struct swap_info_struct *si; in add_swap_count_continuation() local
3584 si = get_swap_device(entry); in add_swap_count_continuation()
3585 if (!si) { in add_swap_count_continuation()
3592 spin_lock(&si->lock); in add_swap_count_continuation()
3596 ci = lock_cluster(si, offset); in add_swap_count_continuation()
3598 count = swap_count(si->swap_map[offset]); in add_swap_count_continuation()
3619 head = vmalloc_to_page(si->swap_map + offset); in add_swap_count_continuation()
3622 spin_lock(&si->cont_lock); in add_swap_count_continuation()
3631 si->flags |= SWP_CONTINUED; in add_swap_count_continuation()
3659 spin_unlock(&si->cont_lock); in add_swap_count_continuation()
3662 spin_unlock(&si->lock); in add_swap_count_continuation()
3663 put_swap_device(si); in add_swap_count_continuation()
3679 static bool swap_count_continued(struct swap_info_struct *si, in swap_count_continued() argument
3687 head = vmalloc_to_page(si->swap_map + offset); in swap_count_continued()
3693 spin_lock(&si->cont_lock); in swap_count_continued()
3755 spin_unlock(&si->cont_lock); in swap_count_continued()
3763 static void free_swap_count_continuations(struct swap_info_struct *si) in free_swap_count_continuations() argument
3767 for (offset = 0; offset < si->max; offset += PAGE_SIZE) { in free_swap_count_continuations()
3769 head = vmalloc_to_page(si->swap_map + offset); in free_swap_count_continuations()
3784 struct swap_info_struct *si, *next; in __cgroup_throttle_swaprate() local
3801 plist_for_each_entry_safe(si, next, &swap_avail_heads[nid], in __cgroup_throttle_swaprate()
3803 if (si->bdev) { in __cgroup_throttle_swaprate()
3804 blkcg_schedule_throttle(bdev_get_queue(si->bdev), true); in __cgroup_throttle_swaprate()