linux/mm/page_reporting.c

// SPDX-License-Identifier: GPL-2.0
#include <linux/mm.h>
#include <linux/mmzone.h>
#include <linux/page_reporting.h>
#include <linux/gfp.h>
#include <linux/export.h>
#include <linux/module.h>
#include <linux/delay.h>
#include <linux/scatterlist.h>

#include "page_reporting.h"
#include "internal.h"

/* Initialize to an unsupported value */
unsigned int page_reporting_order =;

static int page_order_update_notify(const char *val, const struct kernel_param *kp)
{}

static const struct kernel_param_ops page_reporting_param_ops =;

module_param_cb();
MODULE_PARM_DESC();

/*
 * This symbol is also a kernel parameter. Export the page_reporting_order
 * symbol so that other drivers can access it to control order values without
 * having to introduce another configurable parameter. Only one driver can
 * register with the page_reporting driver for the service, so we have just
 * one control parameter for the use case(which can be accessed in both
 * drivers)
 */
EXPORT_SYMBOL_GPL();

#define PAGE_REPORTING_DELAY
static struct page_reporting_dev_info __rcu *pr_dev_info __read_mostly;

enum {};

/* request page reporting */
static void
__page_reporting_request(struct page_reporting_dev_info *prdev)
{}

/* notify prdev of free page reporting request */
void __page_reporting_notify(void)
{}

static void
page_reporting_drain(struct page_reporting_dev_info *prdev,
		     struct scatterlist *sgl, unsigned int nents, bool reported)
{}

/*
 * The page reporting cycle consists of 4 stages, fill, report, drain, and
 * idle. We will cycle through the first 3 stages until we cannot obtain a
 * full scatterlist of pages, in that case we will switch to idle.
 */
static int
page_reporting_cycle(struct page_reporting_dev_info *prdev, struct zone *zone,
		     unsigned int order, unsigned int mt,
		     struct scatterlist *sgl, unsigned int *offset)
{}

static int
page_reporting_process_zone(struct page_reporting_dev_info *prdev,
			    struct scatterlist *sgl, struct zone *zone)
{}

static void page_reporting_process(struct work_struct *work)
{}

static DEFINE_MUTEX(page_reporting_mutex);
DEFINE_STATIC_KEY_FALSE(page_reporting_enabled);

int page_reporting_register(struct page_reporting_dev_info *prdev)
{}
EXPORT_SYMBOL_GPL();

void page_reporting_unregister(struct page_reporting_dev_info *prdev)
{}
EXPORT_SYMBOL_GPL();