mm: per-process reclaim
These day, there are many platforms available in the embedded market and they are smarter than kernel which has very limited information about working set so they want to involve memory management more heavily like android's lowmemory killer and ashmem or recent many lowmemory notifier. One of the simple imagine scenario about userspace's intelligence is that platform can manage tasks as forground and background so it would be better to reclaim background's task pages for end-user's *responsibility* although it has frequent referenced pages. This patch adds new knob "reclaim under proc/<pid>/" so task manager can reclaim any target process anytime, anywhere. It could give another method to platform for using memory efficiently. It can avoid process killing for getting free memory, which was really terrible experience because I lost my best score of game I had ever after I switch the phone call while I enjoyed the game. Reclaim file-backed pages only. echo file > /proc/PID/reclaim Reclaim anonymous pages only. echo anon > /proc/PID/reclaim Reclaim all pages echo all > /proc/PID/reclaim Bug: 121158602 Bug: 122047783 Change-Id: I2f629f7a43289af114df27044b1d2af4a6e785bc Signed-off-by:Tim Murray <timmurray@google.com> Signed-off-by:
Minchan Kim <minchan@kernel.org> (cherry picked from commit e48b0dd9cc1fa572455434357f5678018b3458b9) modification for zone-lru list from 4.9
Loading
Please register or sign in to comment