From patchwork Wed Mar 8 09:41:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 13165513 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 F1B6BC64EC4 for ; Wed, 8 Mar 2023 09:41:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 95AAB6B007D; Wed, 8 Mar 2023 04:41:40 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 90ABA6B007E; Wed, 8 Mar 2023 04:41:40 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7D5096B0080; Wed, 8 Mar 2023 04:41:40 -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 7048E6B007D for ; Wed, 8 Mar 2023 04:41:40 -0500 (EST) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 457C440EFA for ; Wed, 8 Mar 2023 09:41:40 +0000 (UTC) X-FDA: 80545238760.18.ED34623 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf25.hostedemail.com (Postfix) with ESMTP id 92AD7A000F for ; Wed, 8 Mar 2023 09:41:38 +0000 (UTC) Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Pkmvdm5Y; spf=pass (imf25.hostedemail.com: domain of rppt@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=rppt@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1678268498; 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=9oLvwGB5cLXtiQHKzRF/jATRlN7YLETOtgmzRmuPXRE=; b=K9JFOCJThGGtLAHrCuKOoTGO5Yb/b//ExCcfNDyNy2j1iL37hVg5QGGir7B7t/r7JdmMRl +nPcE0aR7ivv0/xdCTa6EradRYvXfuybfZGRJvTPUD4WJKxabPWh52Co9WV4SGtPjBYW3I 1bTxnMzHSu/kuFE6Kjqze55a9QvO3HQ= ARC-Authentication-Results: i=1; imf25.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Pkmvdm5Y; spf=pass (imf25.hostedemail.com: domain of rppt@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=rppt@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1678268498; a=rsa-sha256; cv=none; b=oKrkIV7bQjdN+qhDOrz5jwOolpl3Wk8M+w03z2K8EgmW9LawCNKuLqf4J6qEHt/uKTmCzR DVmGXMREZ82vD9ez6LEoXBYM9E6RU0pKII5Wbh5NmC2jZCuEJzxPcnH4fVie02yTsPVKTc AvaIERPGlQ4oO6+Hcxv5QhV8iXcrCDo= Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 38F78B81BC0; Wed, 8 Mar 2023 09:41:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7AA97C433A0; Wed, 8 Mar 2023 09:41:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1678268496; bh=GyhXyClHrKgOJtAqFaxPxOscSnZByfdcCSJ4z9LZSNs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Pkmvdm5Ytxnt5h8jxKV6y+9spytNeNwCgY/lva+XKpCfpv2UDmFkQKXBEAPoZcPry ht6/BanBBGO/Ng+UwA4oJEes3D7Do1tSgu0fOyzsrsuFhVAaq8Fsf0yp5RspB2D/Lu lH3YM2i5lENWXxwTFZya+4DVuWQsaPy6gdGfUDbtqepQy68XZdfv9XAzN+HqlVtRDZ ekAyOV3eAfFITQHTYyjo73txVENSz2Zeqo+39fJfmKQc0sbRYnTO1sCtQWFCpyp6Em ZjhRFv88SpQ75C8j8pLGdjLo+iZuPCKs/sCi988FtUl7CBJI2C/MuBNLv8SxEFu5VZ OMu/uN9ykVk5w== From: Mike Rapoport To: linux-mm@kvack.org Cc: Andrew Morton , Dave Hansen , Mike Rapoport , Peter Zijlstra , Rick Edgecombe , Song Liu , Thomas Gleixner , Vlastimil Babka , linux-kernel@vger.kernel.org, x86@kernel.org Subject: [RFC PATCH 4/5] EXPERIMENTAL: x86: use __GFP_UNMAPPED for modele_alloc() Date: Wed, 8 Mar 2023 11:41:05 +0200 Message-Id: <20230308094106.227365-5-rppt@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20230308094106.227365-1-rppt@kernel.org> References: <20230308094106.227365-1-rppt@kernel.org> MIME-Version: 1.0 X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 92AD7A000F X-Rspam-User: X-Stat-Signature: 97394pc4oye4qbm79rmh5ku6qpear37d X-HE-Tag: 1678268498-529956 X-HE-Meta: U2FsdGVkX19I7bC2ZE8eGV9P6ba3NRwnUx1WN6dpM2NtlqUy6YKFdLjh+ygp+xAnPcaVoxDrw+ngKUNgteCW5l/SMYb29fln1a2b/zx9UdRTqRwnDucJuBjFvF9yf9g7gDEM3i86x/TX8eNWoQnd63HI/cTM9PvBL4EDuA1loWjnCcqBpKJBoHaLs3Gn9PU7fnF+g+6jaQfd2TPsZuPRXCjPeltwe5R8m6DrHkZEab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LoW2AhwIpmJnXrw8fki+CySzXdDvg+38liyHaNGIToO/i+svg2Bp9yzrVb0MU0FmDW+IKRTr6OLCgsEK0F4jr6Zw== 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: From: "Mike Rapoport (IBM)" Signed-off-by: Mike Rapoport (IBM) --- arch/x86/kernel/module.c | 2 +- mm/vmalloc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/module.c b/arch/x86/kernel/module.c index 84ad0e61ba6e..845ed70ba5ab 100644 --- a/arch/x86/kernel/module.c +++ b/arch/x86/kernel/module.c @@ -67,7 +67,7 @@ static unsigned long int get_module_load_offset(void) void *module_alloc(unsigned long size) { - gfp_t gfp_mask = GFP_KERNEL; + gfp_t gfp_mask = GFP_KERNEL | __GFP_UNMAPPED; void *p; if (PAGE_ALIGN(size) > MODULES_LEN) diff --git a/mm/vmalloc.c b/mm/vmalloc.c index ef910bf349e1..84220ec45ec2 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -2892,7 +2892,7 @@ vm_area_alloc_pages(gfp_t gfp, int nid, * to fails, fallback to a single page allocator that is * more permissive. */ - if (!order) { + if (!order && !(gfp & __GFP_UNMAPPED)) { gfp_t bulk_gfp = gfp & ~__GFP_NOFAIL; while (nr_allocated < nr_pages) {