From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oo1-f52.google.com (mail-oo1-f52.google.com [209.85.161.52]) (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 7985DE54B for ; Thu, 19 Feb 2026 02:04:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771466649; cv=none; b=kMUrrMgJW/wZKGIMYikJFgdkROx6HyEdRCGK62OrSAAxNbMf/26xc5NJorKNz/2iqBsHv1MGHWfVKxWIJn/RMlF71QL3gNO0mYH5yaY/5GzU7s2f3qsnD2NyO6YvZHS5TDggaUWmmrWCZFceTkyU/1jdpigEFGo8Ca13oo1ed/8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771466649; c=relaxed/simple; bh=E7Gu+KxKYr6p4KMiK+hFpEsy0s79q9ig3hDEHktDTNk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=GN+pIvn4MjPm2AO2xx4HyPQRUowiNNoQcOz+9esiMZNujq3ZxaOSlKaZPlLxq/MkgH7sWRS+bRB4rk/WB5cO8+fo8TDt6vfBCoaCN2oKkWDTvvglcD6mg3Rg2eGx0ExSHZeI7JtUPFIusc7beUdIUrDNZ+zYkTv/jMiPr2p/FvI= 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=KUvywKiV; arc=none smtp.client-ip=209.85.161.52 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="KUvywKiV" Received: by mail-oo1-f52.google.com with SMTP id 006d021491bc7-66307e10d1dso265730eaf.0 for ; Wed, 18 Feb 2026 18:04:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1771466647; x=1772071447; 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=Elu91ZuWQqfAU6C5nqsrouvyJQwhDNPPP/WnEj46gXY=; b=KUvywKiVQ6EfhWNpgoityfa1WXr7Foiva4w6+6Rlm5Fi04mdZmGmOo4EwRmuWtVEE8 8chexL+bIVR/nIvuLXq1cVeAzQn8JjJkitU2MHXLDGKSaVA1WPBxKfEiqW79wPcPXcT3 JgYi4znvzBVFv0iv7XkftpfBpYw4qS53bTt/X9dMn7LSDPCscCK7SiYmlxf6jDtEY5xz lPH9jgu3vqAq4b+BBuG5yR2Hucz4VYWH3Yr+SHQJtDaC7pRtO/XyJqoOdWLpe9dgCezq F87ExPMtOTfpNWDK8NPiRyAHnZfEF5evY6vF79m8l4hm0mntKqGZNX1fTjVtCkZGko4D 1z+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771466647; x=1772071447; 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=Elu91ZuWQqfAU6C5nqsrouvyJQwhDNPPP/WnEj46gXY=; b=NG/HgPCPPtXcnWuMRxfIW2v2dQcWnCH5hOSAbMnunkh0zwpZhbdN50yifHgx+2X4hB JRUEnvCOu+X1kqq0j6iuNjGicw/xFwU2jkcbqNdAE9hjPDs1aUha/2HWA+K8xtlWkb89 EKe8WzVC0zupriR0QDPBdRKwex6+i5ZA3cNVaIU5uk9/6ERZ7NTSdoHSCKoQp+ay1Ret cgDjNUnRrN+Z4e5F7TWKJcyUUQOVRUlLTzWhdPZai3v9eg79FJ6CknhTTCoe1Wp6EPsY HtNbZpFC2Le1aQzhwkVnjzoX5vWgdFbdQHKpNSDtwK4MUiWoapu3XTEe49/jyCTxEhqY NkKg== X-Gm-Message-State: AOJu0Yx24mrmjip+7kKM0EaZH7WnCqrwiblZrLYhaQg06m71JuyNv+iu PAcTG/ChUTnk/0UNkuppG+/vgrUkCKvd+C+6YMLBN9mMuPDpFw4gji9tqWPHLw== X-Gm-Gg: AZuq6aImy2c9cKcLwCBqzCXjWBMUF/gmPe10NOa3ZZinfpzd/dl05LKN2A+4i8+3vaK puBXNKl+DYCfYTR+GX78o06Zwg9j/ud/0mvjkfGoSLfZTQjjPnGGMh2RPcw2pNiUt/gkI34ISwG fA/UJ7KjT2hFFJLM7t+1u1G5k/fQThj4IuSZHxcAp5UsCMA6arGhIpfPdGTTSy96Jc6Y50mL8dJ 2IOq+Q7qZNKPZyAfG7cfKvn1C6ENANgvQWaoHS8zcRyVPMaEHau8ELh7IZv0ilEqjbRogi6+t8P q0MAscV38udQoM3o0jByOIPOUjRk2JUsnw4njm9PshdVQnEqTXmQMOxpgPtnYsgPEleyo42/mqi DH/0Sq/8l99y3Feo8XY0yAEAjgKTsHzrS4GPlZqkfN7el/RF7PNk3/nnq0siVhD0gUpaaaU7IgM MGhrKfRjJtWcRvbWBaRXykH1WZHkX0dHFSXwzOP946XzgpsjoflKdGS8fIA/+MgeFS4w1KrCYdE HenkMk+L7cEA/0NBKsn0eTxyfYqfifAo14ngpI= X-Received: by 2002:a05:6820:220b:b0:678:24c4:2ef4 with SMTP id 006d021491bc7-679aef1a1d6mr818698eaf.50.1771466646825; Wed, 18 Feb 2026 18:04:06 -0800 (PST) Received: from syn-2603-8080-10f0-ab80-0000-0000-0000-1382.res6.spectrum.com ([2603:8080:10f0:ab80::1382]) by smtp.googlemail.com with ESMTPSA id 006d021491bc7-676e3b52902sm12187297eaf.11.2026.02.18.18.04.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Feb 2026 18:04:06 -0800 (PST) From: "Vishal Moola (Oracle)" To: linux-kernel@vger.kernel.org, linux-mm@kvack.org, x86@kernel.org, "Mike Rapoport (Microsoft)" , "Dave Hansen" Cc: "Matthew Wilcox (Oracle)" , akpm@linux-foundation.org, Andy Lutomirski , Peter Zijlstra , "Vishal Moola (Oracle)" Subject: [PATCH v6 0/4] Convert x86/mm/pat to generic page table apis Date: Wed, 18 Feb 2026 18:03:50 -0800 Message-ID: <20260219020354.321088-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-Transfer-Encoding: 8bit set_memory.c has a call to pagetable_free(), while the allocation sites use get_free_pages(). This causes issues separately allocating ptdescs from struct page. It turns out that we can just use the appropriate generic pagetable apis for allocation/freeing. This helps simplify and standardize the code. In the short term, this helps enable Matthew's work to allocate frozen pagetables[1]. And in the long term, this will help us cleanly split ptdesc allocations from struct page[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. v6: - Drop the renaming of *page* functions - Use existing page table api instead of creating new apis - Split the pmd and populate_pgd() changes into separate patches - Reword the cover letter to describe the new approach v5 link: https://lore.kernel.org/all/20260211195233.368497-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 | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) -- 2.53.0