Re: [RFC v3 PATCH 1/5] mm/page_alloc: use helper functions to add/remove a page to/from buddy
From: Matthew Wilcox
Date: Thu May 17 2018 - 06:56:38 EST
On Thu, May 17, 2018 at 04:48:21AM -0700, Matthew Wilcox wrote:
> On Wed, May 09, 2018 at 04:54:46PM +0800, Aaron Lu wrote:
> > +static inline void add_to_buddy_head(struct page *page, struct zone *zone,
> > + unsigned int order, int mt)
> > +{
> > + add_to_buddy_common(page, zone, order);
> > + list_add(&page->lru, &zone->free_area[order].free_list[mt]);
> > +}
>
> Isn't this function (and all of its friends) misnamed? We're not adding
> this page to the buddy allocator, we're adding it to the freelist. It
> doesn't go to the buddy allocator until later, if at all.
No, never mind, I misunderstood. Ignore this please.