linux-4.9.37/include/linux/memory.h
内存热插拔事件通知。
struct memory_notify {
unsigned long start_pfn; /* 在/离线内存 */
unsigned long nr_pages; /* 在/离线内存的页面数 */
int status_change_nid_normal; /* N_NORMAL_MEMORY 被设置/清除时设置的节点 ID */
int status_change_nid_high; /* N_MEMORY 被设置/清除时设置的节点 ID */
int status_change_nid; /* 根据需要为节点创建/丢弃结构 */
};
/* These states are exposed to userspace as text strings in sysfs */
#define MEM_ONLINE (1<<0) /* exposed to userspace */
#define MEM_GOING_OFFLINE (1<<1) /* exposed to userspace */
#define MEM_OFFLINE (1<<2) /* exposed to userspace */
#define MEM_GOING_ONLINE (1<<3)
#define MEM_CANCEL_ONLINE (1<<4)
#define MEM_CANCEL_OFFLINE (1<<5)
/*
* During pageblock isolation, count the number of pages within the
* range [start_pfn, start_pfn + nr_pages) which are owned by code
* in the notifier chain.
*/
#define MEM_ISOLATE_COUNT (1<<0)
struct memory_isolate_notify {
unsigned long start_pfn; /* Start of range to check */
unsigned int nr_pages; /* # pages in range to check */
unsigned int pages_found; /* # pages owned found by callbacks */
};

869

被折叠的 条评论
为什么被折叠?



