lkml.org 
[lkml]   [2022]   [May]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] mm: don't be stuck to rmap lock on reclaim path
On Mon,  9 May 2022 08:47:10 -0700 Minchan Kim <minchan@kernel.org> wrote:

> The rmap locks(i_mmap_rwsem and anon_vma->root->rwsem) could be
> contented under memory pressure if processes keep working on
> their vmas(e.g., fork, mmap, munmap). It makes reclaim path
> stuck. In our real workload traces, we see kswapd is waiting the
> lock for 300ms+(a sec as worst case) and it makes other processes
> entering direct reclaim, which were also stuck on the lock.
>
> This patch makes LRU aging path try_lock mode like shink_page_list
> so the reclaim context will keep working with next LRU pages
> without being stuck.
>
> Since this patch introduces a new "contended" field as out-param
> along with try_lock in-param in rmap_walk_control, it's not
> immutable any longer if the try_lock is set so remove const
> keywords on rmap related functions. Since rmap walking is already
> expensive operation, I doubt the const would help sizable benefit(
> And we didn't have it until 5.17).

Some quantitative testing results would be helpful. Demonstrate
the benefits of the patch?

\
 
 \ /
  Last update: 2022-05-09 20:56    [W:0.219 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site