Re: [bug report?] unintuitive behavior when mapping over hugepage-backed PROT_NONE regions

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

 



On Sat, Feb 08, 2025 at 05:40:41PM +0000, Lorenzo Stoakes wrote:
> >
> > We tried THP around 2012 and rejected it.  The latency tail became a lot
> > longer and fatter.  Various things have changed that might make THP less
> > bad today, but I am not aware of anyone reevaluating it.
> 
> A _lot_ has changed. Try it again :)
> 
> >
> > I think the problem with THP was the mmap_sem.  Given a heavily threaded
> > process, the mmap_sem tends to be the one dominant lock in the kernel.
> 
> A lot of work has been done on reducing mmap_sem contention. Again, worth
> another shot ;)

Probably worth it, agreed.  But unlikely to happen in the near term for
various reasons.

One of the biggest improvements was actually userspace.  Glibc malloc is
very eager to call mprotect for reasons that imo never made any sense.
Replacing glibc malloc with any sane allocator will significantly reduce
the number of mmap_sem taking system calls.

Another hard-to-avoid problem is all the variations of "ps" that take
the mmap_sem for every process in the system.

Jörn

--
You can't do much carpentry with your bare hands and you can't do much
thinking with your bare brain.
-- unknown




[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