summaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorJohannes Weiner <jweiner@redhat.com>2011-11-02 20:38:29 (GMT)
committerLinus Torvalds <torvalds@linux-foundation.org>2011-11-02 23:07:00 (GMT)
commita61ed3cec51cfd4877855c24890ab8d3e2b143e3 (patch)
tree3ffb850513b202c8eb0ac09ad6d307719bd39856 /block
parent9b272977e3b99a8699361d214b51f98c8a9e0e7b (diff)
downloadlinux-fsl-qoriq-a61ed3cec51cfd4877855c24890ab8d3e2b143e3.tar.xz
memcg: close race between charge and putback
There is a potential race between a thread charging a page and another thread putting it back to the LRU list: charge: putback: SetPageCgroupUsed SetPageLRU PageLRU && add to memcg LRU PageCgroupUsed && add to memcg LRU The order of setting one flag and checking the other is crucial, otherwise the charge may observe !PageLRU while the putback observes !PageCgroupUsed and the page is not linked to the memcg LRU at all. Global memory pressure may fix this by trying to isolate and putback the page for reclaim, where that putback would link it to the memcg LRU again. Without that, the memory cgroup is undeletable due to a charge whose physical page can not be found and moved out. Signed-off-by: Johannes Weiner <jweiner@redhat.com> Cc: Ying Han <yinghan@google.com> Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp> Cc: Balbir Singh <bsingharora@gmail.com> Cc: Michal Hocko <mhocko@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'block')
0 files changed, 0 insertions, 0 deletions