Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

arm: get rid of superfluous __GFP_REPEAT

__GFP_REPEAT has a rather weak semantic but since it has been introduced
around 2.6.12 it has been ignored for low order allocations.

PGALLOC_GFP uses __GFP_REPEAT but none of the allocation which uses this
flag is for more than order-2. This means that this flag has never been
actually useful here because it has always been used only for
PAGE_ALLOC_COSTLY requests.

Link: http://lkml.kernel.org/r/1464599699-30131-5-git-send-email-mhocko@kernel.org
Signed-off-by: Michal Hocko <mhocko@suse.com>
Cc: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Michal Hocko and committed by
Linus Torvalds
397b080b e6580525

+2 -2
+1 -1
arch/arm/include/asm/pgalloc.h
··· 57 57 extern pgd_t *pgd_alloc(struct mm_struct *mm); 58 58 extern void pgd_free(struct mm_struct *mm, pgd_t *pgd); 59 59 60 - #define PGALLOC_GFP (GFP_KERNEL | __GFP_NOTRACK | __GFP_REPEAT | __GFP_ZERO) 60 + #define PGALLOC_GFP (GFP_KERNEL | __GFP_NOTRACK | __GFP_ZERO) 61 61 62 62 static inline void clean_pte_table(pte_t *pte) 63 63 {
+1 -1
arch/arm/mm/pgd.c
··· 23 23 #define __pgd_alloc() kmalloc(PTRS_PER_PGD * sizeof(pgd_t), GFP_KERNEL) 24 24 #define __pgd_free(pgd) kfree(pgd) 25 25 #else 26 - #define __pgd_alloc() (pgd_t *)__get_free_pages(GFP_KERNEL | __GFP_REPEAT, 2) 26 + #define __pgd_alloc() (pgd_t *)__get_free_pages(GFP_KERNEL, 2) 27 27 #define __pgd_free(pgd) free_pages((unsigned long)pgd, 2) 28 28 #endif 29 29