From patchwork Sat Apr 9 15:05:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiyoup Kim X-Patchwork-Id: 12807966 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5F7B9C433F5 for ; Sat, 9 Apr 2022 15:05:54 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BA03C6B0071; Sat, 9 Apr 2022 11:05:53 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B27076B0073; Sat, 9 Apr 2022 11:05:53 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9A1716B0074; Sat, 9 Apr 2022 11:05:53 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.a.hostedemail.com [64.99.140.24]) by kanga.kvack.org (Postfix) with ESMTP id 83B9B6B0071 for ; Sat, 9 Apr 2022 11:05:53 -0400 (EDT) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay13.hostedemail.com (Postfix) with ESMTP id 49FBE61618 for ; Sat, 9 Apr 2022 15:05:53 +0000 (UTC) X-FDA: 79337665386.10.55B6BFC Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) by imf26.hostedemail.com (Postfix) with ESMTP id C886D140005 for ; Sat, 9 Apr 2022 15:05:52 +0000 (UTC) Received: by mail-pl1-f171.google.com with SMTP id n9so10380456plc.4 for ; Sat, 09 Apr 2022 08:05:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=bm3OLCMkSDypFlzT9/ZE3GLi/R/iGTe3P+37UHxSzTc=; b=Jh02YconE4UpSlidiDVIhSxHy12Kokd8Ol8EmXC75LvdIaQV6RT/kKl1i1EFScwhsR Q4NaPCdeFvNdoSrxzOjEQp/5NmGfA4jiH7XOY+bDbJ3JvVTSOgGgu+fPayw63X3VOkHZ O6CojxPYuPKMtjOzDPOy4RgTnmpvwMVOgkHH696+XQaJCyPMsSQOdEg3Zo03Ya4cJNaY 084+Wqp8DHpOJrzb1hPU+bb0PEiVPm035N2w6mJ1biIhtiZ36JsZN+JO+vp18DBBRQc4 8KI/4snVz0SkmZv4sLJ4NwmmTjrKPKaph4t3Iz3YYWFHlJGAQZeFYuogPr8Hn/Cd5vFt 1rtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=bm3OLCMkSDypFlzT9/ZE3GLi/R/iGTe3P+37UHxSzTc=; b=toozcpYADAt+rZVoYvkEYD9j4nRSoFiEhQR/xIXJWB5Ha1jLVIzBO2cQBW15QRzUA9 pB7wSrXniBxC5VAtQTxj8ioQB8sq/sCzhumvHGgT8XGQ2FiWGEQC34RIP63/NNCN/Cd4 nfhyObWAsTSouryNFXDnSIaCvReJ4tIjVmdkyVF3nMXXg1QuhWUDdSu8vq7yVK2EHSfN 5Oji9sAvYkmS1RfclWad2/q9pYCBDSRnGF62sXZgL7GlbOv8S4VWb25IW6RsauGgVUoR 9yvsyjQfyeD0uLBEFNnDx69vpyqlNK4ndx4lrdYs5g4eV6MCs6Q6ByTYoXSPR4rM6sUG 7oqg== X-Gm-Message-State: AOAM531MaNmGbXFB8jkHsiOduCSR2cwmTmtSTe8fR2vcKG9WUXldCogo iYfz7SKKkT6XjD0i7Ha1PNw= X-Google-Smtp-Source: ABdhPJyzJ8cBYiJ51pbz4jFhNnRwWSmp2JIXBdNope2GwnNaQuIPShol8bpT7RCjwup8ns03olVZmA== X-Received: by 2002:a17:903:1104:b0:154:c628:e7c2 with SMTP id n4-20020a170903110400b00154c628e7c2mr24870912plh.54.1649516751711; Sat, 09 Apr 2022 08:05:51 -0700 (PDT) Received: from localhost.localdomain ([220.88.102.101]) by smtp.googlemail.com with ESMTPSA id o1-20020a637e41000000b003804d0e2c9esm24668057pgn.35.2022.04.09.08.05.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 Apr 2022 08:05:51 -0700 (PDT) From: Jiyoup Kim To: Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Vlastimil Babka Cc: Ohhoon Kwon , JaeSang Yoo , Wonhyuk Yang , Jiyoup Kim , Donghyeok Kim , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH] mm/slub: remove duplicate flag in allocate_slab() Date: Sun, 10 Apr 2022 00:05:37 +0900 Message-Id: <20220409150538.1264-1-lakroforce@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Stat-Signature: m57d56rtehrdm349ri3k45pndckk3y61 Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Jh02Ycon; spf=pass (imf26.hostedemail.com: domain of lakroforce@gmail.com designates 209.85.214.171 as permitted sender) smtp.mailfrom=lakroforce@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-Rspam-User: X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: C886D140005 X-HE-Tag: 1649516752-523977 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: In allocate_slab(), __GFP_NOFAIL flag is removed twice when trying higher-order allocation. Remove it. Signed-off-by: Jiyoup Kim Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Reviewed-by: Muchun Song Acked-by: David Rientjes --- mm/slub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/slub.c b/mm/slub.c index 74d92aa4a3a2..a0e605ab3036 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -1939,7 +1939,7 @@ static struct slab *allocate_slab(struct kmem_cache *s, gfp_t flags, int node) */ alloc_gfp = (flags | __GFP_NOWARN | __GFP_NORETRY) & ~__GFP_NOFAIL; if ((alloc_gfp & __GFP_DIRECT_RECLAIM) && oo_order(oo) > oo_order(s->min)) - alloc_gfp = (alloc_gfp | __GFP_NOMEMALLOC) & ~(__GFP_RECLAIM|__GFP_NOFAIL); + alloc_gfp = (alloc_gfp | __GFP_NOMEMALLOC) & ~__GFP_RECLAIM; slab = alloc_slab_page(alloc_gfp, node, oo); if (unlikely(!slab)) {