swap_slots.c (e700ac213a0f793fb4f83098413303e3dd080892) swap_slots.c (8581fd402a0cf80b5298e3b225e7a7bd8f110e69)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Manage cache of swap slots to be used for and returned from
4 * swap.
5 *
6 * Copyright(c) 2016 Intel Corporation.
7 *
8 * Author: Tim Chen <tim.c.chen@linux.intel.com>

--- 16 unchanged lines hidden (view full) ---

25 * The swap slots cache is protected by a mutex instead of
26 * a spin lock as when we search for slots with scan_swap_map,
27 * we can possibly sleep.
28 */
29
30#include <linux/swap_slots.h>
31#include <linux/cpu.h>
32#include <linux/cpumask.h>
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Manage cache of swap slots to be used for and returned from
4 * swap.
5 *
6 * Copyright(c) 2016 Intel Corporation.
7 *
8 * Author: Tim Chen <tim.c.chen@linux.intel.com>

--- 16 unchanged lines hidden (view full) ---

25 * The swap slots cache is protected by a mutex instead of
26 * a spin lock as when we search for slots with scan_swap_map,
27 * we can possibly sleep.
28 */
29
30#include <linux/swap_slots.h>
31#include <linux/cpu.h>
32#include <linux/cpumask.h>
33#include <linux/slab.h>
33#include <linux/vmalloc.h>
34#include <linux/mutex.h>
35#include <linux/mm.h>
36
37static DEFINE_PER_CPU(struct swap_slots_cache, swp_slots);
38static bool swap_slot_cache_active;
39bool swap_slot_cache_enabled;
40static bool swap_slot_cache_initialized;

--- 311 unchanged lines hidden ---
34#include <linux/vmalloc.h>
35#include <linux/mutex.h>
36#include <linux/mm.h>
37
38static DEFINE_PER_CPU(struct swap_slots_cache, swp_slots);
39static bool swap_slot_cache_active;
40bool swap_slot_cache_enabled;
41static bool swap_slot_cache_initialized;

--- 311 unchanged lines hidden ---