[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ba3e16e1e2d6b2f5eae54d41592f90c9e7827241.camel@intel.com>
Date: Thu, 9 Mar 2023 01:54:30 +0000
From: "Edgecombe, Rick P" <rick.p.edgecombe@...el.com>
To: "linux-mm@...ck.org" <linux-mm@...ck.org>,
"rppt@...nel.org" <rppt@...nel.org>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"peterz@...radead.org" <peterz@...radead.org>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"song@...nel.org" <song@...nel.org>,
"dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>,
"vbabka@...e.cz" <vbabka@...e.cz>,
"x86@...nel.org" <x86@...nel.org>,
"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>
Subject: Re: [RFC PATCH 4/5] EXPERIMENTAL: x86: use __GFP_UNMAPPED for
modele_alloc()
On Wed, 2023-03-08 at 11:41 +0200, Mike Rapoport wrote:
> 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) {
This is obviously a quick POC patch, but I guess we should skip the
whole vm_remove_mappings() thing since it would reset the direct map to
RW for these unmapped pages. Or rather modules shouldn't set
VM_FLUSH_RESET_PERMS if it uses this.
Powered by blists - more mailing lists