On Fri, Dec 13, 2019 at 09:06:26PM +0300, Kirill A. Shutemov wrote: > On Fri, Dec 13, 2019 at 06:33:33AM -0800, Matthew Wilcox wrote: > > Ah. Well, we can skip the synchronize_rcu() step if the mm_struct has zero > > or one mm_users. That should avoid a slowdown for mmap/munmap. > > I may work. But I'm not sure how it will work with remote mm accesses. > Like with /proc/ interfaces or ptrace. Those users call mmget() which increases mm_users. See m_start() in fs/proc/task_mmu.c.