lkml.org 
[lkml]   [2022]   [May]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] mm: don't be stuck to rmap lock on reclaim path
On Wed, 4 May 2022 23:11:04 -0700 Minchan Kim <minchan@kernel.org> wrote:

> > > +
> > > + static struct rmap_walk_control rwc = {
> > > .rmap_one = page_idle_clear_pte_refs_one,
> > > .anon_lock = folio_lock_anon_vma_read,
> > > };
>
> So, delta is

--- a/mm/page_idle.c~mm-dont-be-stuck-to-rmap-lock-on-reclaim-path-fix
+++ a/mm/page_idle.c
@@ -87,6 +87,10 @@ static void page_idle_clear_pte_refs(str
{
struct folio *folio = page_folio(page);

+ /*
+ * Since rwc.try_lock is unused, rwc is effectively immutable, so we
+ * can make it static to save some cycles and stack.
+ */
static struct rmap_walk_control rwc = {
.rmap_one = page_idle_clear_pte_refs_one,
.anon_lock = folio_lock_anon_vma_read,
_
and with that, I believe this change is good to be imported into mm-stable
later this week.

\
 
 \ /
  Last update: 2022-05-18 01:59    [W:0.149 / U:0.828 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site