From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 383AC2D660E for ; Thu, 29 Jan 2026 08:05:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769673924; cv=none; b=pNlNpxHxAWuVTmXktpEfkBKv1k9f9Qh4qQF4a+0popRs3w8Kd7opDCZFGNLXuXp5Sjuu8xJykk+V9fIx4j6hAaY2Mprh5LxQNM0MmOBxDG4jzSYhbAm7+KvsOixzzKMVSWvIHdtVqMoHcJrCDlTbDBKF4mJoO+T8PINkhx+tiwA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769673924; c=relaxed/simple; bh=i22p4sf+DSGw5s0Rcq+vLuTdckFDHomjbE1xSKrN/1E=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=X5MAbCOQ6qvScIFhG2CdiPC0OQrMqbglhiU90h033wiUwCoZhLhENHhAgVpfPAIey+fEbWVMZiJ0AIl6QN9thlFOIdd1KzsFdSZ2fs0eIGwG2E68JczYB4q7FT++C8pgumzv1J6heqXPt6e88n/ifoDAGc/dwIuLlgMy3vtRhCE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=skHak3je; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="skHak3je" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9C326C116D0; Thu, 29 Jan 2026 08:05:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1769673923; bh=i22p4sf+DSGw5s0Rcq+vLuTdckFDHomjbE1xSKrN/1E=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=skHak3je481fNw0ayYjO7y493PFx2ce5kzqQ9HAm1wcGlEKvhLSW2DL58/l9c1Mor g0n7Nw5zEEI0y/NdCN+rV+jldL+a4jYxLwRjdckEBxVowHltqTSZFGxpgDCkXe1F9E FK61DrzQSfd83p7KvlzAquTCZQHtR1LRcjxFA9bADMfn45DVVZtkt13dElB3tnKiw4 2yxrniX7u1ExsegzmUB8dezBfJ7c0bJWftmHWBm9QL8XyLTz2x1YZ7X1gOKKUdAkM9 +DruqvmZJovjkyoZME9LhOoWvKm4qDTF+0LzY08iDR8FvH35iIxHCw0RISHY824STm RUrUPyKfd7skQ== Date: Thu, 29 Jan 2026 10:05:16 +0200 From: Mike Rapoport To: "Vishal Moola (Oracle)" Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, "Matthew Wilcox (Oracle)" , Dave Hansen , Andy Lutomirski , Peter Zijlstra Subject: Re: [PATCH v2 0/3] Convert 64-bit x86/mm/pat to ptdescs Message-ID: References: <20260128224049.385013-1-vishal.moola@gmail.com> 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=us-ascii Content-Disposition: inline In-Reply-To: <20260128224049.385013-1-vishal.moola@gmail.com> Hi Vishal, On Wed, Jan 28, 2026 at 02:40:46PM -0800, Vishal Moola (Oracle) wrote: > x86/mm/pat should be using ptdescs. One line has already been > converted to pagetable_free(), while the allocation sites use > get_free_pages(). This causes issues separately allocating ptdescs > from struct page. > > These patches convert the allocation/free sites to use ptdescs. 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. > > [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/T/#u > > ------ > > I've also tested this on a tree that separately allocates ptdescs. That > didn't find any lingering alloc/free issues. > > I've realized that the pgd_list should also be using ptdescs (for 32bit > in this file). This can be done in a different patchset since there's > other users of pgd_list that still need to be converted. Since Andrew merges cover-letter text into the first commit changelog, some explanation about pgd_list should be a part of that combined changelog. > Based on current mm-new. > > v2: > - Use pagetable_alloc() in populate_pgd() - in patch 2 > - Rename subject line to specify 64-bit (i.e. 32-bit wasn't converted) > - Added reference links to the projects mentioned in the cover letter > > Vishal Moola (Oracle) (3): > x86/mm/pat: Convert pte code to use ptdescs > x86/mm/pat: Convert pmd code to use ptdescs > x86/mm/pat: Convert split_large_page() to use ptdescs > > arch/x86/mm/pat/set_memory.c | 43 ++++++++++++++++++++---------------- > 1 file changed, 24 insertions(+), 19 deletions(-) > > -- > 2.52.0 > -- Sincerely yours, Mike.