{"push_id":1091685221,"size":1,"distinct_size":1,"ref":"refs/heads/cm13.0-zram","head":"f4594a42f69b1487f4d6964800a5df4f035f5177","before":"7d5c238fb85c5c84e4faa3e13d392db49d892183","commits":[{"sha":"f4594a42f69b1487f4d6964800a5df4f035f5177","author":{"email":"634f508bd7c47cf0ee4126243675c3e598920fbc@jp.fujitsu.com","name":"KAMEZAWA Hiroyuki"},"message":"memcg: fix/change behavior of shared anon at moving task\n\nThis patch changes memcg's behavior at task_move().\n\nAt task_move(), the kernel scans a task's page table and move the changes\nfor mapped pages from source cgroup to target cgroup.  There has been a\nbug at handling shared anonymous pages for a long time.\n\nBefore patch:\n  - The spec says 'shared anonymous pages are not moved.'\n  - The implementation was 'shared anonymoys pages may be moved'.\n    If page_mapcount <=2, shared anonymous pages's charge were moved.\n\nAfter patch:\n  - The spec says 'all anonymous pages are moved'.\n  - The implementation is 'all anonymous pages are moved'.\n\nConsidering usage of memcg, this will not affect user's experience.\n'shared anonymous' pages only exists between a tree of processes which\ndon't do exec().  Moving one of process without exec() seems not sane.\nFor example, libcgroup will not be affected by this change.  (Anyway, no\none noticed the implementation for a long time...)\n\nBelow is a discussion log:\n\n - current spec/implementation are complex\n - Now, shared file caches are moved\n - It adds unclear check as page_mapcount(). To do correct check,\n   we should check swap users, etc.\n - No one notice this implementation behavior. So, no one get benefit\n   from the design.\n - In general, once task is moved to a cgroup for running, it will not\n   be moved....\n - Finally, we have control knob as memory.move_charge_at_immigrate.\n\nHere is a patch to allow moving shared pages, completely. This makes\nmemcg simpler and fix current broken code.\n\nChange-Id: I159aee635c2b7d84f86fb8aebd9122a93ceffbdf\nSuggested-by: Hugh Dickins <hughd@google.com>\nSigned-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>\nAcked-by: Michal Hocko <mhocko@suse.cz>\nCc: Johannes Weiner <hannes@cmpxchg.org>\nCc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>\nCc: Glauber Costa <glommer@parallels.com>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>","distinct":true,"url":"https://api.github.com/repos/haggertk/android_kernel_samsung_klte/commits/f4594a42f69b1487f4d6964800a5df4f035f5177"}]}