#include <linux/ctype.h>
#include <linux/delay.h>
#include <linux/errno.h>
#include <linux/fs.h>
#include <linux/gfp.h>
#include <linux/init.h>
#include <linux/kthread.h>
#include <linux/module.h>
#include <linux/oom.h>
#include <linux/reboot.h>
#include <linux/sched.h>
#include <linux/stringify.h>
#include <linux/swap.h>
#include <linux/device.h>
#include <asm/firmware.h>
#include <asm/hvcall.h>
#include <asm/mmu.h>
#include <asm/pgalloc.h>
#include <asm/uaccess.h>
#include <linux/memory.h>
#include "plpar_wrappers.h"
Go to the source code of this file.
|
| MODULE_AUTHOR ("Brian King <[email protected]>") |
|
| MODULE_DESCRIPTION ("IBM System p Collaborative Memory Manager") |
|
| MODULE_LICENSE ("GPL") |
|
| MODULE_VERSION (CMM_DRIVER_VERSION) |
|
| module_param_named (delay, delay, uint, S_IRUGO|S_IWUSR) |
|
| MODULE_PARM_DESC (delay,"Delay (in seconds) between polls to query hypervisor paging requests. ""[Default="__stringify(CMM_DEFAULT_DELAY)"]") |
|
| module_param_named (hotplug_delay, hotplug_delay, uint, S_IRUGO|S_IWUSR) |
|
| MODULE_PARM_DESC (delay,"Delay (in seconds) after memory hotplug remove ""before loaning resumes. ""[Default="__stringify(CMM_HOTPLUG_DELAY)"]") |
|
| module_param_named (oom_kb, oom_kb, uint, S_IRUGO|S_IWUSR) |
|
| MODULE_PARM_DESC (oom_kb,"Amount of memory in kb to free on OOM. ""[Default="__stringify(CMM_OOM_KB)"]") |
|
| module_param_named (min_mem_mb, min_mem_mb, ulong, S_IRUGO|S_IWUSR) |
|
| MODULE_PARM_DESC (min_mem_mb,"Minimum amount of memory (in MB) to not balloon. ""[Default="__stringify(CMM_MIN_MEM_MB)"]") |
|
| module_param_named (debug, cmm_debug, uint, S_IRUGO|S_IWUSR) |
|
| MODULE_PARM_DESC (debug,"Enable module debugging logging. Set to 1 to enable. ""[Default="__stringify(CMM_DEBUG)"]") |
|
| CMM_SHOW (loaned_kb,"%lu\n", PAGES2KB(loaned_pages)) |
|
| CMM_SHOW (loaned_target_kb,"%lu\n", PAGES2KB(loaned_pages_target)) |
|
| module_param_call (disable, cmm_set_disable, param_get_uint,&cmm_disabled, S_IRUGO|S_IWUSR) |
|
| MODULE_PARM_DESC (disable,"Disable CMM. Set to 1 to disable. ""[Default="__stringify(CMM_DISABLE)"]") |
|
| module_init (cmm_init) |
|
| module_exit (cmm_exit) |
|
Definition at line 94 of file cmm.c.
Definition at line 49 of file cmm.c.
#define CMM_DEFAULT_DELAY 1 |
Definition at line 47 of file cmm.c.
Definition at line 50 of file cmm.c.
#define CMM_DRIVER_VERSION "1.0.0" |
Definition at line 46 of file cmm.c.
#define CMM_HOTPLUG_DELAY 5 |
Definition at line 48 of file cmm.c.
#define CMM_MEM_HOTPLUG_PRI 1 |
Definition at line 59 of file cmm.c.
#define CMM_MEM_ISOLATE_PRI 15 |
Definition at line 60 of file cmm.c.
#define CMM_MIN_MEM_MB 256 |
Definition at line 52 of file cmm.c.
Definition at line 92 of file cmm.c.
Definition at line 51 of file cmm.c.
Value:
Definition at line 349 of file cmm.c.
Definition at line 53 of file cmm.c.
Definition at line 54 of file cmm.c.
CMM_SHOW |
( |
loaned_kb |
, |
|
|
"%lu\n" |
, |
|
|
PAGES2KB(loaned_pages) |
|
|
) |
| |
CMM_SHOW |
( |
loaned_target_kb |
, |
|
|
"%lu\n" |
, |
|
|
PAGES2KB(loaned_pages_target) |
|
|
) |
| |
MODULE_DESCRIPTION |
( |
"IBM System p Collaborative Memory Manager" |
| ) |
|
module_param_named |
( |
hotplug_delay |
, |
|
|
hotplug_delay |
, |
|
|
uint |
, |
|
|
S_IRUGO| |
S_IWUSR |
|
) |
| |
module_param_named |
( |
oom_kb |
, |
|
|
oom_kb |
, |
|
|
uint |
, |
|
|
S_IRUGO| |
S_IWUSR |
|
) |
| |
module_param_named |
( |
min_mem_mb |
, |
|
|
min_mem_mb |
, |
|
|
ulong |
, |
|
|
S_IRUGO| |
S_IWUSR |
|
) |
| |
MODULE_PARM_DESC |
( |
delay |
, |
|
|
"Delay (in seconds) between polls to query hypervisor paging requests. """ |
[Default="__stringify(CMM_DEFAULT_DELAY)"] |
|
) |
| |
MODULE_PARM_DESC |
( |
delay |
, |
|
|
"Delay (in seconds) after memory hotplug remove ""before loaning resumes. """ |
[Default="__stringify(CMM_HOTPLUG_DELAY)"] |
|
) |
| |
MODULE_PARM_DESC |
( |
oom_kb |
, |
|
|
"Amount of memory in kb to free on OOM. """ |
[Default="__stringify(CMM_OOM_KB)"] |
|
) |
| |
MODULE_PARM_DESC |
( |
min_mem_mb |
, |
|
|
"Minimum amount of memory (in MB) to not balloon. """ |
[Default="__stringify(CMM_MIN_MEM_MB)"] |
|
) |
| |
MODULE_PARM_DESC |
( |
debug |
, |
|
|
"Enable module debugging logging. Set to 1 to enable. """ |
[Default="__stringify(CMM_DEBUG)"] |
|
) |
| |
MODULE_PARM_DESC |
( |
disable |
, |
|
|
"Disable CMM. Set to 1 to disable. """ |
[Default="__stringify(CMM_DISABLE)"] |
|
) |
| |