From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ed1-f73.google.com (mail-ed1-f73.google.com [209.85.208.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D670D4BCADD for ; Fri, 15 May 2026 16:50:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.73 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778863855; cv=none; b=XpHecbohdNzlA82oVLB+Dpb72QQPOu/icVGZMLvb3ieA/4F6JIfQlrwsv2UVZde0PuONrIyBfhSgVoYmvkkaTE9dq0Zjt96teV+k/hzW8H9nO190j2J9jUWfpKLx8uHxGQrJTFXdjn/xEdLYwZvH8iMELE+5PhDlFcmh8H01elI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778863855; c=relaxed/simple; bh=LK0mK1ahGp+TV5PM+hH1y7ZNFS1EVtBUe6W/RsWCK8c=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=t0Znu+6BbsPYbpZenpd1PqhgXM0Ot4Cdt4ugVe0WJpubYQlrHeJRnamCGM2uVIN4L+1SXom+lF0+d6ht0J9vrsUDDasP5mXW/Ry29EvRIHcuV4j1wOQdVjan3JEjsjkD0o2eEMD8uN9op8oIQ7Cn44XjNJCyYY7kqBQXpVOjsoA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--jackmanb.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=Uwd39+OD; arc=none smtp.client-ip=209.85.208.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--jackmanb.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="Uwd39+OD" Received: by mail-ed1-f73.google.com with SMTP id 4fb4d7f45d1cf-67b6c936989so17135a12.3 for ; Fri, 15 May 2026 09:50:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1778863852; x=1779468652; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=6WrDxP0O6KbYVHtNSanPgjGhWRqCYk00NUEI+G+9ODI=; b=Uwd39+ODQIfZCJ0cfq3LkR3huipLK08bxYunHXfFnBeJ17xMzbRKwEloA4yOf4ISKw /AiwSvWkxZ/jIMwr/b2ZJG9P9bp4K9+MhCl3Kq5xGWOW4dtWNJID6CK1zN5GBR8E3U+q fZZa8S3+c15RLDtLC4xb0LrqQVlLy2BhZw74W7dGncejllSR75HpEX7LzhXtjwGKpZWr EO5Y2yidwxaNs5RL5fAuKxrIB/1oB2ueslR5T2iK6hLyKVlzQxuAPtLE46sLT2IRQThk 798WTD/K9p+g+Yt0Qnwslz95dVsmCnNozetyWmE2iqoSylafSIpzPbUmRX2kG9O9mw6z pCMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778863852; x=1779468652; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=6WrDxP0O6KbYVHtNSanPgjGhWRqCYk00NUEI+G+9ODI=; b=jL+WvH1oUsL0zu9dqZekG6r7dB4w1YpLSS+eg1ZWX56h+ROZDnPNuq3Xjrepp5BEsU d/AVwmrRk8EpJ8y/IobfIQYhykx79XdUZukQIUHj/ToTIESpL8u6Kh5R6t9gYCnPn5XU 5hjpLYTCrX04j9ujP97xBc0PelkKOj5UaxVCfdkytNqCen8TYuSYMLT1ugTivTRmGD/i JHu+xMjzsz2J6xJYHWIwLk34GHcFnxr9UbVvv+r6c41IGffvUyi9Gl6Q2AX7GxeYdFMj d6/ktPOj9dk+2Yla/VpcrxoKIne/i/WbJbat6hIKp4aIxChBsrT5UG5xrqEIGmNIMPGZ Ck/Q== X-Forwarded-Encrypted: i=1; AFNElJ9a8u9Fr5OT3efJ5CY6gQ+VqsD5FwWQliYcOj6vXS0rIZo3S+vVKLHraAA97j9FKeSAtSqtG9JQfv9Tg14=@vger.kernel.org X-Gm-Message-State: AOJu0YygbdrR07/O4tx/O6Zl6EyGNvd1h190gPjc/fLRJk8Qp7hADimn tjkTNkF7GZRNpXRlDFsXgSrPRbHC/ZZB5wDpFLCTbLgMMIaDCftA6+JZU78M7KHjcCYVAMdY3cl GGO+VSJUh89W7bg== X-Received: from edim4.prod.google.com ([2002:a50:cc04:0:b0:674:91ac:5f8d]) (user=jackmanb job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6402:3251:b0:67b:d0e3:771d with SMTP id 4fb4d7f45d1cf-683bc5bdb15mr1846715a12.7.1778863851966; Fri, 15 May 2026 09:50:51 -0700 (PDT) Date: Fri, 15 May 2026 16:50:51 +0000 In-Reply-To: <3453825f-2bc0-4d63-8731-3eaf9fc716a4@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260320-page_alloc-unmapped-v2-0-28bf1bd54f41@google.com> <20260320-page_alloc-unmapped-v2-20-28bf1bd54f41@google.com> <3453825f-2bc0-4d63-8731-3eaf9fc716a4@kernel.org> X-Mailer: aerc 0.21.0 Message-ID: Subject: Re: [PATCH v2 20/22] mm/page_alloc: implement __GFP_UNMAPPED|__GFP_ZERO allocations From: Brendan Jackman To: "Vlastimil Babka (SUSE)" , Brendan Jackman , Borislav Petkov , Dave Hansen , Peter Zijlstra , Andrew Morton , David Hildenbrand , Wei Xu , Johannes Weiner , Zi Yan , Lorenzo Stoakes Cc: , , , , Sumit Garg , , , Will Deacon , , , "Itazuri, Takahiro" , Andy Lutomirski , David Kaplan , Thomas Gleixner , Yosry Ahmed Content-Type: text/plain; charset="UTF-8" On Wed May 13, 2026 at 5:00 PM UTC, Vlastimil Babka (SUSE) wrote: >> #define PAGE_KERNEL __pgprot_mask(__PAGE_KERNEL | _ENC) >> +#define PAGE_KERNEL_NOGLOBAL __pgprot_mask(__PAGE_KERNEL_NOGLOBAL | _ENC) >> #define PAGE_KERNEL_NOENC __pgprot_mask(__PAGE_KERNEL | 0) >> #define PAGE_KERNEL_RO __pgprot_mask(__PAGE_KERNEL_RO | _ENC) >> #define PAGE_KERNEL_EXEC __pgprot_mask(__PAGE_KERNEL_EXEC | _ENC) > > Should this be part of earlier mermap x86 patches? Maybe it could be in the patch that implements arch_mermap_pgprot_allowed()? This is the first patch that actually uses PAGE_KERNEL_NOGLOBAL though since mermap code just cares that you didn't set _PAGE_GLOBAL. >> diff --git a/mm/Kconfig b/mm/Kconfig >> index e4cb52149acad..05b2bb841d0e0 100644 >> --- a/mm/Kconfig >> +++ b/mm/Kconfig >> @@ -1506,7 +1506,14 @@ config MERMAP_KUNIT_TEST >> If unsure, say N. >> >> config PAGE_ALLOC_UNMAPPED >> - bool "Support allocating pages that aren't in the direct map" if COMPILE_TEST >> - default COMPILE_TEST >> + bool "Support allocating pages that aren't in the direct map" >> + depends on MERMAP >> + >> +config PAGE_ALLOC_KUNIT_TESTS >> + tristate "KUnit tests for the page allocator" if !KUNIT_ALL_TESTS >> + depends on KUNIT >> + default KUNIT_ALL_TESTS >> + help >> + Builds KUnit tests for the page allocator. > > This belongs to the next patch? Oops, thanks.