Re: [PATCH v4 1/2] mm: store zero pages to be swapped out in a bitmap

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 5, 2024 at 11:57 AM Yosry Ahmed <yosryahmed@xxxxxxxxxx> wrote:
>
> [..]
> > well. i feel i have a much cheaper way to implement this, which
> > can entirely iteration even in your original code:
> >
> > +/*
> > + * Return the number of entries which are zero-filled according to
> > + * swap_info_struct->zeromap. It isn't precise if the return value
> > + * is 1 for nr > 1. In this case, it means entries have inconsistent
> > + * zeromap.
> > + */
> > +static inline unsigned int swap_zeromap_entries_count(swp_entry_t
> > entry, int nr)
>
> FWIW I am not really a fan of the count() function not returning an
> actual count. I think an enum with three states is more appropriate
> here, and renaming the function to swap_zeromap_entries_check() or
> similar.
>

Make sense to me, what about the below?


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux