Lines Matching defs:swap_map

458 	 * si->swap_map directly. To make sure the discarding cluster isn't
462 memset(si->swap_map + idx * SWAPFILE_CLUSTER,
499 memset(si->swap_map + idx * SWAPFILE_CLUSTER,
650 if (!si->swap_map[tmp])
830 if (si->swap_map[offset])
870 if (vm_swap_full() && si->swap_map[offset] == SWAP_HAS_CACHE) {
882 if (si->swap_map[offset]) {
889 WRITE_ONCE(si->swap_map[offset], usage);
916 } else if (si->cluster_nr && !si->swap_map[++offset]) {
936 if (!si->swap_map[offset])
949 if (data_race(!si->swap_map[offset])) {
954 READ_ONCE(si->swap_map[offset]) == SWAP_HAS_CACHE) {
966 if (data_race(!si->swap_map[offset])) {
971 READ_ONCE(si->swap_map[offset]) == SWAP_HAS_CACHE) {
1014 map = si->swap_map + offset;
1030 memset(si->swap_map + offset, 0, SWAPFILE_CLUSTER);
1198 if (data_race(!p->swap_map[swp_offset(entry)]))
1241 count = p->swap_map[offset];
1267 WRITE_ONCE(p->swap_map[offset], usage);
1269 WRITE_ONCE(p->swap_map[offset], SWAP_HAS_CACHE);
1304 * // check swap_map
1307 * In __swap_duplicate(), the swap_map need to be checked before
1365 count = p->swap_map[offset];
1367 p->swap_map[offset] = 0;
1409 map = si->swap_map + offset;
1508 count = swap_count(p->swap_map[offset]);
1522 count = swap_count(si->swap_map[offset]);
1535 count = swap_count(si->swap_map[offset]);
1579 count = swap_count(p->swap_map[offset]);
1586 page = vmalloc_to_page(p->swap_map + offset);
1608 unsigned char *map = si->swap_map;
1678 map = si->swap_map;
1808 if (WARN_ON(data_race(!p->swap_map[swp_offset(entry)]))) {
1979 volatile unsigned char *swap_map;
1998 swap_map = &si->swap_map[offset];
2008 if (*swap_map == 0 || *swap_map == SWAP_MAP_BAD)
2151 * Scan swap_map (or frontswap_map if frontswap parameter is true)
2168 count = READ_ONCE(si->swap_map[i]);
2485 unsigned char *swap_map,
2509 p->swap_map = swap_map;
2535 unsigned char *swap_map,
2542 setup_swap_info(p, prio, swap_map, cluster_info);
2546 * Guarantee swap_map, cluster_info, etc. fields are valid
2561 setup_swap_info(p, p->prio, p->swap_map, p->cluster_info);
2581 unsigned char *swap_map;
2704 swap_map = p->swap_map;
2705 p->swap_map = NULL;
2719 vfree(swap_map);
2787 if (!(si->flags & SWP_USED) || !si->swap_map)
2808 if (!(si->flags & SWP_USED) || !si->swap_map)
3085 unsigned char *swap_map,
3107 swap_map[page_nr] = SWAP_MAP_BAD;
3122 swap_map[0] = SWAP_MAP_BAD;
3190 unsigned char *swap_map = NULL;
3260 swap_map = vzalloc(maxpages);
3261 if (!swap_map) {
3321 nr_extents = setup_swap_map_and_extents(p, swap_header, swap_map,
3383 enable_swap_info(p, prio, swap_map, cluster_info, frontswap_map);
3420 vfree(swap_map);
3507 count = p->swap_map[offset];
3545 WRITE_ONCE(p->swap_map[offset], count | has_cache);
3623 * page of the original vmalloc'ed swap_map, to hold the continuation count
3628 * on the original swap_map, only referring to a continuation page when the
3666 count = si->swap_map[offset] & ~SWAP_HAS_CACHE;
3687 head = vmalloc_to_page(si->swap_map + offset);
3739 * swap_count_continued - when the original swap_map count is incremented
3742 * when the original swap_map count is decremented from 0 with continuation,
3755 head = vmalloc_to_page(si->swap_map + offset);
3766 if (count == SWAP_MAP_MAX) /* initial increment from swap_map */
3829 * appended to the swap_map, after swap_map is quiesced, before vfree'ing it.
3837 head = vmalloc_to_page(si->swap_map + offset);