From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dl1-f47.google.com (mail-dl1-f47.google.com [74.125.82.47]) (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 E3DBD384258 for ; Tue, 3 Mar 2026 19:48:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772567326; cv=none; b=UwLO9naWhReH/d9n8YlfOujliUwFi1a7hoAmoOWF6vps3ntiAzbDMUaJ1DR77PsG2Z0u8WQnbaLWIAhbt6Q21eQMUHsvPYEW//YhbzqCHocvup6OhdtoDckbhAxB9O+ZU3DlfFMpWY3OK1wHUID/ww08KJLB+R2xMXy6kMpL1cM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772567326; c=relaxed/simple; bh=QEKR5kHXnpMbvbv9e5CjopkkKVSokYg6wAvEHsiWV2c=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=ugWLThhuQL8Ebr5bp2IPlgZ4MEQ+vsgX6qpguF65ng/RVVMLVuzIqdjJxql3n+Zj/Nx1+TcNWWU2+aYC73tapf4GxFWqcTjzvSgy8+NnVLGNzoaDU9NzXKlcMreG6vLt/N6On9gJZzoydN6ytUpgDQEmN+cV9yB8vw8jnQPF770= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=EArXqe7U; arc=none smtp.client-ip=74.125.82.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="EArXqe7U" Received: by mail-dl1-f47.google.com with SMTP id a92af1059eb24-126ea4e9694so439164c88.1 for ; Tue, 03 Mar 2026 11:48:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772567324; x=1773172124; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=JqmBdm0fSjykfnPzULqjAwjvph/E4EHq0QDrGs2BKB0=; b=EArXqe7UnB6WtU/wsJ9DvDqT2ntasrZCPf0qEILF5UDwsFjGkM6a+4FuJ+mwZBDgiW oV3NfswprtyAUK0lXu0jPistwY+S7AaTzCSIZcwYE0ZVbrqGFg4Xm2Ll6j2PHsa9Aa4m jBgl6CHL1hzbCNmk+9X2DFI9BibSDw54IqO1SNH/vM2CJBfzjU2+Y3/Aq2+AZajiontl kSS/O3pmHGyTcWpUvxVLB5y15SSejLp3XuQkRkr9RfTXg5vCXcc62vs4mkmrYcGCsjCU 7FIGBKDr3QXXh00xAxb0zuZEXFjjzzdaA3wqu9ZNErd4sLfMzhw4vwWezSHwYf2WyRig uUmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772567324; x=1773172124; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=JqmBdm0fSjykfnPzULqjAwjvph/E4EHq0QDrGs2BKB0=; b=RCgAHCNSQZmInQRrpFmN1t7Q+EWaYJ4arVhO2T3ApuM9KwZmhX37zSpH0pUWX6iFAQ bE/OqwXVdXCjMU0/yH6/CudpeRpK0VT5n+C64aTlKkMtpFPEh+gOzIU8IYXe5jgOTD+9 zkF2gfps6Etf9EFO8pt7waKMk23jwisjyBv6JWLjoDNc7Qbay2N0Gx9LFGtpe4BFY57d CxiYMDacGcVQ3IAzRq+HCGjqI1m0ikV5OQRWwT9JgXmcDd9jrurPgtXpfLN7tShRYxbf V6qSzJvOELFW1agvw0af7bD27Jobp/6SRk/RIjnON2Yo/Gtyv0/06n0LgD6pNYwa7yEO /uYg== X-Forwarded-Encrypted: i=1; AJvYcCX5IF9ZmuebN+aYtYciBjoDDSTEW5QV+rxIqg7fnuuGZgS9nI5vqq42vcyUhY8B8hZGejfGn7BKAc8qlNM=@vger.kernel.org X-Gm-Message-State: AOJu0YwEBkSv5BBFJDdcaBKozXJ/CYzjX78OIzIl1LluuuI0aqTUj9xf dQVY6swv2aPPaXkJ1JmYekjwpgeEtLzYgM7wy/A9sjojczf62AJGRKGl X-Gm-Gg: ATEYQzyVh8rinEmEd49HecmzeamkqxkleR1d1cUul53FU89dNzONQflvthzVGKxwUrc Xe0pi4eU1xVnQqYUvajYTWJKzwnaXoxbrRprvT8Spj0OemB+rakDn2MEqRKZra2E11xYLXWklly 9ipjp1k8khx660W+k87EcgsU7v2KtrCbJGDLqCCVPopy/qiHj2KxWLK+gH4gm6wVF+mlM7ovx4T PyTtWfEO0tYj4KJH5YESU6nk8TjqKpIEjUcZCwVxyTQZQfZC+5DhvnZUOJWtfdl7SNVgfCLpeIV k7KSwB1BrCGxzmksCX3T4oFcPVPSA3G1kIJqp4gRJLusJlOjd2g/CcUX+4YZYC7mD+i0jAF3UN4 BA5rclQnHznOhrQ0/eXOdcQ9nHVPwwVPFqUWbfOFx0DRNeWfY9WiUYZiWIyFDcMSiiJ35KV9HLi cenKZo6jGF0kONS6dr7jMRPcTSxBZYaKxMpmDDX73TOWni7bL4rH/JKUG1V7L1tv3AaBetmkwKU i1WL4xfP9lZKzs= X-Received: by 2002:a05:7022:4181:b0:11b:9386:825c with SMTP id a92af1059eb24-1278fd3d84dmr7745036c88.41.1772567323375; Tue, 03 Mar 2026 11:48:43 -0800 (PST) Received: from fedora (c-67-164-59-41.hsd1.ca.comcast.net. [67.164.59.41]) by smtp.googlemail.com with ESMTPSA id a92af1059eb24-1279e9950cesm9258748c88.7.2026.03.03.11.48.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Mar 2026 11:48:42 -0800 (PST) From: "Vishal Moola (Oracle)" To: Lu Baolu , Dave Hansen , x86@kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: Andy Lutomirski , Peter Zijlstra , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Rik van Riel , Andrew Morton , Juergen Gross , Yu-cheng Yu , "Matthew Wilcox (Oracle)" , "Mike Rapoport (Microsoft)" , "Vishal Moola (Oracle)" Subject: [RESEND PATCH v7 0/4] Convert x86/mm/pat to generic page table apis Date: Tue, 3 Mar 2026 11:48:23 -0800 Message-ID: <20260303194828.1406905-1-vishal.moola@gmail.com> X-Mailer: git-send-email 2.53.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace the get_free_pages() allocation sites in set_memory.c with the appropriate generic pagetable APIs, since the file already calls pagetable_free() and the mismatch prevents separate allocation of ptdescs from struct page. Use the generic pagetable APIs consistently for both allocation and freeing to simplify and standardize the code. Enable Matthew’s work to allocate frozen pagetables in the short term[1], and prepare for a clean split of ptdesc allocations from struct page in the long term[2]. [1] https://lore.kernel.org/linux-mm/20251113140448.1814860-1-willy@infradead.org/ [2] https://lore.kernel.org/linux-mm/20251020001652.2116669-1-willy@infradead.org/ ------ Based on current mm-new. Re-sending because the previous set was split up for some reason. v7: - Collect some Acks - Fix multi-line comment style to match the coding-style - Reword all messages using imperative voice (used an LLM for this) - CC all people found to have edited nearby lines (through git blame) v6 link: https://lore.kernel.org/linux-mm/20260219020354.321088-1-vishal.moola@gmail.com/ Vishal Moola (Oracle) (4): x86/mm/pat: Convert pte code to use page table apis x86/mm/pat: Convert pmd code to use page table apis x86/mm/pat: Convert populate_pgd() to use page table apis x86/mm/pat: Convert split_large_page() to use ptdescs arch/x86/mm/pat/set_memory.c | 37 ++++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 12 deletions(-) -- 2.53.0