Thread (43 messages) 43 messages, 8 authors, 2014-10-24

Re: [RFC][PATCH 4/6] SRCU free VMAs

From: Lai Jiangshan <hidden>
Date: 2014-10-23 10:11:42
Also in: lkml

 
+struct vm_area_struct *find_vma_srcu(struct mm_struct *mm, unsigned long addr)
+{
+	struct vm_area_struct *vma;
+	unsigned int seq;
+
+	WARN_ON_ONCE(!srcu_read_lock_held(&vma_srcu));
+
+	do {
+		seq = read_seqbegin(&mm->mm_seq);
+		vma = __find_vma(mm, addr);
will the __find_vma() loops for ever due to the rotations in the RBtree?
+	} while (read_seqretry(&mm->mm_seq, seq));
+
+	return vma;
+}
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help