On 11/25/24 22:01, Matthew Wilcox (Oracle) wrote: > Save 17 bytes of text by calculating page_zone() once instead of twice. > > Reviewed-by: Miaohe Lin <linmiaohe@xxxxxxxxxx> > Reviewed-by: Muchun Song <songmuchun@xxxxxxxxxxxxx> > Acked-by: Mel Gorman <mgorman@xxxxxxxxxxxxxxxxxxxx> > Signed-off-by: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx> Reviewed-by: Vlastimil Babka <vbabka@xxxxxxx> > --- > mm/page_alloc.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/mm/page_alloc.c b/mm/page_alloc.c > index a8cd54c02f13..c40a0c29a89c 100644 > --- a/mm/page_alloc.c > +++ b/mm/page_alloc.c > @@ -2700,16 +2700,16 @@ void free_unref_page(struct page *page, unsigned int order) > * get those areas back if necessary. Otherwise, we may have to free > * excessively into the page allocator > */ > + zone = page_zone(page); > migratetype = get_pfnblock_migratetype(page, pfn); > if (unlikely(migratetype >= MIGRATE_PCPTYPES)) { > if (unlikely(is_migrate_isolate(migratetype))) { > - free_one_page(page_zone(page), page, pfn, order, FPI_NONE); > + free_one_page(zone, page, pfn, order, FPI_NONE); > return; > } > migratetype = MIGRATE_MOVABLE; > } > > - zone = page_zone(page); > pcp_trylock_prepare(UP_flags); > pcp = pcp_spin_trylock(zone->per_cpu_pageset); > if (pcp) {