aboutsummaryrefslogtreecommitdiff
path: root/scripts/patch-kernel
diff options
context:
space:
mode:
authorHugh Dickins <[email protected]>2008-03-04 14:29:11 -0800
committerLinus Torvalds <[email protected]>2008-03-04 16:35:15 -0800
commitb9c565d5a29a795f970b4a1340393d8fc6722fb9 (patch)
treecbd1e0c762738dee438dfd1093a1bb21ce56664b /scripts/patch-kernel
parentd5b69e38f8cdb1e41cc022305c86c9739bf1ffdb (diff)
memcg: remove clear_page_cgroup and atomics
Remove clear_page_cgroup: it's an unhelpful helper, see for example how mem_cgroup_uncharge_page had to unlock_page_cgroup just in order to call it (serious races from that? I'm not sure). Once that's gone, you can see it's pointless for page_cgroup's ref_cnt to be atomic: it's always manipulated under lock_page_cgroup, except where force_empty unilaterally reset it to 0 (and how does uncharge's atomic_dec_and_test protect against that?). Simplify this page_cgroup locking: if you've got the lock and the pc is attached, then the ref_cnt must be positive: VM_BUG_ONs to check that, and to check that pc->page matches page (we're on the way to finding why sometimes it doesn't, but this patch doesn't fix that). Signed-off-by: Hugh Dickins <[email protected]> Cc: David Rientjes <[email protected]> Cc: Balbir Singh <[email protected]> Acked-by: KAMEZAWA Hiroyuki <[email protected]> Cc: Hirokazu Takahashi <[email protected]> Cc: YAMAMOTO Takashi <[email protected]> Cc: Paul Menage <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'scripts/patch-kernel')
0 files changed, 0 insertions, 0 deletions