All of lore.kernel.org
 help / color / mirror / Atom feed
* [merged] hugetlb_cgroup-use-lockdep_assert_held-rather-than-spin_is_locked.patch removed from -mm tree
@ 2014-09-03 17:57 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2014-09-03 17:57 UTC (permalink / raw)
  To: mhocko, aneesh.kumar, mm-commits


The patch titled
     Subject: hugetlb_cgroup: use lockdep_assert_held rather than spin_is_locked
has been removed from the -mm tree.  Its filename was
     hugetlb_cgroup-use-lockdep_assert_held-rather-than-spin_is_locked.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Michal Hocko <mhocko@suse.cz>
Subject: hugetlb_cgroup: use lockdep_assert_held rather than spin_is_locked

spin_lock may be an empty struct for !SMP configurations and so
arch_spin_is_locked may return unconditional 0 and trigger the VM_BUG_ON
even when the lock is held.

Replace spin_is_locked by lockdep_assert_held.  We will not BUG anymore
but it is questionable whether crashing makes a lot of sense in the
uncharge path.  Uncharge happens after the last page reference was
released so nobody should touch the page and the function doesn't update
any shared state except for res counter which uses synchronization of its
own.

Signed-off-by: Michal Hocko <mhocko@suse.cz>
Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/hugetlb_cgroup.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN mm/hugetlb_cgroup.c~hugetlb_cgroup-use-lockdep_assert_held-rather-than-spin_is_locked mm/hugetlb_cgroup.c
--- a/mm/hugetlb_cgroup.c~hugetlb_cgroup-use-lockdep_assert_held-rather-than-spin_is_locked
+++ a/mm/hugetlb_cgroup.c
@@ -217,7 +217,7 @@ void hugetlb_cgroup_uncharge_page(int id
 
 	if (hugetlb_cgroup_disabled())
 		return;
-	VM_BUG_ON(!spin_is_locked(&hugetlb_lock));
+	lockdep_assert_held(&hugetlb_lock);
 	h_cg = hugetlb_cgroup_from_page(page);
 	if (unlikely(!h_cg))
 		return;
_

Patches currently in -mm which might be from mhocko@suse.cz are

introduce-dump_vma.patch
introduce-dump_vma-fix.patch
introduce-vm_bug_on_vma.patch
convert-a-few-vm_bug_on-callers-to-vm_bug_on_vma.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-09-03 17:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-03 17:57 [merged] hugetlb_cgroup-use-lockdep_assert_held-rather-than-spin_is_locked.patch removed from -mm tree akpm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.