diff options
author | Andrew Shewmaker <[email protected]> | 2013-04-29 15:08:12 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2013-04-29 15:54:37 -0700 |
commit | 1640879afe0065caf276e98fff059c4dc01c97ae (patch) | |
tree | 2ba94e09a5cd2c49dbeed2d30bc5bdbbddc04ec8 /net/lapb/lapb_iface.c | |
parent | 4eeab4f5580d11bffedc697684b91b0bca0d5009 (diff) |
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.
[[email protected]: use register_hotmemory_notifier()]
[[email protected]: init_user_reserve() and init_admin_reserve can no longer be __meminit]
[[email protected]: make init_reserve_notifier() static]
[[email protected]: coding-style fixes]
Signed-off-by: Andrew Shewmaker <[email protected]>
Signed-off-by: Fengguang Wu <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'net/lapb/lapb_iface.c')
0 files changed, 0 insertions, 0 deletions