Home
last modified time | relevance | path

Searched full:swap (Results 1 – 25 of 1426) sorted by relevance

12345678910>>...58

/Linux-v5.4/Documentation/vm/
Dfrontswap.rst7 Frontswap provides a "transcendent memory" interface for swap pages.
9 swapped pages are saved in RAM (or a RAM-like device) instead of a swap disk.
20 a "backing" store for a swap device. The storage is assumed to be
31 with the specified swap device number (aka "type"). A "store" will
37 associated with the swap type (e.g., like swapoff) and notify the "device"
38 to refuse further stores with that swap type.
42 to swap out a page, it first attempts to use frontswap. If the store returns
46 page can be written to swap as usual.
50 in swap device writes is lost (and also a non-trivial performance advantage)
61 frontswap can be measured (across all swap devices) with:
[all …]
Dswap_numa.rst4 Automatically bind swap device to numa node
7 If the system has more than one swap device and swap device has the node
8 information, we can make use of this information to decide which swap
15 Swap device has priority and that decides the order of it to be used. To make
17 for swap devices. e.g. on a 2 node machine, assume 2 swap devices swapA and
24 Then node 0 will use the two swap devices in the order of swapA then swapB and
25 node 1 will use the two swap devices in the order of swapB then swapA. Note
28 A more complex example on a 4 node machine. Assume 6 swap devices are going to
31 The way to swap them on is the same as above::
44 swapA and swapB will be used in a round robin mode before any other swap device.
[all …]
Dzswap.rst10 Zswap is a lightweight compressed cache for swap pages. It takes pages that are
13 for potentially reduced swap I/O.  This trade-off can also result in a
15 faster than reads from a swap device.
28 dramatically reduce their swap I/O pressure, avoiding heavy handed I/O
31 * Users with SSDs as swap devices can extend the life of the device by
34 Zswap evicts pages from compressed cache on an LRU basis to the backing swap
51 pages out of the compressed pool, a swapoff on the swap device(s) will
60 the backing swap device in the case that the compressed pool is full.
80 When a swap page is passed from frontswap to zswap, zswap maintains a mapping
81 of the swap entry, a combination of the swap type and swap offset, to the zpool
[all …]
/Linux-v5.4/Documentation/power/
Dswsusp-and-swap-files.rst2 Using swap files with software suspend (swsusp)
7 The Linux kernel handles swap files almost in the same way as it handles swap
8 partitions and there are only two differences between these two types of swap
10 (1) swap files need not be contiguous,
11 (2) the header of a swap file is not in the first block of the partition that
13 already taken care of by the swap-handling code, but (2) has to be taken into
16 In principle the location of a swap file's header may be determined with the
18 filesystem holding the swap file to be mounted, and if this filesystem is
20 identify a swap file swsusp uses the name of the partition that holds the file
21 and the offset from the beginning of the partition at which the swap file's
[all …]
Dswsusp.rst2 Swap suspend
34 Swap partition:
38 Swap file:
51 - If you would like to write hibernation image to swap and then suspend
102 powerdowns. You must explicitly specify the swap partition to resume from with
184 encryption) and arbitrary backends for writing the image (eg to swap
223 * SUSPEND all but swap device and parents
226 * SUSPEND swap device and parents
229 Oh no, that does not work, if swap device or its parents uses DMA,
232 * SUSPEND all but swap device and parents
[all …]
Duserland-swsusp.rst74 return the amount of available swap in bytes (the
79 allocate a swap page from the resume partition
81 will contain the swap page offset if the call is successful)
84 free all swap pages allocated by
89 units) from the beginning of the partition at which the swap header is
92 containing the resume device specification and the offset); for swap
94 swap files (see Documentation/power/swsusp-and-swap-files.rst for
128 and all swap pages allocated with SNAPSHOT_ALLOC_SWAP_PAGE (if any).
135 snapshot image from/to the kernel will use a swap partition, called the resume
136 partition, or a swap file as storage space (if a swap file is used, the resume
Dswsusp-dmcrypt.rst17 the swap device(s) and the boot partition which may contain a mini
21 At this point you want to encrypt your swap, too. Still you want to
27 swap device.
30 a way that the swap device you suspend to/resume from has
33 to always set up this swap device first with dmsetup, so that
56 card contains at least the encrypted swap setup in a file
67 initrd that allows you to resume from encrypted swap and that
126 pcmcia flash disk. If this succeeds we need to reset the swap
133 Otherwise we just remove the encrypted swap device and leave it to the
/Linux-v5.4/mm/
Dswap_state.c6 * Swap reorganised 29.12.95, Stephen Tweedie
13 #include <linux/swap.h>
81 /* Avoid get_swap_device() to warn for bad swap entry */ in total_swapcache_pages()
101 printk("%lu pages in swap cache\n", total_swapcache_pages()); in show_swap_cache_info()
102 printk("Swap cache stats: add %lu, delete %lu, find %lu/%lu\n", in show_swap_cache_info()
105 printk("Free swap = %ldkB\n", in show_swap_cache_info()
107 printk("Total swap = %lukB\n", total_swap_pages << (PAGE_SHIFT - 10)); in show_swap_cache_info()
156 * been verified to be in the swap cache.
182 * add_to_swap - allocate swap space for a page
183 * @page: page we want to move to swap
[all …]
Dswapfile.c6 * Swap reorganised 29.12.95, Stephen Tweedie
16 #include <linux/swap.h>
57 * Some modules use swappable objects and may try to swap them out under
59 * check to see if any swap space is available.
66 static const char Bad_file[] = "Bad swap file entry ";
67 static const char Unused_file[] = "Unused swap file entry ";
68 static const char Bad_offset[] = "Bad swap offset entry ";
69 static const char Unused_offset[] = "Unused swap offset entry ";
116 /* Reclaim the swap entry anyway if possible */
119 * Reclaim the swap entry if there are no more mappings of the
[all …]
Dswap_slots.c3 * Manage cache of swap slots to be used for and returned from
4 * swap.
10 * We allocate the swap slots from the global pool and put
21 * The swap entry allocated is marked with SWAP_HAS_CACHE
25 * The swap slots cache is protected by a mutex instead of
42 /* Serialize swap slots cache enable/disable operations */
210 * a swap device; in __drain_swap_slots_cache()
211 * 2) disabling of swap slot cache, when we run low in __drain_swap_slots_cache()
212 * on swap slots when allocating memory and need in __drain_swap_slots_cache()
213 * to return swap slots to global pool. in __drain_swap_slots_cache()
[all …]
Dpage_io.c7 * Swap reorganised 29.12.95,
10 * Add swap of shared pages through the page cache. 20.2.1998. Stephen Tweedie
18 #include <linux/swap.h>
55 * We failed to write the page out to swap-space. in end_swap_bio_write()
63 pr_alert("Write-error on swap-device (%u:%u:%llu)\n", in end_swap_bio_write()
79 * There is no guarantee that the page is in swap cache - the software in swap_slot_free_notify()
92 * The swap subsystem performs lazy swap slot freeing, in swap_slot_free_notify()
96 * This is good for real swap storage because we can in swap_slot_free_notify()
98 * if an SSD is used as the as swap device. in swap_slot_free_notify()
99 * But if in-memory swap device (eg zram) is used, in swap_slot_free_notify()
[all …]
Dfrontswap.c14 #include <linux/swap.h>
37 * a result, the swap subsystem will always write the page to swap, in
39 * there is no direct reduction in swap writes, but a frontswap backend
84 * _after_ the swap system has been activated, we have chokepoints
93 * swapoff) is again guarded by the swap subsystem.
98 * The time between the backend being registered and the swap file system
130 /* the new ops needs to know the currently active swap devices */ in frontswap_register_ops()
153 * On the very unlikely chance that a swap device was added or in frontswap_register_ops()
188 * Called when a swap device is swapon'd.
240 * swaptype and offset. Page must be locked and in the swap cache.
[all …]
/Linux-v5.4/include/linux/
Dswap.h23 #define SWAP_FLAG_PREFER 0x8000 /* set if swap priority specified */
26 #define SWAP_FLAG_DISCARD 0x10000 /* enable discard for swap */
27 #define SWAP_FLAG_DISCARD_ONCE 0x20000 /* discard swap area at swapon-time */
42 * be swapped to. The swap type and the offset into that swap type are
51 * Use some of the swap files numbers for other purposes. This
99 * Magic header for a swap area. The first part of the union is
100 * what the swap magic looks like for the old (limited to 128MB)
101 * swap area format, the second part of the union adds - in the
105 * Having the magic at the end of the PAGE_SIZE makes detecting swap
113 char magic[10]; /* SWAP-SPACE or SWAPSPACE2 */
[all …]
/Linux-v5.4/Documentation/ABI/testing/
Dsysfs-kernel-mm-swap1 What: /sys/kernel/mm/swap/
6 What: /sys/kernel/mm/swap/vma_ra_enabled
9 Description: Enable/disable VMA based swap readahead.
11 If set to true, the VMA based swap readahead algorithm
13 VMA, and the global swap readahead algorithm will be
15 false, the global swap readahead algorithm will be
/Linux-v5.4/arch/arm/vdso/
Dvdsomunge.c101 static Elf32_Word read_elf_word(Elf32_Word word, bool swap) in read_elf_word() argument
103 return swap ? swab32(word) : word; in read_elf_word()
106 static Elf32_Half read_elf_half(Elf32_Half half, bool swap) in read_elf_half() argument
108 return swap ? swab16(half) : half; in read_elf_half()
111 static void write_elf_word(Elf32_Word val, Elf32_Word *dst, bool swap) in write_elf_word() argument
113 *dst = swap ? swab32(val) : val; in write_elf_word()
125 bool swap; in main() local
159 swap = inhdr->e_ident[EI_DATA] != HOST_ORDER; in main()
161 if (read_elf_half(inhdr->e_type, swap) != ET_DYN) in main()
164 if (read_elf_half(inhdr->e_machine, swap) != EM_ARM) in main()
[all …]
/Linux-v5.4/drivers/net/wireless/ath/ath10k/
Dswap.c6 /* This file has implementation for code swap logic. With code swap feature,
28 /* Parse swap bin and copy the content to host allocated memory. in ath10k_swap_code_seg_fill()
47 ath10k_err(ar, "refusing an invalid swap file\n"); in ath10k_swap_code_seg_fill()
64 ath10k_err(ar, "failed to parse invalid swap file\n"); in ath10k_swap_code_seg_fill()
98 ath10k_err(ar, "refusing code swap bin because it is too big %zu > %d\n", in ath10k_swap_code_seg_alloc()
133 ath10k_dbg(ar, ATH10K_DBG_BOOT, "boot found firmware code swap binary\n"); in ath10k_swap_code_seg_configure()
141 ath10k_err(ar, "failed to write Code swap segment information (%d)\n", in ath10k_swap_code_seg_configure()
178 ath10k_err(ar, "failed to allocate fw code swap segment\n"); in ath10k_swap_code_seg_init()
186 ath10k_warn(ar, "failed to initialize fw code swap segment: %d\n", in ath10k_swap_code_seg_init()
/Linux-v5.4/kernel/power/
Duser.c16 #include <linux/swap.h>
34 int swap; member
70 data->swap = swsusp_resume_device ? in snapshot_open()
84 data->swap = -1; in snapshot_open()
117 free_all_swap_pages(data->swap); in snapshot_release()
306 size = count_swap_pages(data->swap, 1); in snapshot_ioctl()
312 if (data->swap < 0 || data->swap >= MAX_SWAPFILES) { in snapshot_ioctl()
316 offset = alloc_swapdev_block(data->swap); in snapshot_ioctl()
326 if (data->swap < 0 || data->swap >= MAX_SWAPFILES) { in snapshot_ioctl()
330 free_all_swap_pages(data->swap); in snapshot_ioctl()
[all …]
Dswap.c3 * linux/kernel/power/swap.c
6 * and writing it to a swap partition.
23 #include <linux/swap.h>
48 * The swap map is a data structure used for keeping track of each page
49 * written to a swap partition. It consists of many swap_map_page
50 * structures that contain each an array of MAP_PAGE_ENTRIES swap entries.
51 * These structures are stored on the swap and linked together with the
54 * The swap map is created during suspend. The swap map pages are
91 * The swap_map_handle structure is used for handling swap in
119 * swap pages, so that they can be freed in case of an error.
[all …]
/Linux-v5.4/fs/iomap/
Dswapfile.c10 #include <linux/swap.h>
24 * Collect physical extents for this swap file. Physical extents reported to
25 * the swap code must be trimmed to align to a page boundary. The logical
27 * page numbers of the swap device to the physical page-aligned extents.
52 * Calculate how much swap space we're adding; the first page contains in iomap_swapfile_add_extent()
53 * the swap header and doesn't count. The mm still wants that first in iomap_swapfile_add_extent()
74 * Accumulate iomaps for this swap file. We have to accumulate iomaps because
75 * swap only cares about contiguous page-aligned physical extents and makes no
108 /* Only one bdev per swap file. */ in iomap_swapfile_activate_actor()
131 * Iterate a swap file's iomaps to construct physical extents that can be
/Linux-v5.4/Documentation/admin-guide/cgroup-v1/
Dmemory.rst46 - accounting anonymous pages, file caches, swap caches usage and limiting them.
48 - optionally, memory+swap usage can be accounted and limited.
69 memory.memsw.usage_in_bytes show current usage for memory+Swap
72 memory.memsw.limit_in_bytes set/show limit of memory+Swap usage
74 memory.memsw.failcnt show the number of memory+Swap hits limits
76 memory.memsw.max_usage_in_bytes show max memory+Swap usage recorded
206 causing page fault. So, we avoid accounting at swap-in I/O.
230 2.4 Swap Extension (CONFIG_MEMCG_SWAP)
233 Swap Extension allows you to record charge for swap. A swapped-in page is
236 When swap is accounted, following files are added.
[all …]
Dmemcg_test.rst47 Called when swp_entry's refcnt goes down to 0. A charge against swap
74 4.1 Swap-in.
75 At swap-in, the page is taken from swap-cache. There are 2 cases.
81 4.2 Swap-out.
82 At swap-out, typical state transition is below.
84 (a) add to swap cache. (marked as SwapCache)
88 (c) write back to swap.
89 (d) delete from swap cache. (remove from SwapCache)
121 - Both on radix-tree and SwapCache. This happens at swap-in
122 and swap-out,
[all …]
/Linux-v5.4/arch/sh/include/mach-se/mach/
Dmrshpc.h25 /* common mode & bus width 16bit SWAP = 1*/ in mrshpc_setup_windows()
28 /* common mode & bus width 16bit SWAP = 0*/ in mrshpc_setup_windows()
34 /* attribute mode & bus width 16bit SWAP = 1*/ in mrshpc_setup_windows()
37 /* attribute mode & bus width 16bit SWAP = 0*/ in mrshpc_setup_windows()
44 __raw_writew(0x0a00, MRSHPC_IOWCR2); /* bus width 16bit SWAP = 1*/ in mrshpc_setup_windows()
46 __raw_writew(0x0200, MRSHPC_IOWCR2); /* bus width 16bit SWAP = 0*/ in mrshpc_setup_windows()
/Linux-v5.4/include/linux/mtd/
Dcfi_endian.h29 #define cpu_to_cfi16(map, x) _cpu_to_cfi(16, (map)->swap, (x))
30 #define cpu_to_cfi32(map, x) _cpu_to_cfi(32, (map)->swap, (x))
31 #define cpu_to_cfi64(map, x) _cpu_to_cfi(64, (map)->swap, (x))
32 #define cfi16_to_cpu(map, x) _cfi_to_cpu(16, (map)->swap, (x))
33 #define cfi32_to_cpu(map, x) _cfi_to_cpu(32, (map)->swap, (x))
34 #define cfi64_to_cpu(map, x) _cfi_to_cpu(64, (map)->swap, (x))
/Linux-v5.4/sound/soc/codecs/
Drt5665.c956 SOC_DAPM_ENUM("IF1_1 01 ADC Swap Mux", rt5665_if1_1_01_adc_enum);
959 SOC_DAPM_ENUM("IF1_1 23 ADC Swap Mux", rt5665_if1_1_23_adc_enum);
962 SOC_DAPM_ENUM("IF1_1 45 ADC Swap Mux", rt5665_if1_1_45_adc_enum);
965 SOC_DAPM_ENUM("IF1_1 67 ADC Swap Mux", rt5665_if1_1_67_adc_enum);
968 SOC_DAPM_ENUM("IF1_2 01 ADC Swap Mux", rt5665_if1_2_01_adc_enum);
971 SOC_DAPM_ENUM("IF1_2 23 ADC1 Swap Mux", rt5665_if1_2_23_adc_enum);
974 SOC_DAPM_ENUM("IF1_2 45 ADC1 Swap Mux", rt5665_if1_2_45_adc_enum);
977 SOC_DAPM_ENUM("IF1_2 67 ADC1 Swap Mux", rt5665_if1_2_67_adc_enum);
980 SOC_DAPM_ENUM("IF2_1 DAC Swap Source", rt5665_if2_1_dac_enum);
983 SOC_DAPM_ENUM("IF2_1 ADC Swap Source", rt5665_if2_1_adc_enum);
[all …]
/Linux-v5.4/drivers/gpu/drm/nouveau/nvkm/engine/sec/fuc/
Dg98.fuc0s43 swap:
319 st b32 D[$r0 + #swap + 0x0] $r4
320 st b32 D[$r0 + #swap + 0x4] $r0
321 st b32 D[$r0 + #swap + 0x8] $r5
322 st b32 D[$r0 + #swap + 0xc] $r6
332 mov $r5 #swap
370 mov $r5 #swap
379 ld b32 $r4 D[$r0 + #swap + 4]
393 ld b32 $r5 D[$r0 + #swap + 0x00]
394 ld b32 $r6 D[$r0 + #swap + 0x10]
[all …]

12345678910>>...58