Re: Splitting the mmap_sem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Dec 03, 2019 at 02:21:47PM -0800, Matthew Wilcox wrote:
> My preferred solution to the mmap_sem scalability problem is to allow
> VMAs to be looked up under the RCU read lock then take a per-VMA lock.
> I've been focusing on the first half of this problem (looking up VMAs
> in an RCU-safe data structure) and ignoring the second half (taking a
> lock while holding the RCU lock).

Do you see this approach to be regression-free for uncontended case?
I doubt it will not cause regressions for signle-threaded applications...

> We currently only have one ->map_pages() callback, and it's
> filemap_map_pages().  It only needs to sleep in one place -- to allocate
> a PTE table.  I think that can be allocated ahead of time if needed.

No, filemap_map_pages() doesn't sleep. It cannot. Whole body of the
function is under rcu_read_lock(). It uses pre-allocated page table.
See do_fault_around().

-- 
 Kirill A. Shutemov




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux