mm, oom: Try to online memory block before killing
Before killing a process first try to see if there are any offlined memory blocks, if there are try to online one of them. Change-Id: Ie97c8b69f0ba173c202a891a38a5c914869ddaae Signed-off-by: Liam Mark <lmark@codeaurora.org> [isaacm@codeaurora.org: Update walk_memory_range to walk_memory_blocks] Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
This commit is contained in:

committed by
Isaac J. Manjarres

parent
d62cabc403
commit
c5d41d1162
@@ -110,6 +110,7 @@ extern void __online_page_increment_counters(struct page *page);
|
||||
extern void __online_page_free(struct page *page);
|
||||
|
||||
extern int try_online_node(int nid);
|
||||
extern bool try_online_one_block(int nid);
|
||||
|
||||
extern int arch_add_memory(int nid, u64 start, u64 size,
|
||||
struct mhp_restrictions *restrictions);
|
||||
@@ -269,6 +270,11 @@ static inline int try_online_node(int nid)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline bool try_online_one_block(int nid)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline void get_online_mems(void) {}
|
||||
static inline void put_online_mems(void) {}
|
||||
|
||||
|
Reference in New Issue
Block a user