Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1343103
| Path | csiph.com!news.mixmin.net!aioe.org!gothmog.csi.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | Michal Hocko <mhocko@kernel.org> |
| Newsgroups | linux.kernel |
| Subject | [PATCH] mm: remove __GFP_NOFAIL is deprecated comment |
| Date | Thu, 25 Feb 2016 11:50:02 +0100 |
| Message-ID | <r61EC-2xk-9@gated-at.bofh.it> (permalink) |
| X-Original-To | Andrew Morton <akpm@linux-foundation.org> |
| 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; bh=NpkK7oOfxQOeJcnJWnlnjdHGMw6+XAuKjN+K/SD6KJY=; b=Jrovk6fdJbDJqUlPOclqOCXslaQuo9MU5YvS2PvnzWXhmEIle/GHdBw8rJpgOEfpjP DnRJgqv4ujzXs2BdIwPnjczMgw+ljk46rIltYmBlb2SOXSIG6hVtT9ERjSK49886oUoj l3SUT53N/Vq5HMpAh/ngfvZntcNL+K806NeSt0zXoBFDJbUkyKHbz2FQxWM15WoP/l6B p4fAFl0O3dcsqbgUMRKfvA7Ka0pjfHznmo08Dc9N46N36M+IqOeqsyXKN+4P6JZbKtsN Sc0JUdlWYaUxPAe+Zh01zntVmuzNT3QrRIjqDmDd/BevxlaZFcA2dOOJVdJHy5pBmesi Cv9A== |
| X-Gm-Message-State | AG10YOSQsx8ER99MkOSdRe8pQcm9q+J6iEKwIHHH4bOKyrDldRPtHicBVIP3THubJp37RQ== |
| X-Received | by 10.194.76.161 with SMTP id l1mr43701045wjw.108.1456397009241; Thu, 25 Feb 2016 02:43:29 -0800 (PST) |
| X-Mailer | git-send-email 2.7.0 |
| 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 | 49 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | David Rientjes <rientjes@google.com>, Nikolay Borisov <kernel@kyup.com>, <linux-mm@kvack.org>, LKML <linux-kernel@vger.kernel.org>, Michal Hocko <mhocko@suse.com> |
| X-Original-Date | Thu, 25 Feb 2016 11:43:22 +0100 |
| X-Original-Message-ID | <1456397002-27172-1-git-send-email-mhocko@kernel.org> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1343103 |
Show key headers only | View raw
From: Michal Hocko <mhocko@suse.com>
647757197cd3 ("mm: clarify __GFP_NOFAIL deprecation status") was
incomplete and didn't remove the comment about __GFP_NOFAIL being
deprecated in buffered_rmqueue. Let's get rid of this leftover
but keep the WARN_ON_ONCE for order > 1 because we should really
discourage from using __GFP_NOFAIL with higher order allocations
because those are just too subtle.
Signed-off-by: Michal Hocko <mhocko@suse.com>
---
Hi,
this popped out when discussing another patch http://lkml.kernel.org/r/56CEC568.6080809@kyup.com
so I think it is worth removing the comment.
mm/page_alloc.c | 18 +++++-------------
1 file changed, 5 insertions(+), 13 deletions(-)
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 1993894b4219..109d975a7172 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -2347,19 +2347,11 @@ struct page *buffered_rmqueue(struct zone *preferred_zone,
list_del(&page->lru);
pcp->count--;
} else {
- if (unlikely(gfp_flags & __GFP_NOFAIL)) {
- /*
- * __GFP_NOFAIL is not to be used in new code.
- *
- * All __GFP_NOFAIL callers should be fixed so that they
- * properly detect and handle allocation failures.
- *
- * We most definitely don't want callers attempting to
- * allocate greater than order-1 page units with
- * __GFP_NOFAIL.
- */
- WARN_ON_ONCE(order > 1);
- }
+ /*
+ * We most definitely don't want callers attempting to
+ * allocate greater than order-1 page units with __GFP_NOFAIL.
+ */
+ WARN_ON_ONCE(unlikely(gfp_flags & __GFP_NOFAIL) && (order > 1));
spin_lock_irqsave(&zone->lock, flags);
page = NULL;
--
2.7.0
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] mm: remove __GFP_NOFAIL is deprecated comment Michal Hocko <mhocko@kernel.org> - 2016-02-25 11:50 +0100
Re: [PATCH] mm: remove __GFP_NOFAIL is deprecated comment Nikolay Borisov <kernel@kyup.com> - 2016-02-25 12:40 +0100
Re: [PATCH] mm: remove __GFP_NOFAIL is deprecated comment Michal Hocko <mhocko@kernel.org> - 2016-02-25 14:50 +0100
csiph-web