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

sparc: 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.

{pud,pmd}_alloc_one is using __GFP_REPEAT but it always allocates from
pgtable_cache which is initialzed to PAGE_SIZE objects. 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-13-git-send-email-mhocko@kernel.org
Signed-off-by: Michal Hocko <mhocko@suse.com>
Acked-by: David S. Miller <davem@davemloft.net>
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
45eeff26 2379a23e

+2 -4
+2 -4
arch/sparc/include/asm/pgalloc_64.h
··· 41 41 42 42 static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long addr) 43 43 { 44 - return kmem_cache_alloc(pgtable_cache, 45 - GFP_KERNEL|__GFP_REPEAT); 44 + return kmem_cache_alloc(pgtable_cache, GFP_KERNEL); 46 45 } 47 46 48 47 static inline void pud_free(struct mm_struct *mm, pud_t *pud) ··· 51 52 52 53 static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long addr) 53 54 { 54 - return kmem_cache_alloc(pgtable_cache, 55 - GFP_KERNEL|__GFP_REPEAT); 55 + return kmem_cache_alloc(pgtable_cache, GFP_KERNEL); 56 56 } 57 57 58 58 static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd)