On Sat, Oct 05, 2019 at 02:05:29PM +0530, Aneesh Kumar K.V wrote: > MADV_DONTNEED has caused us multiple issues due to the fact that it can run > in parallel to page fault. I am not sure whether we have a known/noticeable > performance gain in allowing that with mmap_sem held in read mode. Yes we do. MADV_DONTNEED used a lot by userspace memory allocators and it will be very noticible performance regression if we would switch it to down_write(mmap_sem). -- Kirill A. Shutemov