Lines Matching defs:swap_map

465 	 * si->swap_map directly. To make sure the discarding cluster isn't
469 memset(si->swap_map + idx * SWAPFILE_CLUSTER,
506 memset(si->swap_map + idx * SWAPFILE_CLUSTER,
665 if (!si->swap_map[tmp])
787 if (data_race(!si->swap_map[offset])) {
792 if (vm_swap_full() && READ_ONCE(si->swap_map[offset]) == SWAP_HAS_CACHE) {
858 if (si->swap_map[offset])
898 if (vm_swap_full() && si->swap_map[offset] == SWAP_HAS_CACHE) {
910 if (si->swap_map[offset]) {
917 WRITE_ONCE(si->swap_map[offset], usage);
944 } else if (si->cluster_nr && !si->swap_map[++offset]) {
964 if (!si->swap_map[offset])
1027 memset(si->swap_map + offset, SWAP_HAS_CACHE, SWAPFILE_CLUSTER);
1041 memset(si->swap_map + offset, 0, SWAPFILE_CLUSTER);
1147 if (data_race(!p->swap_map[swp_offset(entry)]))
1189 count = p->swap_map[offset];
1215 WRITE_ONCE(p->swap_map[offset], usage);
1217 WRITE_ONCE(p->swap_map[offset], SWAP_HAS_CACHE);
1252 * // check swap_map
1255 * In __swap_duplicate(), the swap_map need to be checked before
1320 count = p->swap_map[offset];
1322 p->swap_map[offset] = 0;
1364 map = si->swap_map + offset;
1450 return swap_count(si->swap_map[offset]);
1465 count = swap_count(si->swap_map[offset]);
1491 count = swap_count(p->swap_map[offset]);
1498 page = vmalloc_to_page(p->swap_map + offset);
1520 unsigned char *map = si->swap_map;
1614 if (WARN_ON(data_race(!p->swap_map[swp_offset(entry)]))) {
1894 swp_count = READ_ONCE(si->swap_map[offset]);
2020 * Scan swap_map from current position to next entry still in use.
2037 count = READ_ONCE(si->swap_map[i]);
2305 unsigned char *swap_map,
2329 p->swap_map = swap_map;
2358 unsigned char *swap_map,
2365 setup_swap_info(p, prio, swap_map, cluster_info);
2383 setup_swap_info(p, p->prio, p->swap_map, p->cluster_info);
2403 unsigned char *swap_map;
2525 swap_map = p->swap_map;
2526 p->swap_map = NULL;
2538 vfree(swap_map);
2605 if (!(si->flags & SWP_USED) || !si->swap_map)
2626 if (!(si->flags & SWP_USED) || !si->swap_map)
2911 unsigned char *swap_map,
2933 swap_map[page_nr] = SWAP_MAP_BAD;
2948 swap_map[0] = SWAP_MAP_BAD;
3003 unsigned char *swap_map = NULL;
3077 swap_map = vzalloc(maxpages);
3078 if (!swap_map) {
3138 nr_extents = setup_swap_map_and_extents(p, swap_header, swap_map,
3196 enable_swap_info(p, prio, swap_map, cluster_info);
3232 vfree(swap_map);
3316 count = p->swap_map[offset];
3354 WRITE_ONCE(p->swap_map[offset], count | has_cache);
3442 * page of the original vmalloc'ed swap_map, to hold the continuation count
3447 * on the original swap_map, only referring to a continuation page when the
3485 count = swap_count(si->swap_map[offset]);
3501 head = vmalloc_to_page(si->swap_map + offset);
3553 * swap_count_continued - when the original swap_map count is incremented
3556 * when the original swap_map count is decremented from 0 with continuation,
3569 head = vmalloc_to_page(si->swap_map + offset);
3580 if (count == SWAP_MAP_MAX) /* initial increment from swap_map */
3643 * appended to the swap_map, after swap_map is quiesced, before vfree'ing it.
3651 head = vmalloc_to_page(si->swap_map + offset);