The patch titled Subject: mm: introduce free_highmem_page() helper to free highmem pages into buddy system has been removed from the -mm tree. Its filename was mm-introduce-free_highmem_page-helper-to-free-highmem-pages-into-buddy-system.patch This patch was dropped because it was merged into mainline or a subsystem tree ------------------------------------------------------ From: Jiang Liu <liuj97@xxxxxxxxx> Subject: mm: introduce free_highmem_page() helper to free highmem pages into buddy system The original goal of this patchset is to fix the bug reported by https://bugzilla.kernel.org/show_bug.cgi?id=53501 Now it has also been expanded to reduce common code used by memory initializion. This is the second part, which applies to the previous part at: http://marc.info/?l=linux-mm&m=136289696323825&w=2 It introduces a helper function free_highmem_page() to free highmem pages into the buddy system when initializing mm subsystem. Introduction of free_highmem_page() is one step forward to clean up accesses and modificaitons of totalhigh_pages, totalram_pages and zone->managed_pages etc. I hope we could remove all references to totalhigh_pages from the arch/ subdirectory. We have only tested these patchset on x86 platforms, and have done basic compliation tests using cross-compilers from ftp.kernel.org. That means some code may not pass compilation on some architectures. So any help to test this patchset are welcomed! There are several other parts still under development: Part3: refine code to manage totalram_pages, totalhigh_pages and zone->managed_pages Part4: introduce helper functions to simplify mem_init() and remove the global variable num_physpages. This patch: Introduce helper function free_highmem_page(), which will be used by architectures with HIGHMEM enabled to free highmem pages into the buddy system. Signed-off-by: Jiang Liu <jiang.liu@xxxxxxxxxx> Cc: "David S. Miller" <davem@xxxxxxxxxxxxx> Cc: "H. Peter Anvin" <hpa@xxxxxxxxx> Cc: "Suzuki K. Poulose" <suzuki@xxxxxxxxxx> Cc: Alexander Graf <agraf@xxxxxxx> Cc: Arnd Bergmann <arnd@xxxxxxxx> Cc: Attilio Rao <attilio.rao@xxxxxxxxxx> Cc: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx> Cc: Cong Wang <amwang@xxxxxxxxxx> Cc: David Daney <david.daney@xxxxxxxxxx> Cc: David Howells <dhowells@xxxxxxxxxx> Cc: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> Cc: Ingo Molnar <mingo@xxxxxxxxxx> Cc: James Hogan <james.hogan@xxxxxxxxxx> Cc: Jeff Dike <jdike@xxxxxxxxxxx> Cc: Jiang Liu <jiang.liu@xxxxxxxxxx> Cc: Jiang Liu <liuj97@xxxxxxxxx> Cc: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> Cc: Konstantin Khlebnikov <khlebnikov@xxxxxxxxxx> Cc: Linus Walleij <linus.walleij@xxxxxxxxxx> Cc: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx> Cc: Mel Gorman <mgorman@xxxxxxx> Cc: Michal Nazarewicz <mina86@xxxxxxxxxx> Cc: Michal Simek <monstr@xxxxxxxxx> Cc: Michel Lespinasse <walken@xxxxxxxxxx> Cc: Minchan Kim <minchan@xxxxxxxxxx> Cc: Paul Mackerras <paulus@xxxxxxxxx> Cc: Ralf Baechle <ralf@xxxxxxxxxxxxxx> Cc: Richard Weinberger <richard@xxxxxx> Cc: Rik van Riel <riel@xxxxxxxxxx> Cc: Russell King <linux@xxxxxxxxxxxxxxxx> Cc: Sam Ravnborg <sam@xxxxxxxxxxxx> Cc: Stephen Boyd <sboyd@xxxxxxxxxxxxxx> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx> Cc: Yinghai Lu <yinghai@xxxxxxxxxx> Reviewed-by: Pekka Enberg <penberg@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- include/linux/mm.h | 7 +++++++ mm/page_alloc.c | 9 +++++++++ 2 files changed, 16 insertions(+) diff -puN include/linux/mm.h~mm-introduce-free_highmem_page-helper-to-free-highmem-pages-into-buddy-system include/linux/mm.h --- a/include/linux/mm.h~mm-introduce-free_highmem_page-helper-to-free-highmem-pages-into-buddy-system +++ a/include/linux/mm.h @@ -1303,6 +1303,13 @@ extern void free_initmem(void); */ extern unsigned long free_reserved_area(unsigned long start, unsigned long end, int poison, char *s); +#ifdef CONFIG_HIGHMEM +/* + * Free a highmem page into the buddy system, adjusting totalhigh_pages + * and totalram_pages. + */ +extern void free_highmem_page(struct page *page); +#endif static inline void adjust_managed_page_count(struct page *page, long count) { diff -puN mm/page_alloc.c~mm-introduce-free_highmem_page-helper-to-free-highmem-pages-into-buddy-system mm/page_alloc.c --- a/mm/page_alloc.c~mm-introduce-free_highmem_page-helper-to-free-highmem-pages-into-buddy-system +++ a/mm/page_alloc.c @@ -5141,6 +5141,15 @@ unsigned long free_reserved_area(unsigne return pages; } +#ifdef CONFIG_HIGHMEM +void free_highmem_page(struct page *page) +{ + __free_reserved_page(page); + totalram_pages++; + totalhigh_pages++; +} +#endif + /** * set_dma_reserve - set the specified number of pages reserved in the first zone * @new_dma_reserve: The number of pages to mark reserved _ Patches currently in -mm which might be from liuj97@xxxxxxxxx are origin.patch mm-sparc-use-common-help-functions-to-free-reserved-pages.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html