From patchwork Thu Dec 28 08:57:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 13505696 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 9A166C47073 for ; Thu, 28 Dec 2023 08:58:01 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 79B3A8D0001; Thu, 28 Dec 2023 03:57:59 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 6F0798D000B; Thu, 28 Dec 2023 03:57:59 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4540A8D0001; Thu, 28 Dec 2023 03:57:59 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 2CC558D0009 for ; Thu, 28 Dec 2023 03:57:59 -0500 (EST) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id E6E581207FE for ; Thu, 28 Dec 2023 08:57:58 +0000 (UTC) X-FDA: 81615624636.09.08EE786 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf14.hostedemail.com (Postfix) with ESMTP id EF402100006 for ; Thu, 28 Dec 2023 08:57:56 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=hYRgUCVM; spf=none (imf14.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1703753877; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Z5aGVAm1tcPDUEg3vZlaI5jUIjc28IxAcvneTuOKb/c=; b=5fDHqGaP0pS/Zqc3k8DI3Ac14DKDomD0aQO+O6qvRfjKJLsBacjEnLhvqA29oiNEa26Md5 JjMyrA0rrdxyzIScJV91Ryv+I/rpfUphrVT7Nb5BvwPhkZAOWMSNfqVOJ3XHNd2PdqC504 4b/hqGcmA+gxI0Tmv+68W63pL45CyGs= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1703753877; a=rsa-sha256; cv=none; b=gzY04QMJF8cZ/AOw7lvPYQVsEt8g9b3bOmN/STjBZGf3RHu+2j9AHWlsexl3O0TWN2mAe4 SRaYnQEXFTJ4LiTP5voNuuzR4r+YaQ6H7G5QdaB8MG4W8LsPVjcwu6ly/8q9C18YpsISwO pr3jEF/zIoNEfoMyM98MeNcOs9Ml7ow= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=hYRgUCVM; spf=none (imf14.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=Z5aGVAm1tcPDUEg3vZlaI5jUIjc28IxAcvneTuOKb/c=; b=hYRgUCVMqHlrsYJf+gijvBJ2sL veeSL9+VZW6Sl93HRHg6lJvxCaOBfRNW12uBTBur4sagNAGfNCn9sGlSr5zlwfhI1T3IQPLuk7jiq AfnZvKhBZ9bzS/hT1pxhX0oIbQd1K4v353mp0nbJqPSrhQ3panp5XFvaXfAje+/6Ayi8H1tULTUmG jG+/AP4D+HNwLGckcNIttw77WvKtT8IET2DWKj19/1LwI9K64YHDLctGb/i/LX5DmhMwy8zCOHV3i V2p2k2WrNsE4rYPBUwp46D0uWJFglUgoFjvvqJbHrLZ5n24SA92Er6qkvQ4dw2w4t99d6mdv4ntS7 OKyg72Bg==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1rImD8-004XzE-55; Thu, 28 Dec 2023 08:57:50 +0000 From: "Matthew Wilcox (Oracle)" To: Andrew Morton Cc: "Matthew Wilcox (Oracle)" , linux-mm@kvack.org, Johannes Weiner , Vlastimil Babka , Hyeonggon Yoo <42.hyeyoo@gmail.com> Subject: [PATCH v2 2/6] slub: Use alloc_pages_node() in alloc_slab_page() Date: Thu, 28 Dec 2023 08:57:44 +0000 Message-Id: <20231228085748.1083901-3-willy@infradead.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20231228085748.1083901-1-willy@infradead.org> References: <20231228085748.1083901-1-willy@infradead.org> MIME-Version: 1.0 X-Rspamd-Queue-Id: EF402100006 X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: jf5pf6aotbi89sqgnwjib7pchwtghgwf X-HE-Tag: 1703753876-359167 X-HE-Meta: U2FsdGVkX1//0mN2tUPVFIbiOrD6t9D+ly3OBZDpSa5amQjnUg93fqlrWNWrmmTVkDOUaEqHAVKgW1ESkJ6b4utVBntb+LUfIdRzplWEOKh4vosiWsv35xrnlP7PLF1SmwXT9YVUFxrfXhgxVrVKLFnaH1GyD+YsMR6wNvepMSuf4EpQBIqfUsuDOMOsbJ4//fcl08RlNASrjZh8yIM37iwLfk4kzIctgn8DxH6A1DTL/zLLrc9rfcqciENVfQo6QlOC+onyqk4VES2JApgvqUrS+Kvz9B+kLP6GHBM7Ke9a5o5F7L9tg+oDWGvarLt8D1TYpgU97R53K+GasfROAvAqUX8JyMeWQLpj4wR+ctu1IMugXI7hN8CiKhzp40ZIY9yHfAeamD84WuLwVoZs1BiiGN5KmAit7jXxiGtqCq/Kcm99RJcw1/Gl6xvZWaso/h20yjqOdi4NfGOVSoZelBPqe0GONweKGE6k61WyLtzRJqwXasefFQ1J6PmTCXnvQv/FuUThebQa/91T6AonKBRsIanQtMDuFgtj+0xoDBwy6pYCM5HVULVpEcWvBYa4BRWVbAPPzDUzHSAubf9HZGR9TP6SdRG+KfBW8kI4/5Na+yvVTc7+153P4drGZ3u4prwwzolQof1wzb9qxEPkUuB6G4v/ZWjD8F+PkK3aDlxc4JFYGrVX08x6edrCRNwNQblwGNUsIbSPRFFq1SNRuIZGInHMJSeXsFkcPgW+2qqoMjDN2mTZ952i1a4Ba5Fda2+iMCLeNxnhAYuIZtqGH8zL3SZF+lSQwQ/s13a8U5vH6uf6f9DBcYh+D+DPMcKubYwTNkbhVM/Z+7rX6zXIcNYor05EL1vn+OjPPWlSTr/8z4mTiY+tc5OJGeNl17N0O3GFu7INRbUbUdufk7quY6RYMYuZsYMd4jUJMc3KnTwk17THD2Cok9HlMPolarpNZmYo7kRUg6IOIhRJG0s wn1HSAPv 7CVVtJJJI2JqhroFcKK0CjlkZOWu8G5RIezh4citiHbpLolO7PDRGim87avBeLu6KhVzqEyeAbeWWBfX2LBis6a4/b48L3ak5EKoxJTxeQgdaEXe3Ryiz69W7a0JFYEs5hCyE6ZKS9m2+sXJqO4F9mw9lCZMua0j0S0IzHSiNeYXSMUn2bAQI/NMmNXCglo2BfUGmY5NkVjJg7hcGKQJ8S+mvPwPzbACWpIm4t7jl884sUFX0vDhEPIzJGEpeUXMyv/hhKBgpUAQlbFkrV0dc2faZs4JeqGmXrGyCPjXFKOv9eDo= 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: List-Subscribe: List-Unsubscribe: For no apparent reason, we were open-coding alloc_pages_node() in this function. Signed-off-by: Matthew Wilcox (Oracle) Acked-by: David Rientjes Reviewed-by: Vlastimil Babka --- mm/slub.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/mm/slub.c b/mm/slub.c index 35aa706dc318..342545775df6 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -2187,11 +2187,7 @@ static inline struct slab *alloc_slab_page(gfp_t flags, int node, struct slab *slab; unsigned int order = oo_order(oo); - if (node == NUMA_NO_NODE) - folio = (struct folio *)alloc_pages(flags, order); - else - folio = (struct folio *)__alloc_pages_node(node, flags, order); - + folio = (struct folio *)alloc_pages_node(node, flags, order); if (!folio) return NULL;