Searched hist:"1640879 afe0065caf276e98fff059c4dc01c97ae" (Results 1 – 1 of 1) sorted by relevance
/linux/mm/ |
H A D | mmap.c | diff 1640879afe0065caf276e98fff059c4dc01c97ae Tue Apr 30 00:08:12 CEST 2013 Andrew Shewmaker <agshew@gmail.com> mm: reinititalise user and admin reserves if memory is added or removed
Alter the admin and user reserves of the previous patches in this series when memory is added or removed.
If memory is added and the reserves have been eliminated or increased above the default max, then we'll trust the admin.
If memory is removed and there isn't enough free memory, then we need to reset the reserves.
Otherwise keep the reserve set by the admin.
The reserve reset code is the same as the reserve initialization code.
I tested hot addition and removal by triggering it via sysfs. The reserves shrunk when they were set high and memory was removed. They were reset higher when memory was added again.
[akpm@linux-foundation.org: use register_hotmemory_notifier()] [akpm@linux-foundation.org: init_user_reserve() and init_admin_reserve can no longer be __meminit] [fengguang.wu@intel.com: make init_reserve_notifier() static] [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Andrew Shewmaker <agshew@gmail.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|