Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1390181

[PATCH 12/20] sparc: get rid of superfluous __GFP_REPEAT

Path csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!gothmog.csi.it!bofh.it!news.nic.it!robomod
From Michal Hocko <mhocko@kernel.org>
Newsgroups linux.kernel
Subject [PATCH 12/20] sparc: get rid of superfluous __GFP_REPEAT
Date Thu, 28 Apr 2016 15:30:04 +0200
Message-ID <rsUb2-3LP-59@gated-at.bofh.it> (permalink)
References <rsUaZ-3LP-3@gated-at.bofh.it>
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=AUIYKrlAsr+73knq8+393XBpaskAOhSRwjDLGdA87jU=; b=Iv9i2ctDxFK7ptHzR+Gwe8dWzb7z2ptw0hdCECTqSRcgDgkqiiwUd8zSVydlC6Cwbh yAXz6RwrdxVNTSLCSiYdY9UOoJu5t2GmU5OdbiemZajZj7BdC+8x0spORN2IOyxYi/2H XTNTVQFhgROpQs0GlZ//6QiyGvCU94WpozwN041YQYRepwdBNQsmdEpA4CPiTlDKMbBM tphfaPyJrEy5tlOVtIBNOFha8vkgfUvVLTvyCEHvW7x11gtEPNpWm3yx/Gfmcmzn0upB xAxibYkw4xWQz9YIGr4UMN0XxlXBo2XNarXo6JUhiqHj0JbwVaf5r5omfhsafh373aar Ugsw==
X-Gm-Message-State AOPr4FVukE0I/tjhsQ+r7Es16fM3BrU6i5RrCjohx+JOssOoShrtp5m11zeFoEFGMAyXjw==
X-Received by 10.28.62.15 with SMTP id l15mr17140816wma.30.1461849861332; Thu, 28 Apr 2016 06:24:21 -0700 (PDT)
X-Mailer git-send-email 2.8.0.rc3
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 43
Organization linux.* mail to news gateway
X-Original-Cc <linux-mm@kvack.org>, LKML <linux-kernel@vger.kernel.org>, Michal Hocko <mhocko@suse.com>, "David S. Miller" <davem@davemloft.net>, linux-arch@vger.kernel.org
X-Original-Date Thu, 28 Apr 2016 15:23:58 +0200
X-Original-Message-ID <1461849846-27209-13-git-send-email-mhocko@kernel.org>
X-Original-References <1461849846-27209-1-git-send-email-mhocko@kernel.org>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1390181

Show key headers only | View raw


From: Michal Hocko <mhocko@suse.com>

__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.

Cc: "David S. Miller" <davem@davemloft.net>
Cc: linux-arch@vger.kernel.org
Signed-off-by: Michal Hocko <mhocko@suse.com>
---
 arch/sparc/include/asm/pgalloc_64.h | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/sparc/include/asm/pgalloc_64.h b/arch/sparc/include/asm/pgalloc_64.h
index 5e3187185b4a..3529f1378cd8 100644
--- a/arch/sparc/include/asm/pgalloc_64.h
+++ b/arch/sparc/include/asm/pgalloc_64.h
@@ -41,8 +41,7 @@ static inline void __pud_populate(pud_t *pud, pmd_t *pmd)
 
 static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long addr)
 {
-	return kmem_cache_alloc(pgtable_cache,
-				GFP_KERNEL|__GFP_REPEAT);
+	return kmem_cache_alloc(pgtable_cache, GFP_KERNEL);
 }
 
 static inline void pud_free(struct mm_struct *mm, pud_t *pud)
@@ -52,8 +51,7 @@ static inline void pud_free(struct mm_struct *mm, pud_t *pud)
 
 static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long addr)
 {
-	return kmem_cache_alloc(pgtable_cache,
-				GFP_KERNEL|__GFP_REPEAT);
+	return kmem_cache_alloc(pgtable_cache, GFP_KERNEL);
 }
 
 static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd)
-- 
2.8.0.rc3

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH 12/20] sparc: get rid of superfluous __GFP_REPEAT Michal Hocko <mhocko@kernel.org> - 2016-04-28 15:30 +0200

csiph-web