[PATCH v1 2/2] mm: simplify free_highmem_page() and free_reserved_page()

Oscar Salvador osalvador at suse.de
Wed Jan 27 11:51:27 UTC 2021


On Tue, Jan 26, 2021 at 07:21:13PM +0100, David Hildenbrand wrote:
> adjust_managed_page_count() as called by free_reserved_page() properly
> handles pages in a highmem zone, so we can reuse it for
> free_highmem_page().
> 
> We can now get rid of totalhigh_pages_inc() and simplify
> free_reserved_page().
> 
> Cc: Andrew Morton <akpm at linux-foundation.org>
> Cc: Thomas Gleixner <tglx at linutronix.de>
> Cc: "Peter Zijlstra (Intel)" <peterz at infradead.org>
> Cc: Mike Rapoport <rppt at kernel.org>
> Cc: Oscar Salvador <osalvador at suse.de>
> Cc: Michal Hocko <mhocko at kernel.org>
> Cc: Wei Yang <richard.weiyang at linux.alibaba.com>
> Signed-off-by: David Hildenbrand <david at redhat.com>

Reviewed-by: Oscar Salvador <osalvador at suse.de>

> +#define free_highmem_page(page) free_reserved_page(page)

Should we place that under #ifdef CONFIG_HIGHMEM to make clear
that it is only used on that config?
Maybe the #ifdefery ugliness does not pay off.

-- 
Oscar Salvador
SUSE L3


More information about the dri-devel mailing list