[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZpA-iuAItDxBSfBS@zx2c4.com>
Date: Thu, 11 Jul 2024 22:20:26 +0200
From: "Jason A. Donenfeld" <Jason@...c4.com>
To: Yu Zhao <yuzhao@...gle.com>
Cc: David Hildenbrand <david@...hat.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
linux-kernel@...r.kernel.org, patches@...ts.linux.dev,
tglx@...utronix.de, linux-crypto@...r.kernel.org,
linux-api@...r.kernel.org, x86@...nel.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Adhemerval Zanella Netto <adhemerval.zanella@...aro.org>,
Carlos O'Donell <carlos@...hat.com>,
Florian Weimer <fweimer@...hat.com>, Arnd Bergmann <arnd@...db.de>,
Jann Horn <jannh@...gle.com>,
Christian Brauner <brauner@...nel.org>,
David Hildenbrand <dhildenb@...hat.com>, linux-mm@...ck.org
Subject: Re: [PATCH v22 1/4] mm: add MAP_DROPPABLE for designating always
lazily freeable mappings
Hi David,
On Thu, Jul 11, 2024 at 01:49:42PM -0600, Yu Zhao wrote:
> On Thu, Jul 11, 2024 at 1:20 PM David Hildenbrand <david@...hat.com> wrote:
> > > - /* dirty lazyfree */
> > > - if (type == LRU_GEN_FILE && folio_test_anon(folio) && folio_test_dirty(folio)) {
> > > - success = lru_gen_del_folio(lruvec, folio, true);
> > > - VM_WARN_ON_ONCE_FOLIO(!success, folio);
> > > - folio_set_swapbacked(folio);
> > > - lruvec_add_folio_tail(lruvec, folio);
> > > - return true;
> > > - }
> This is an optimization to avoid an unnecessary trip to
> shrink_folio_list(), so it's safe to delete the entire 'if' block, and
> that would be preferable than leaving a dangling 'if'.
Alright, I'll just remove that entire chunk then, for v+1 of this patch?
That sounds prettttty okay.
Jason
Powered by blists - more mailing lists