From patchwork Wed Apr 18 14:45:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Christoph Lameter (Ampere)" X-Patchwork-Id: 10348291 X-Patchwork-Delegate: snitzer@redhat.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8BF1760365 for ; Wed, 18 Apr 2018 14:49:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7CDA2286E7 for ; Wed, 18 Apr 2018 14:49:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7168B286EC; Wed, 18 Apr 2018 14:49:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 437E0286E7 for ; Wed, 18 Apr 2018 14:49:36 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C415BF56FA; Wed, 18 Apr 2018 14:49:34 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 58D547CA1A; Wed, 18 Apr 2018 14:49:32 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 29F6BADA7D; Wed, 18 Apr 2018 14:49:11 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w3IEn8wW030848 for ; Wed, 18 Apr 2018 10:49:08 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8FC627DFC9; Wed, 18 Apr 2018 14:49:08 +0000 (UTC) Delivered-To: dm-devel@redhat.com Received: from mx1.redhat.com (ext-mx10.extmail.prod.ext.phx2.redhat.com [10.5.110.39]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7F6287DFF8 for ; Wed, 18 Apr 2018 14:48:50 +0000 (UTC) Received: from resqmta-ch2-11v.sys.comcast.net (resqmta-ch2-11v.sys.comcast.net [69.252.207.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4ABC3CC08B for ; Wed, 18 Apr 2018 14:45:42 +0000 (UTC) Received: from resomta-ch2-17v.sys.comcast.net ([69.252.207.113]) by resqmta-ch2-11v.sys.comcast.net with ESMTP id 8oKTfwxd1mUWH8oL7fLU2k; Wed, 18 Apr 2018 14:45:41 +0000 Received: from gentwo.org ([98.222.162.64]) by resomta-ch2-17v.sys.comcast.net with SMTP id 8oL5f0A6OoKh68oL6fDp9Z; Wed, 18 Apr 2018 14:45:41 +0000 Received: by gentwo.org (Postfix, from userid 1001) id 9EA9B1161663; Wed, 18 Apr 2018 09:45:39 -0500 (CDT) Received: from localhost (localhost [127.0.0.1]) by gentwo.org (Postfix) with ESMTP id 9B09A1160540; Wed, 18 Apr 2018 09:45:39 -0500 (CDT) Date: Wed, 18 Apr 2018 09:45:39 -0500 (CDT) From: Christopher Lameter X-X-Sender: cl@nuc-kabylake To: Vlastimil Babka Message-ID: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 X-CMAE-Envelope: MS4wfO6UUdSyMsAk5Jj8wXmnfPAhDaGSLyCgNZA+Hqz6SxxvcjIjbcjapAgU5Fmu4uuY6L/Xc1aMTORSchHe2Cz7jBr9F2wt6n23tReXiYJ7PTs3B0zUhaIX uyOm+w0orQlpgk5JdIphUNKxjxi9mVurjbvqqmcqu10iyUKgXAGRT69EvswO4NGnRXJ0ksfT/mfkzkciG0Y8f9NUFwyB7d/cNHqihkcMmHzxhyT6wSF+5qpS gcANBrmooS46BaJnuWgtMXl9S98kQ9NnJ/ljVhe1jXEdZAaaNImq7OWlK6dqHqkzgfQph1GqaKA3iruTKRjEzNZVVdz5jwrL1bIeOaLVwt98yudAyxV3zZHV 0pEdRNAcgEXPhbG0uB/iNF1l1NTvSKMTxdLwDdJ9se0D0vcKcTE+xuB+/Bda1Zt7HJIk9OdAIzPXncgDjFsPamSty0zK/LPnSHU5wErPHoMla8gNgA6z6fkE p1jKqUTImnlp/aVs X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 207 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Wed, 18 Apr 2018 14:45:42 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Wed, 18 Apr 2018 14:45:42 +0000 (UTC) for IP:'69.252.207.43' DOMAIN:'resqmta-ch2-11v.sys.comcast.net' HELO:'resqmta-ch2-11v.sys.comcast.net' FROM:'cl@linux.com' RCPT:'' X-RedHat-Spam-Score: -0.702 (RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_PASS) 69.252.207.43 resqmta-ch2-11v.sys.comcast.net 69.252.207.43 resqmta-ch2-11v.sys.comcast.net X-Scanned-By: MIMEDefang 2.78 on 10.5.110.39 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: dm-devel@redhat.com Cc: Mike Snitzer , linux-kernel@vger.kernel.org, Matthew Wilcox , Pekka Enberg , linux-mm@kvack.org, dm-devel@redhat.com, Mikulas Patocka , David Rientjes , Joonsoo Kim , Andrew Morton Subject: [dm-devel] [PATCH] SLUB: Do not fallback to mininum order if __GFP_NORETRY is set X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Wed, 18 Apr 2018 14:49:35 +0000 (UTC) X-Virus-Scanned: ClamAV using ClamSMTP Mikulas Patoka wants to ensure that no fallback to lower order happens. I think __GFP_NORETRY should work correctly in that case too and not fall back. Allocating at a smaller order is a retry operation and should not be attempted. If the caller does not want retries then respect that. GFP_NORETRY allows callers to ensure that only maximum order allocations are attempted. Signed-off-by: Christoph Lameter --- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel Index: linux/mm/slub.c =================================================================== --- linux.orig/mm/slub.c +++ linux/mm/slub.c @@ -1598,7 +1598,7 @@ static struct page *allocate_slab(struct alloc_gfp = (alloc_gfp | __GFP_NOMEMALLOC) & ~(__GFP_RECLAIM|__GFP_NOFAIL); page = alloc_slab_page(s, alloc_gfp, node, oo); - if (unlikely(!page)) { + if (unlikely(!page) && !(flags & __GFP_NORETRY)) { oo = s->min; alloc_gfp = flags; /*