On Wed, Apr 05, 2023 at 04:28:40PM +0200, Vlastimil Babka wrote: > Commit 700d2e9a36b9 ("mm, page_alloc: reduce page alloc/free sanity > checks") has introduced a new static key check_pages_enabled to control > when struct pages are sanity checked during allocation and freeing. Mel > Gorman suggested that free_tail_pages_check() could use this static key > as well, instead of relying on CONFIG_DEBUG_VM. That makes sense, so do > that. Also rename the function to free_tail_page_prepare() because it > works on a single tail page and has a struct page preparation component > as well as the optional checking component. > Also remove some unnecessary unlikely() within static_branch_unlikely() > statements that Mel pointed out for commit 700d2e9a36b9. > > Suggested-by: Mel Gorman <mgorman@xxxxxxxxxxxxxxxxxxx> > Signed-off-by: Vlastimil Babka <vbabka@xxxxxxx> Acked-by: Mel Gorman <mgorman@xxxxxxxxxxxxxxxxxxx> -- Mel Gorman SUSE Labs