Re: [RFC PATCH 12/14] mm/madvise: introduce batched madvise(MADV_COLLPASE) collapse

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

 



On Thu, Mar 10, 2022 at 12:17 PM Matthew Wilcox <willy@xxxxxxxxxxxxx> wrote:
>
> On Thu, Mar 10, 2022 at 11:26:15AM -0800, David Rientjes wrote:
> > One concern might be the queueing of read locks needed for page faults
> > behind a collapser of a long range of memory that is otherwise looping
> > and repeatedly taking the write lock.
>
> I would have thought that _not_ batching would improve this situation.
> Unless our implementation of rwsems has changed since the last time I
> looked, dropping-and-reacquiring a rwsem while there are pending readers
> means you go to the end of the line and they all get to handle their
> page faults.
>

Hey Matthew, thanks for the review / feedback.

I don't have great intuition here, so I'll try to put together a
simple synthetic test to get some data. Though the code would be
different, I can functionally approximate a non-batched approach with
a batch size of 1, and compare that against N.

My file-backed patches likewise weren't able to take advantage of
batching outside mmap lock contention, so the data should equally
apply there.




[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