Re: [PATCH v22 1/4] mm: add MAP_DROPPABLE for designating always lazily freeable mappings

From: Jason A. Donenfeld
Date: Thu Jul 11 2024 - 16:20:44 EST


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@xxxxxxxxxx> 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