> rcu_unlock: > + > + /* Drop an anon_vma reference if we took one */ > + if (anon_vma && atomic_dec_and_lock(&anon_vma->migrate_refcount, &anon_vma->lock)) { > + int empty = list_empty(&anon_vma->head); > + spin_unlock(&anon_vma->lock); > + if (empty) > + anon_vma_free(anon_vma); > + } > + Why don't we check ksm_refcount here? Also, why drop_anon_vma() doesn't need check migrate_refcount? plus, if we add this logic, we can remove SLAB_DESTROY_BY_RCU from anon_vma_cachep and rcu_read_lock() from unmap_and_move(), I think. It is for preventing anon_vma recycle logic. but no free directly mean no memory recycle. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxxx For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>