On 31.05.22 17:06, Matthew Wilcox (Oracle) wrote: > Both callers pass in page_zone(page), so move that into free_one_page(). > Shrinks page_alloc.o by 196 bytes with allmodconfig. > > Signed-off-by: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx> > --- > mm/page_alloc.c | 11 +++++------ > 1 file changed, 5 insertions(+), 6 deletions(-) > > diff --git a/mm/page_alloc.c b/mm/page_alloc.c > index 29d775b60cf9..68bb77900f67 100644 > --- a/mm/page_alloc.c > +++ b/mm/page_alloc.c > @@ -1529,11 +1529,10 @@ static void free_pcppages_bulk(struct zone *zone, int count, > spin_unlock(&zone->lock); > } > > -static void free_one_page(struct zone *zone, > - struct page *page, unsigned long pfn, > - unsigned int order, > - int migratetype, fpi_t fpi_flags) > +static void free_one_page(struct page *page, unsigned long pfn, > + unsigned int order, int migratetype, fpi_t fpi_flags) > { > + struct zone *zone = page_zone(page); > unsigned long flags; > > spin_lock_irqsave(&zone->lock, flags); > @@ -3448,7 +3447,7 @@ void free_unref_page(struct page *page, unsigned int order) > migratetype = get_pcppage_migratetype(page); > if (unlikely(migratetype >= MIGRATE_PCPTYPES)) { > if (unlikely(is_migrate_isolate(migratetype))) { > - free_one_page(page_zone(page), page, pfn, order, migratetype, FPI_NONE); > + free_one_page(page, pfn, order, migratetype, FPI_NONE); > return; > } > migratetype = MIGRATE_MOVABLE; > @@ -3484,7 +3483,7 @@ void free_unref_page_list(struct list_head *list) > migratetype = get_pcppage_migratetype(page); > if (unlikely(is_migrate_isolate(migratetype))) { > list_del(&page->lru); > - free_one_page(page_zone(page), page, pfn, 0, migratetype, FPI_NONE); > + free_one_page(page, pfn, 0, migratetype, FPI_NONE); > continue; > } > } Reviewed-by: David Hildenbrand <david@xxxxxxxxxx> -- Thanks, David / dhildenb