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: 66129 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp236193wrd; Wed, 8 Mar 2023 01:50:40 -0800 (PST) X-Google-Smtp-Source: AK7set9OIgfYk3KPZCTGo/F9NkuwoQ4ycYVSYsqhYXBRg95Gb2KLJAiwHcawTA52WUcvE97INC3P X-Received: by 2002:a17:907:c282:b0:884:930:b017 with SMTP id tk2-20020a170907c28200b008840930b017mr21583949ejc.60.1678269040732; Wed, 08 Mar 2023 01:50:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678269040; cv=none; d=google.com; s=arc-20160816; b=wYSGLbPQR1DaPYW9MNDp75uHM4tkPbxLB1K4j6X28lo3Qt0E5NdQkaaMN3puDFVeSJ zms7e/IEB60HURhFvX7QIUmUqAoa2qRmOVeId/ZFq6JCt7bRuVte6qrK9o9iGkhF0JqV pvPrYnDYIwwqAXUFnZ6dBYVR2XCwSTmUU1a+PzMzZzS8PrUBs+mRKAy4S6FLrh8M8Kgi 9NDgp/euI+62DPTZm+7xd80bCEhO8wI8zWHkeSodFBBUGUIXtIp4bMvYkEEiW7fKr1fu b+MwFRpmHbydHlXznf7XLrcKLj/H5lLFRtNKGgn9thHUV+FpQSkn0TQ/pTwbeVo3xhwd tcjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=9oLvwGB5cLXtiQHKzRF/jATRlN7YLETOtgmzRmuPXRE=; b=Sg0fnIfOrm/LG+s2BJgk+PllfE4tLzGxhOG6QGXwWQ5XIZ/R4/9kJ1qUjuGpyyYPnl SkpkLG3/XN8EcJ2VtCQBsNzuJgC6WdWEkqwXq3OrNSq+2oh49JKTYWZuJaNqDk0tGrVE Ledeq/m+bcs3IilytiEI9Ljxgk5DEAt+7nYvZi8OBRIdh2+KbhaeHw0EJhQMR2qTpFNb acvJDN9aLfHQb4tyiy4Mjj/18+Ms47+VUYJTTZTgL/s0G2KogVRQAdu9YctKpPyNrDYl wvEwm4ngxOQ0MWhb4rXtwl7+GxJIU95G7WqwpmBGI7bRogX1qREpoykaNnTyzJIQ4KX1 D+BQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Pkmvdm5Y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d9-20020a170906304900b008d20a6a9d98si145473ejd.279.2023.03.08.01.50.17; Wed, 08 Mar 2023 01:50:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Pkmvdm5Y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229986AbjCHJmO (ORCPT + 99 others); Wed, 8 Mar 2023 04:42:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229925AbjCHJlm (ORCPT ); Wed, 8 Mar 2023 04:41:42 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0355B2571 for ; Wed, 8 Mar 2023 01:41:37 -0800 (PST) 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 dfw.source.kernel.org (Postfix) with ESMTPS id 75F1761723 for ; 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-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759792638086342519?= X-GMAIL-MSGID: =?utf-8?q?1759792638086342519?= 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) {