#include <linux/mm.h>
#include <linux/kernel_stat.h>
#include <linux/gfp.h>
#include <linux/pagemap.h>
#include <linux/swap.h>
#include <linux/bio.h>
#include <linux/swapops.h>
#include <linux/writeback.h>
#include <linux/blkdev.h>
#include <linux/psi.h>
#include <linux/uio.h>
#include <linux/sched/task.h>
#include <linux/delayacct.h>
#include <linux/zswap.h>
#include "swap.h"
static void __end_swap_bio_write(struct bio *bio)
{ … }
static void end_swap_bio_write(struct bio *bio)
{ … }
static void __end_swap_bio_read(struct bio *bio)
{ … }
static void end_swap_bio_read(struct bio *bio)
{ … }
int generic_swapfile_activate(struct swap_info_struct *sis,
struct file *swap_file,
sector_t *span)
{ … }
int swap_writepage(struct page *page, struct writeback_control *wbc)
{ … }
static inline void count_swpout_vm_event(struct folio *folio)
{ … }
#if defined(CONFIG_MEMCG) && defined(CONFIG_BLK_CGROUP)
static void bio_associate_blkg_from_page(struct bio *bio, struct folio *folio)
{ … }
#else
#define bio_associate_blkg_from_page …
#endif
struct swap_iocb { … };
static mempool_t *sio_pool;
int sio_pool_init(void)
{ … }
static void sio_write_complete(struct kiocb *iocb, long ret)
{ … }
static void swap_writepage_fs(struct folio *folio, struct writeback_control *wbc)
{ … }
static void swap_writepage_bdev_sync(struct folio *folio,
struct writeback_control *wbc, struct swap_info_struct *sis)
{ … }
static void swap_writepage_bdev_async(struct folio *folio,
struct writeback_control *wbc, struct swap_info_struct *sis)
{ … }
void __swap_writepage(struct folio *folio, struct writeback_control *wbc)
{ … }
void swap_write_unplug(struct swap_iocb *sio)
{ … }
static void sio_read_complete(struct kiocb *iocb, long ret)
{ … }
static void swap_read_folio_fs(struct folio *folio, struct swap_iocb **plug)
{ … }
static void swap_read_folio_bdev_sync(struct folio *folio,
struct swap_info_struct *sis)
{ … }
static void swap_read_folio_bdev_async(struct folio *folio,
struct swap_info_struct *sis)
{ … }
void swap_read_folio(struct folio *folio, struct swap_iocb **plug)
{ … }
void __swap_read_unplug(struct swap_iocb *sio)
{ … }