aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>2008-07-25 04:47:16 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-25 13:53:37 -0400
commitb76734e5e34e1889ab9fc5f3756570b1129f0f50 (patch)
tree9929c25da8b9c29fcb0c5394023f66b7668cdfa1 /mm
parentc9b0ed51483cc2fc42bb801b6675c4231b0e4634 (diff)
memcg: add hints for branch
Showing brach direction for obvious conditions. Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: Balbir Singh <balbir@in.ibm.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Pavel Emelyanov <xemul@openvz.org> Cc: Li Zefan <lizf@cn.fujitsu.com> Cc: Hugh Dickins <hugh@veritas.com> Cc: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Cc: Paul Menage <menage@google.com> Cc: David Rientjes <rientjes@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/memcontrol.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index f46b8615de6c..04ded27f6226 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -550,7 +550,7 @@ retry:
550 * The page_cgroup exists and 550 * The page_cgroup exists and
551 * the page has already been accounted. 551 * the page has already been accounted.
552 */ 552 */
553 if (pc) { 553 if (unlikely(pc)) {
554 VM_BUG_ON(pc->page != page); 554 VM_BUG_ON(pc->page != page);
555 VM_BUG_ON(!pc->mem_cgroup); 555 VM_BUG_ON(!pc->mem_cgroup);
556 unlock_page_cgroup(page); 556 unlock_page_cgroup(page);
@@ -559,7 +559,7 @@ retry:
559 unlock_page_cgroup(page); 559 unlock_page_cgroup(page);
560 560
561 pc = kmem_cache_alloc(page_cgroup_cache, gfp_mask); 561 pc = kmem_cache_alloc(page_cgroup_cache, gfp_mask);
562 if (pc == NULL) 562 if (unlikely(pc == NULL))
563 goto err; 563 goto err;
564 564
565 /* 565 /*
@@ -616,7 +616,7 @@ retry:
616 pc->flags = PAGE_CGROUP_FLAG_ACTIVE; 616 pc->flags = PAGE_CGROUP_FLAG_ACTIVE;
617 617
618 lock_page_cgroup(page); 618 lock_page_cgroup(page);
619 if (page_get_page_cgroup(page)) { 619 if (unlikely(page_get_page_cgroup(page))) {
620 unlock_page_cgroup(page); 620 unlock_page_cgroup(page);
621 /* 621 /*
622 * Another charge has been added to this page already. 622 * Another charge has been added to this page already.
@@ -690,7 +690,7 @@ __mem_cgroup_uncharge_common(struct page *page, enum charge_type ctype)
690 */ 690 */
691 lock_page_cgroup(page); 691 lock_page_cgroup(page);
692 pc = page_get_page_cgroup(page); 692 pc = page_get_page_cgroup(page);
693 if (!pc) 693 if (unlikely(!pc))
694 goto unlock; 694 goto unlock;
695 695
696 VM_BUG_ON(pc->page != page); 696 VM_BUG_ON(pc->page != page);