[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251015125911.0f0ebf87b278324667c4dfc5@linux-foundation.org>
Date: Wed, 15 Oct 2025 12:59:11 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Dmitry Ilvokhin <d@...okhin.com>
Cc: Shakeel Butt <shakeel.butt@...ux.dev>, Kemeng Shi
<shikemeng@...weicloud.com>, Kairui Song <kasong@...cent.com>, Nhat Pham
<nphamcs@...il.com>, Baoquan He <bhe@...hat.com>, Barry Song
<baohua@...nel.org>, Chris Li <chrisl@...nel.org>, Axel Rasmussen
<axelrasmussen@...gle.com>, Yuanchu Xie <yuanchu@...gle.com>, Wei Xu
<weixugc@...gle.com>, Kiryl Shutsemau <kas@...nel.org>, Usama Arif
<usamaarif642@...il.com>, linux-mm@...ck.org, linux-kernel@...r.kernel.org,
kernel-team@...a.com, hughd@...gle.com, yangge1116@....com,
david@...hat.com
Subject: Re: [PATCH v2] mm: skip folio_activate() for mlocked folios
On Wed, 8 Oct 2025 18:06:07 +0000 Dmitry Ilvokhin <d@...okhin.com> wrote:
> > > + * They might be still in mlock_fbatch waiting to be processed
> > > + * and activating it here might interfere with
> > > + * mlock_folio_batch(). __mlock_folio() will fail
> > > + * folio_test_clear_lru() check and give up. It happens because
> > > + * __folio_batch_add_and_move() clears LRU flag, when adding
> > > + * folio to activate batch.
> > > + */
> >
> > This makes sense as activating an mlocked folio should be a noop but I
> > am wondering why we are seeing this now. By this, I mean mlock()ed
> > memory being delayed to get to unevictable LRU. Also I remember Hugh
> > recently [1] removed the difference betwen mlock percpu cache and other
> > percpu caches of clearing LRU bit on entry. Does you repro work even
> > with Hugh's changes or without it?
> >
>
> Thanks Shakeel for mentioning Hugh's patch, I was not aware of it.
> Indeed, I could not reproduce problem on top of Hugh's patch anymore,
> which totally make sense, because folio_test_clear_lru() is gone from
> __folio_batch_add_and_move().
>
> Now I wonder does folio_test_mlocked() check still make sense in the
> current codebase?
>
> > [1] https://lore.kernel.org/all/05905d7b-ed14-68b1-79d8-bdec30367eba@google.com/
So I take it that this patch ("mm: skip folio_activate() for mlocked
folios") is no longer needed?
Powered by blists - more mailing lists