#include <linux/init.h>
#include <linux/memblock.h>
#include <linux/fs.h>
#include <linux/sysfs.h>
#include <linux/kobject.h>
#include <linux/memory_hotplug.h>
#include <linux/mm.h>
#include <linux/mmzone.h>
#include <linux/pagemap.h>
#include <linux/rmap.h>
#include <linux/mmu_notifier.h>
#include <linux/page_ext.h>
#include <linux/page_idle.h>
#include "internal.h"
#define BITMAP_CHUNK_SIZE …
#define BITMAP_CHUNK_BITS …
static struct folio *page_idle_get_folio(unsigned long pfn)
{ … }
static bool page_idle_clear_pte_refs_one(struct folio *folio,
struct vm_area_struct *vma,
unsigned long addr, void *arg)
{ … }
static void page_idle_clear_pte_refs(struct folio *folio)
{ … }
static ssize_t page_idle_bitmap_read(struct file *file, struct kobject *kobj,
struct bin_attribute *attr, char *buf,
loff_t pos, size_t count)
{ … }
static ssize_t page_idle_bitmap_write(struct file *file, struct kobject *kobj,
struct bin_attribute *attr, char *buf,
loff_t pos, size_t count)
{ … }
static struct bin_attribute page_idle_bitmap_attr = …;
static struct bin_attribute *page_idle_bin_attrs[] = …;
static const struct attribute_group page_idle_attr_group = …;
static int __init page_idle_init(void)
{ … }
subsys_initcall(page_idle_init);