Skip to content

Commit 54d87d6

Browse files
Michal Hockotorvalds
authored andcommitted
arc: 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. pte_alloc_one_kernel uses __get_order_pte but this is obviously always zero because BITS_FOR_PTE is not larger than 9 yet the page size is always larger than 4K. 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-7-git-send-email-mhocko@kernel.org Signed-off-by: Michal Hocko <mhocko@suse.com> Acked-by: Vineet Gupta <vgupta@synopsys.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent f3610a6 commit 54d87d6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎arch/arc/include/asm/pgalloc.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm,
9595
{
9696
pte_t *pte;
9797

98-
pte = (pte_t *) __get_free_pages(GFP_KERNEL | __GFP_REPEAT | __GFP_ZERO,
98+
pte = (pte_t *) __get_free_pages(GFP_KERNEL | __GFP_ZERO,
9999
__get_order_pte());
100100

101101
return pte;
@@ -107,7 +107,7 @@ pte_alloc_one(struct mm_struct *mm, unsigned long address)
107107
pgtable_t pte_pg;
108108
struct page *page;
109109

110-
pte_pg = (pgtable_t)__get_free_pages(GFP_KERNEL | __GFP_REPEAT, __get_order_pte());
110+
pte_pg = (pgtable_t)__get_free_pages(GFP_KERNEL, __get_order_pte());
111111
if (!pte_pg)
112112
return 0;
113113
memzero((void *)pte_pg, PTRS_PER_PTE * sizeof(pte_t));

0 commit comments

Comments
 (0)