Export __pte_offset_map facilitate retrieving the corresponding PTE using PMD and an address. Add and export unuse_swap_pte to facilitate releasing the PTE resources corresponding to pages preloaded via swapin. Export read_swap_cache_async to facilitate asynchronously reading pages from the swap partition using PTE-prefetch scanning. Bug: 415852480 Change-Id: Ie200656ec97b087936ca98c06b0a370f547d5d0a Signed-off-by: jianhua hao <haojianhua1@xiaomi.com>
17 lines
580 B
C
17 lines
580 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _LINUX_SWAPFILE_H
|
|
#define _LINUX_SWAPFILE_H
|
|
|
|
extern unsigned long generic_max_swapfile_size(void);
|
|
unsigned long arch_max_swapfile_size(void);
|
|
|
|
extern int unuse_swap_pte(struct vm_area_struct *vma, pmd_t *pmd,
|
|
unsigned long addr, swp_entry_t entry, struct folio *folio);
|
|
|
|
/* Maximum swapfile size supported for the arch (not inclusive). */
|
|
extern unsigned long swapfile_maximum_size;
|
|
/* Whether swap migration entry supports storing A/D bits for the arch */
|
|
extern bool swap_migration_ad_supported;
|
|
|
|
#endif /* _LINUX_SWAPFILE_H */
|