Re: [PATCH v3] mm: swap: async free swap slot cache entries

From: Tim Chen
Date: Wed Feb 14 2024 - 17:54:31 EST


On Wed, 2024-02-14 at 10:56 -0800, Chris Li wrote:
> On Tue, Feb 13, 2024 at 4:08 PM Tim Chen <tim.c.chen@xxxxxxxxxxxxxxx> wrote:
> >
> >
> > >
> > > extern bool swap_slot_cache_enabled;
> > > +extern uint8_t slot_cache_async_free __read_mostly;
> >
> > Why wouldn't you enable the async_free always?
> > Otherwise the patch looks fine to me.
>
> Thanks for the feedback.
>
> Just in case someone doesn't care about this optimization and wants to
> opt out this behavior?
> Anyway, I am happy to update the patch without the sysfs control file as well.
>

At least I couldn't see a downside to enable it always in the latest
patch. I think adding an extra sysfs is unnecessary.

Tim