{"push_id":1283838982,"size":172,"distinct_size":172,"ref":"refs/heads/cyanogenmod-mm","head":"e6fc58c87a53b7f7b72b07858a90434c8c01ff9f","before":"c17cb7ac779d5a0b0c9df2b247ca91bb0d64a889","commits":[{"sha":"23d7c6d930410e65bba8e13c969d6c8b83fc2943","author":{"name":"Hugh Dickins","email":"11bd16bbccd141ee47d9426ad06afbc74b915cf0@google.com"},"message":"mm/memcg: move reclaim_stat into lruvec\n\nWith mem_cgroup_disabled() now explicit, it becomes clear that the\nzone_reclaim_stat structure actually belongs in lruvec, per-zone when\nmemcg is disabled but per-memcg per-zone when it's enabled.\n\nWe can delete mem_cgroup_get_reclaim_stat(), and change\nupdate_page_reclaim_stat() to update just the one set of stats, the one\nwhich get_scan_count() will actually use.\n\nSigned-off-by: Hugh Dickins <hughd@google.com>\nSigned-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>\nAcked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>\nAcked-by: Michal Hocko <mhocko@suse.cz>\nReviewed-by: Minchan Kim <minchan@kernel.org>\nReviewed-by: Michal Hocko <mhocko@suse.cz>\nCc: Glauber Costa <glommer@parallels.com>\nCc: Johannes Weiner <hannes@cmpxchg.org>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\n\n(cherry picked from commit a309ba6bfca2e9078bee7f2ca3ee083bffed1757)","distinct":true,"url":"https://api.github.com/repos/mostafa-z/Gabriel_MM/commits/23d7c6d930410e65bba8e13c969d6c8b83fc2943"},{"sha":"905ff9a0407e8cbe880d4509d351b22e67cc80f6","author":{"name":"Konstantin Khlebnikov","email":"33f393458f79f8bd43067082d72780d307e418ab@openvz.org"},"message":"mm/vmscan: push lruvec pointer into putback_inactive_pages()\n\nAs zone_reclaim_stat is now located in the lruvec, we can reach it\ndirectly.\n\nSigned-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>\nCc: Mel Gorman <mel@csn.ul.ie>\nCc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>\nAcked-by: Hugh Dickins <hughd@google.com>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\n\n(cherry picked from commit 5daaa768acaa59f1f0125ac6767fa26ff6f5ac8b)","distinct":true,"url":"https://api.github.com/repos/mostafa-z/Gabriel_MM/commits/905ff9a0407e8cbe880d4509d351b22e67cc80f6"},{"sha":"49f5a8f2e597f5fb23e4854c96fb663b937f4bf2","author":{"name":"Konstantin Khlebnikov","email":"33f393458f79f8bd43067082d72780d307e418ab@openvz.org"},"message":"mm/vmscan: replace zone_nr_lru_pages() with get_lruvec_size()\n\nIf memory cgroup is enabled we always use lruvecs which are embedded into\nstruct mem_cgroup_per_zone, so we can reach lru_size counters via\ncontainer_of().\n\nSigned-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>\nCc: Mel Gorman <mel@csn.ul.ie>\nCc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>\nAcked-by: Hugh Dickins <hughd@google.com>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\n\n(cherry picked from commit 1d00e5aa4eec42ee6f350f5789a9422c19d2b0b7)","distinct":true,"url":"https://api.github.com/repos/mostafa-z/Gabriel_MM/commits/49f5a8f2e597f5fb23e4854c96fb663b937f4bf2"},{"sha":"0eae3c30c7f77a1bffa4628b735cd08fb9549ee0","author":{"name":"Konstantin Khlebnikov","email":"33f393458f79f8bd43067082d72780d307e418ab@openvz.org"},"message":"mm/vmscan: push lruvec pointer into inactive_list_is_low()\n\nSwitch mem_cgroup_inactive_anon_is_low() to lruvec pointers,\nmem_cgroup_get_lruvec_size() is more effective than\nmem_cgroup_zone_nr_lru_pages()\n\nSigned-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>\nCc: Mel Gorman <mel@csn.ul.ie>\nCc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>\nAcked-by: Hugh Dickins <hughd@google.com>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\n\n(cherry picked from commit c9737f117b3e64500727210ecb55d3ba02756a86)","distinct":true,"url":"https://api.github.com/repos/mostafa-z/Gabriel_MM/commits/0eae3c30c7f77a1bffa4628b735cd08fb9549ee0"},{"sha":"dbb3ac67c0919b34dce736ea25bcc724d67511e7","author":{"name":"mostafa-z","email":"28e69dcab9ca74ab9b70c6accb6239eeead14a40@gmail.com"},"message":"mm/vmscan: push lruvec pointer into shrink_list()\n\nSigned-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>\nCc: Mel Gorman <mel@csn.ul.ie>\nCc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>\nAcked-by: Hugh Dickins <hughd@google.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/mostafa-z/Gabriel_MM/commits/dbb3ac67c0919b34dce736ea25bcc724d67511e7"},{"sha":"e89516a4f4c935dba4aec97bbe5e0e8f2263bd9f","author":{"name":"Konstantin Khlebnikov","email":"33f393458f79f8bd43067082d72780d307e418ab@openvz.org"},"message":"mm/vmscan: push lruvec pointer into get_scan_count()\n\nSigned-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>\nCc: Mel Gorman <mel@csn.ul.ie>\nCc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>\nAcked-by: Hugh Dickins <hughd@google.com>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\n\n(cherry picked from commit 5edaa9d7315def7588c98e6811232ea2663102d2)","distinct":true,"url":"https://api.github.com/repos/mostafa-z/Gabriel_MM/commits/e89516a4f4c935dba4aec97bbe5e0e8f2263bd9f"},{"sha":"471c756533edfa369ac0802ca7c07fcd3a83ec7a","author":{"name":"Konstantin Khlebnikov","email":"33f393458f79f8bd43067082d72780d307e418ab@openvz.org"},"message":"mm/vmscan: push lruvec pointer into should_continue_reclaim()\n\nSigned-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>\nCc: Mel Gorman <mel@csn.ul.ie>\nCc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>\nAcked-by: Hugh Dickins <hughd@google.com>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\n\n(cherry picked from commit ad84696d996d88341e63f563b4702e91b9d3feac)","distinct":true,"url":"https://api.github.com/repos/mostafa-z/Gabriel_MM/commits/471c756533edfa369ac0802ca7c07fcd3a83ec7a"},{"sha":"1eef10533076c562b541cee5ae8f17d8f399abee","author":{"name":"Konstantin Khlebnikov","email":"33f393458f79f8bd43067082d72780d307e418ab@openvz.org"},"message":"mm/vmscan: kill struct mem_cgroup_zone\n\nKill struct mem_cgroup_zone and rename shrink_mem_cgroup_zone() to\nshrink_lruvec(), it always shrinks one lruvec which it takes as an\nargument.\n\nSigned-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>\nCc: Mel Gorman <mel@csn.ul.ie>\nCc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>\nAcked-by: Hugh Dickins <hughd@google.com>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\n\n(cherry picked from commit 0487ed0c0663a67c282a0f462b5526d91b73a4c8)","distinct":true,"url":"https://api.github.com/repos/mostafa-z/Gabriel_MM/commits/1eef10533076c562b541cee5ae8f17d8f399abee"},{"sha":"7b76043d35061d00e981df5381ee09bd5f8b7d21","author":{"name":"Hugh Dickins","email":"11bd16bbccd141ee47d9426ad06afbc74b915cf0@google.com"},"message":"mm/memcg: get_lru_size not get_lruvec_size\n\nKonstantin just introduced mem_cgroup_get_lruvec_size() and\nget_lruvec_size(), I'm about to add mem_cgroup_update_lru_size(): but\nwe're dealing with the same thing, lru_size[lru].  We ought to agree on\nthe naming, and I do think lru_size is the more correct: so rename his\nones to get_lru_size().\n\nSigned-off-by: Hugh Dickins <hughd@google.com>\nAcked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>\nAcked-by: Konstantin Khlebnikov <khlebnikov@openvz.org>\nAcked-by: Michal Hocko <mhocko@suse.cz>\nCc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>\nCc: Johannes Weiner <hannes@cmpxchg.org>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\n\n(cherry picked from commit 1657ca57951ddac72b2cfab8f3502c15cee52058)","distinct":true,"url":"https://api.github.com/repos/mostafa-z/Gabriel_MM/commits/7b76043d35061d00e981df5381ee09bd5f8b7d21"},{"sha":"e5cea04dfc04c38ae06f6e27ee0b176087725323","author":{"name":"Hugh Dickins","email":"11bd16bbccd141ee47d9426ad06afbc74b915cf0@google.com"},"message":"mm: trivial cleanups in vmscan.c\n\nUtter trivia in mm/vmscan.c, mostly just reducing the linecount slightly;\nmost exciting change being get_scan_count() calling vmscan_swappiness()\nonce instead of twice.\n\nSigned-off-by: Hugh Dickins <hughd@google.com>\nAcked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>\nAcked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>\nAcked-by: Konstantin Khlebnikov <khlebnikov@openvz.org>\nReviewed-by: Michal Hocko <mhocko@suse.cz>\nCc: Johannes Weiner <hannes@cmpxchg.org>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\n\n(cherry picked from commit 6b9180f7235291cda0a686bcab2f385c58f71d8d)","distinct":true,"url":"https://api.github.com/repos/mostafa-z/Gabriel_MM/commits/e5cea04dfc04c38ae06f6e27ee0b176087725323"},{"sha":"1ab3e4a5ebe172987f27be4a3f267fac9f5518ad","author":{"name":"Konstantin Khlebnikov","email":"33f393458f79f8bd43067082d72780d307e418ab@openvz.org"},"message":"mm: mark mm-inline functions as __always_inline\n\nGCC sometimes ignores \"inline\" directives even for small and simple functions.\nThis supposed to be fixed in gcc 4.7, but it was released only yesterday.\n\nSigned-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>\nAcked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>\nCc: Hugh Dickins <hughd@google.com>\nCc: Glauber Costa <glommer@parallels.com>\nCc: Michal Hocko <mhocko@suse.cz>\nCc: Johannes Weiner <hannes@cmpxchg.org>\nCc: Minchan Kim <minchan@kernel.org>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\n\n(cherry picked from commit 91f9d23d283f06919cc1b89a16204b37144b8a15)","distinct":true,"url":"https://api.github.com/repos/mostafa-z/Gabriel_MM/commits/1ab3e4a5ebe172987f27be4a3f267fac9f5518ad"},{"sha":"4ff37ae2785adca92cc8c8f95d9a9bfe396e97d5","author":{"name":"mostafa-z","email":"28e69dcab9ca74ab9b70c6accb6239eeead14a40@gmail.com"},"message":"mm/memcg: apply add/del_page to lruvec\n\nTake lruvec further: pass it instead of zone to add_page_to_lru_list() and\ndel_page_from_lru_list(); and pagevec_lru_move_fn() pass lruvec down to\nits target functions.\n\nThis cleanup eliminates a swathe of cruft in memcontrol.c, including\nmem_cgroup_lru_add_list(), mem_cgroup_lru_del_list() and\nmem_cgroup_lru_move_lists() - which never actually touched the lists.\n\nIn their place, mem_cgroup_page_lruvec() to decide the lruvec, previously\na side-effect of add, and mem_cgroup_update_lru_size() to maintain the\nlru_size stats.\n\nWhilst these are simplifications in their own right, the goal is to bring\nthe evaluation of lruvec next to the spin_locking of the lrus, in\npreparation for a future patch.\n\nSigned-off-by: Hugh Dickins <hughd@google.com>\nCc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>\nAcked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>\nAcked-by: Michal Hocko <mhocko@suse.cz>\nAcked-by: Konstantin Khlebnikov <khlebnikov@openvz.org>\nCc: Johannes Weiner <hannes@cmpxchg.org>\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/mostafa-z/Gabriel_MM/commits/4ff37ae2785adca92cc8c8f95d9a9bfe396e97d5"},{"sha":"468f1dfd6b5739ddf8fa61db999d586528e12553","author":{"name":"Wanpeng Li","email":"e0474ee7141ce904b7bbc6a249728735cd01db6e@linux.vnet.ibm.com"},"message":"mm: fix page reclaim comment error\n\nSince there are five lists in LRU cache, the array nr in get_scan_count\nshould be:\n\nnr[0] = anon inactive pages to scan; nr[1] = anon active pages to scan\nnr[2] = file inactive pages to scan; nr[3] = file active pages to scan\n\nSigned-off-by: Wanpeng Li <liwp.linux@gmail.com>\nReviewed-by: Rik van Riel <riel@redhat.com>\nAcked-by: Minchan Kim <minchan@kernel.org>\nAcked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>\nAcked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>\nSigned-off-by: Jiri Kosina <jkosina@suse.cz>\n\n(cherry picked from commit a603f36fba773d889141afa88fd43cc7cfa294cb)","distinct":true,"url":"https://api.github.com/repos/mostafa-z/Gabriel_MM/commits/468f1dfd6b5739ddf8fa61db999d586528e12553"},{"sha":"3a75e934f6ff1b65a1f2441d2dbde3bae37e4716","author":{"name":"Wanpeng Li","email":"e0474ee7141ce904b7bbc6a249728735cd01db6e@linux.vnet.ibm.com"},"message":"mm/vmscan: cleanup comment error in balance_pgdat\n\nSigned-off-by: Wanpeng Li <liwp.linux@gmail.com>\nSigned-off-by: Jiri Kosina <jkosina@suse.cz>\n\n(cherry picked from commit 4635dac38c45eb5ec49e7d0d596f821e4e8a9340)","distinct":true,"url":"https://api.github.com/repos/mostafa-z/Gabriel_MM/commits/3a75e934f6ff1b65a1f2441d2dbde3bae37e4716"},{"sha":"36b7787621f55e95d0cdd2b1fb93f514928c7692","author":{"name":"Konstantin Khlebnikov","email":"33f393458f79f8bd43067082d72780d307e418ab@openvz.org"},"message":"mm: add link from struct lruvec to struct zone\n\nThis is the first stage of struct mem_cgroup_zone removal.  Further\npatches replace struct mem_cgroup_zone with a pointer to struct lruvec.\n\nIf CONFIG_CGROUP_MEM_RES_CTLR=n lruvec_zone() is just container_of().\n\nSigned-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>\nCc: Mel Gorman <mel@csn.ul.ie>\nCc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>\nAcked-by: Hugh Dickins <hughd@google.com>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\n\n(cherry picked from commit d8ba8f1e558b8e16b3ed7e49048a540ddf22ca1c)","distinct":true,"url":"https://api.github.com/repos/mostafa-z/Gabriel_MM/commits/36b7787621f55e95d0cdd2b1fb93f514928c7692"},{"sha":"8a66eb84fcae94ec2ebc132b8b7a87cffe593de0","author":{"name":"mostafa-z","email":"28e69dcab9ca74ab9b70c6accb6239eeead14a40@gmail.com"},"message":"memcg: rename config variables\n\nSanity:\n\nCONFIG_CGROUP_MEM_RES_CTLR -> CONFIG_MEMCG\nCONFIG_CGROUP_MEM_RES_CTLR_SWAP -> CONFIG_MEMCG_SWAP\nCONFIG_CGROUP_MEM_RES_CTLR_SWAP_ENABLED -> CONFIG_MEMCG_SWAP_ENABLED\nCONFIG_CGROUP_MEM_RES_CTLR_KMEM -> CONFIG_MEMCG_KMEM\n\n[mhocko@suse.cz: fix missed bits]\nCc: Glauber Costa <glommer@parallels.com>\nAcked-by: Michal Hocko <mhocko@suse.cz>\nCc: Johannes Weiner <hannes@cmpxchg.org>\nCc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>\nCc: Hugh Dickins <hughd@google.com>\nCc: Tejun Heo <tj@kernel.org>\nCc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>\nCc: David Rientjes <rientjes@google.com>\nCc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.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/mostafa-z/Gabriel_MM/commits/8a66eb84fcae94ec2ebc132b8b7a87cffe593de0"},{"sha":"6008458d5a178df9847181cc9c2a02c7ef702b46","author":{"name":"Mel Gorman","email":"7e4a4144b35252848d9a801e3e6fca62e0cbe9e6@suse.de"},"message":"mm: throttle direct reclaimers if PF_MEMALLOC reserves are low and swap is backed by network storage\n\nIf swap is backed by network storage such as NBD, there is a risk that a\nlarge number of reclaimers can hang the system by consuming all\nPF_MEMALLOC reserves.  To avoid these hangs, the administrator must tune\nmin_free_kbytes in advance which is a bit fragile.\n\nThis patch throttles direct reclaimers if half the PF_MEMALLOC reserves\nare in use.  If the system is routinely getting throttled the system\nadministrator can increase min_free_kbytes so degradation is smoother but\nthe system will keep running.\n\nSigned-off-by: Mel Gorman <mgorman@suse.de>\nCc: David Miller <davem@davemloft.net>\nCc: Neil Brown <neilb@suse.de>\nCc: Peter Zijlstra <a.p.zijlstra@chello.nl>\nCc: Mike Christie <michaelc@cs.wisc.edu>\nCc: Eric B Munson <emunson@mgebm.net>\nCc: Eric Dumazet <eric.dumazet@gmail.com>\nCc: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>\nCc: Mel Gorman <mgorman@suse.de>\nCc: Christoph Lameter <cl@linux.com>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\n\n(cherry picked from commit 6b78ff6c26d2a2271705dd0cf3620463d4fee86e)","distinct":true,"url":"https://api.github.com/repos/mostafa-z/Gabriel_MM/commits/6008458d5a178df9847181cc9c2a02c7ef702b46"},{"sha":"d2de06b13b035239544906acd4714f99beeede84","author":{"name":"Mel Gorman","email":"7e4a4144b35252848d9a801e3e6fca62e0cbe9e6@suse.de"},"message":"mm: account for the number of times direct reclaimers get throttled\n\nUnder significant pressure when writing back to network-backed storage,\ndirect reclaimers may get throttled.  This is expected to be a short-lived\nevent and the processes get woken up again but processes do get stalled.\nThis patch counts how many times such stalling occurs.  It's up to the\nadministrator whether to reduce these stalls by increasing\nmin_free_kbytes.\n\nSigned-off-by: Mel Gorman <mgorman@suse.de>\nCc: David Miller <davem@davemloft.net>\nCc: Neil Brown <neilb@suse.de>\nCc: Peter Zijlstra <a.p.zijlstra@chello.nl>\nCc: Mike Christie <michaelc@cs.wisc.edu>\nCc: Eric B Munson <emunson@mgebm.net>\nCc: Eric Dumazet <eric.dumazet@gmail.com>\nCc: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>\nCc: Mel Gorman <mgorman@suse.de>\nCc: Christoph Lameter <cl@linux.com>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\n\n(cherry picked from commit 9a2bc09bc647ba769e1dda79b5b15c9dfb64624f)","distinct":true,"url":"https://api.github.com/repos/mostafa-z/Gabriel_MM/commits/d2de06b13b035239544906acd4714f99beeede84"},{"sha":"70b2bf736ed5ddd64a51f7d4584977fe65032606","author":{"name":"Michal Hocko","email":"549a3b539eb67715c6526d830d82ed0bec455278@suse.cz"},"message":"memcg: prevent OOM with too many dirty pages\n\nThe current implementation of dirty pages throttling is not memcg aware\nwhich makes it easy to have memcg LRUs full of dirty pages.  Without\nthrottling, these LRUs can be scanned faster than the rate of writeback,\nleading to memcg OOM conditions when the hard limit is small.\n\nThis patch fixes the problem by throttling the allocating process\n(possibly a writer) during the hard limit reclaim by waiting on\nPageReclaim pages.  We are waiting only for PageReclaim pages because\nthose are the pages that made one full round over LRU and that means that\nthe writeback is much slower than scanning.\n\nThe solution is far from being ideal - long term solution is memcg aware\ndirty throttling - but it is meant to be a band aid until we have a real\nfix.  We are seeing this happening during nightly backups which are placed\ninto containers to prevent from eviction of the real working set.\n\nThe change affects only memcg reclaim and only when we encounter\nPageReclaim pages which is a signal that the reclaim doesn't catch up on\nwith the writers so somebody should be throttled.  This could be\npotentially unfair because it could be somebody else from the group who\ngets throttled on behalf of the writer but as writers need to allocate as\nwell and they allocate in higher rate the probability that only innocent\nprocesses would be penalized is not that high.\n\nI have tested this change by a simple dd copying /dev/zero to tmpfs or\next3 running under small memcg (1G copy under 5M, 60M, 300M and 2G\ncontainers) and dd got killed by OOM killer every time.  With the patch I\ncould run the dd with the same size under 5M controller without any OOM.\nThe issue is more visible with slower devices for output.\n\n* With the patch\n================\n* tmpfs size=2G\n---------------\n$ vim cgroup_cache_oom_test.sh\n$ ./cgroup_cache_oom_test.sh 5M\nusing Limit 5M for group\n1000+0 records in\n1000+0 records out\n1048576000 bytes (1.0 GB) copied, 30.4049 s, 34.5 MB/s\n$ ./cgroup_cache_oom_test.sh 60M\nusing Limit 60M for group\n1000+0 records in\n1000+0 records out\n1048576000 bytes (1.0 GB) copied, 31.4561 s, 33.3 MB/s\n$ ./cgroup_cache_oom_test.sh 300M\nusing Limit 300M for group\n1000+0 records in\n1000+0 records out\n1048576000 bytes (1.0 GB) copied, 20.4618 s, 51.2 MB/s\n$ ./cgroup_cache_oom_test.sh 2G\nusing Limit 2G for group\n1000+0 records in\n1000+0 records out\n1048576000 bytes (1.0 GB) copied, 1.42172 s, 738 MB/s\n\n* ext3\n------\n$ ./cgroup_cache_oom_test.sh 5M\nusing Limit 5M for group\n1000+0 records in\n1000+0 records out\n1048576000 bytes (1.0 GB) copied, 27.9547 s, 37.5 MB/s\n$ ./cgroup_cache_oom_test.sh 60M\nusing Limit 60M for group\n1000+0 records in\n1000+0 records out\n1048576000 bytes (1.0 GB) copied, 30.3221 s, 34.6 MB/s\n$ ./cgroup_cache_oom_test.sh 300M\nusing Limit 300M for group\n1000+0 records in\n1000+0 records out\n1048576000 bytes (1.0 GB) copied, 24.5764 s, 42.7 MB/s\n$ ./cgroup_cache_oom_test.sh 2G\nusing Limit 2G for group\n1000+0 records in\n1000+0 records out\n1048576000 bytes (1.0 GB) copied, 3.35828 s, 312 MB/s\n\n* Without the patch\n===================\n* tmpfs size=2G\n---------------\n$ ./cgroup_cache_oom_test.sh 5M\nusing Limit 5M for group\n./cgroup_cache_oom_test.sh: line 46:  4668 Killed                  dd if=/dev/zero of=$OUT/zero bs=1M count=$count\n$ ./cgroup_cache_oom_test.sh 60M\nusing Limit 60M for group\n1000+0 records in\n1000+0 records out\n1048576000 bytes (1.0 GB) copied, 25.4989 s, 41.1 MB/s\n$ ./cgroup_cache_oom_test.sh 300M\nusing Limit 300M for group\n1000+0 records in\n1000+0 records out\n1048576000 bytes (1.0 GB) copied, 24.3928 s, 43.0 MB/s\n$ ./cgroup_cache_oom_test.sh 2G\nusing Limit 2G for group\n1000+0 records in\n1000+0 records out\n1048576000 bytes (1.0 GB) copied, 1.49797 s, 700 MB/s\n\n* ext3\n------\n$ ./cgroup_cache_oom_test.sh 5M\nusing Limit 5M for group\n./cgroup_cache_oom_test.sh: line 46:  4689 Killed                  dd if=/dev/zero of=$OUT/zero bs=1M count=$count\n$ ./cgroup_cache_oom_test.sh 60M\nusing Limit 60M for group\n./cgroup_cache_oom_test.sh: line 46:  4692 Killed                  dd if=/dev/zero of=$OUT/zero bs=1M count=$count\n$ ./cgroup_cache_oom_test.sh 300M\nusing Limit 300M for group\n1000+0 records in\n1000+0 records out\n1048576000 bytes (1.0 GB) copied, 20.248 s, 51.8 MB/s\n$ ./cgroup_cache_oom_test.sh 2G\nusing Limit 2G for group\n1000+0 records in\n1000+0 records out\n1048576000 bytes (1.0 GB) copied, 2.85201 s, 368 MB/s\n\n[akpm@linux-foundation.org: tweak changelog, reordered the test to optimize for CONFIG_CGROUP_MEM_RES_CTLR=n]\n[hughd@google.com: fix deadlock with loop driver]\nCc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujtisu.com>\nCc: Minchan Kim <minchan@kernel.org>\nCc: Rik van Riel <riel@redhat.com>\nCc: Ying Han <yinghan@google.com>\nCc: Greg Thelen <gthelen@google.com>\nCc: Hugh Dickins <hughd@google.com>\nReviewed-by: Mel Gorman <mgorman@suse.de>\nAcked-by: Johannes Weiner <hannes@cmpxchg.org>\nReviewed-by: Fengguang Wu <fengguang.wu@intel.com>\nSigned-off-by: Michal Hocko <mhocko@suse.cz>\nCc: <stable@vger.kernel.org>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\n\n(cherry picked from commit e7faf5cb54ab2624f5cab8f4478b9b1ae18fcb98)","distinct":true,"url":"https://api.github.com/repos/mostafa-z/Gabriel_MM/commits/70b2bf736ed5ddd64a51f7d4584977fe65032606"},{"sha":"fcdef8d499f574f4a97898ac8e26e5fb4b7b81a0","author":{"name":"Hugh Dickins","email":"11bd16bbccd141ee47d9426ad06afbc74b915cf0@google.com"},"message":"memcg: further prevent OOM with too many dirty pages\n\nThe may_enter_fs test turns out to be too restrictive: though I saw no\nproblem with it when testing on 3.5-rc6, it very soon OOMed when I tested\non 3.5-rc6-mm1.  I don't know what the difference there is, perhaps I just\nslightly changed the way I started off the testing: dd if=/dev/zero\nof=/mnt/temp bs=1M count=1024; rm -f /mnt/temp; sync repeatedly, in 20M\nmemory.limit_in_bytes cgroup to ext4 on USB stick.\n\next4 (and gfs2 and xfs) turn out to allocate new pages for writing with\nAOP_FLAG_NOFS: that seems a little worrying, and it's unclear to me why\nthe transaction needs to be started even before allocating pagecache\nmemory.  But it may not be worth worrying about these days: if direct\nreclaim avoids FS writeback, does __GFP_FS now mean anything?\n\nAnyway, we insisted on the may_enter_fs test to avoid hangs with the loop\ndevice; but since that also masks off __GFP_IO, we can test for __GFP_IO\ndirectly, ignoring may_enter_fs and __GFP_FS.\n\nBut even so, the test still OOMs sometimes: when originally testing on\n3.5-rc6, it OOMed about one time in five or ten; when testing just now on\n3.5-rc6-mm1, it OOMed on the first iteration.\n\nThis residual problem comes from an accumulation of pages under ordinary\nwriteback, not marked PageReclaim, so rightly not causing the memcg check\nto wait on their writeback: these too can prevent shrink_page_list() from\nfreeing any pages, so many times that memcg reclaim fails and OOMs.\n\nDeal with these in the same way as direct reclaim now deals with dirty FS\npages: mark them PageReclaim.  It is appropriate to rotate these to tail\nof list when writepage completes, but more importantly, the PageReclaim\nflag makes memcg reclaim wait on them if encountered again.  Increment\nNR_VMSCAN_IMMEDIATE?  That's arguable: I chose not.\n\nSetting PageReclaim here may occasionally race with end_page_writeback()\nclearing it: lru_deactivate_fn() already faced the same race, and\ncorrectly concluded that the window is small and the issue non-critical.\n\nWith these changes, the test runs indefinitely without OOMing on ext4,\next3 and ext2: I'll move on to test with other filesystems later.\n\nTrivia: invert conditions for a clearer block without an else, and goto\nkeep_locked to do the unlock_page.\n\nSigned-off-by: Hugh Dickins <hughd@google.com>\nCc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujtisu.com>\nCc: Minchan Kim <minchan@kernel.org>\nCc: Rik van Riel <riel@redhat.com>\nCc: Ying Han <yinghan@google.com>\nCc: Greg Thelen <gthelen@google.com>\nCc: Hugh Dickins <hughd@google.com>\nCc: Mel Gorman <mgorman@suse.de>\nCc: Johannes Weiner <hannes@cmpxchg.org>\nCc: Fengguang Wu <fengguang.wu@intel.com>\nAcked-by: Michal Hocko <mhocko@suse.cz>\nCc: Dave Chinner <david@fromorbit.com>\nCc: Theodore Ts'o <tytso@mit.edu>\nCc: <stable@vger.kernel.org>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\n\n(cherry picked from commit 82c08e5fac507c179ecdeefd09d313508af8931e)","distinct":true,"url":"https://api.github.com/repos/mostafa-z/Gabriel_MM/commits/fcdef8d499f574f4a97898ac8e26e5fb4b7b81a0"}]}
{"actor":{"display_login":"mostafa-z"}}