Re: [PATCH mmotm] mm: delete __ClearPageWaiters()

From: Yu Zhao
Date: Wed Mar 02 2022 - 21:15:24 EST


On Wed, Mar 2, 2022 at 6:56 PM Hugh Dickins <hughd@xxxxxxxxxx> wrote:
>
> The PG_waiters bit is not included in PAGE_FLAGS_CHECK_AT_FREE, and
> vmscan.c's free_unref_page_list() callers rely on that not to generate
> bad_page() alerts. So __page_cache_release() and release_pages() (and
> the presumably copy-and-pasted put_zone_device_private_or_public_page())
> are redundant and misleading to make a special point of clearing it (as
> the "__" implies, it could only safely be used on the freeing path).
>
> Delete __ClearPageWaiters(). Remark on this in one of the "possible"
> comments in wake_up_page_bit(), and delete the superfluous comments.
>
> Signed-off-by: Hugh Dickins <hughd@xxxxxxxxxx>
> ---
> We've used this since 2018, and I see Yu Zhao posted similar in 2020:
> https://lore.kernel.org/linux-mm/20200818184704.3625199-3-yuzhao@xxxxxxxxxx/
> I couldn't join in at that time, but think its reception was over-cautious.

Indeed.

Tested-by: Yu Zhao <yuzhao@xxxxxxxxxx>