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 BF43D3AE6E5 for ; Tue, 3 Feb 2026 17:03:46 +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=1770138226; cv=none; b=upbrDkRVTBIrixbUFqSXrAgtRfEDFJ7XWRYoppMJk37rwXuaOUOomRto+twkoCcp3pNbXNYpReTOy7mI2VHrzuj6ykHFo4Y0Z7vSNln6VKrqewyMHnQyy+bfHByR+/ldVSf+qcdafIx3BQeyVKC5AJvmdfMpBjePhCkq12KKw2c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770138226; c=relaxed/simple; bh=Rz1ZH7cwBMEcc8pY8rqoH/bXe+tMJW7kk/yerwU8P9Y=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=BKU23Mb2jamXwdFOjyNMHeFNTrDeYukUa9l3xZDwx3zxciyOF7x07zYpPqaztx8p5zF6j6rVXpeW4I2P21h0qsfIAYhUWEOKRXoyn27z0lc2XiUiuwEPqBFvJTAUJpYe63poyXFIbXkpbeUVrNfv3lO2gNpoe18pdFaKLrCGZ7Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=RdxzCnvF; 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="RdxzCnvF" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 078B9C116D0; Tue, 3 Feb 2026 17:03:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1770138226; bh=Rz1ZH7cwBMEcc8pY8rqoH/bXe+tMJW7kk/yerwU8P9Y=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=RdxzCnvF9/9K4BIJpoa4VFdo4EKLFQj2KonO3t3fqpBr9IK0kXzCg6LjA/+5GGC2T CQFWYMMuYHqoTe+KyAXloSkpg5xjW1qvQamKc7clWJk17XPU4SESQ/zFYvHtWWM8Z+ 5/JEHZRh/JQCh2bbcBSJqinQi22QzstH+GvviE/nFDvvrdWYULyVvbsYFzLO5IapCO 6aMeCj4Lx4fPfKJ9/xcvYcgxpD5jlQ0rSbOBYJxlf2f3c24f/Yp0jfp7wGH886EjCi JdGkipBOLrN6nQZlGFssROtYbt4cXeXH58eaFpL28fYRKDRVXb0rKFMntOkiaG9mN2 7HMNlpf1YzyOQ== Date: Tue, 3 Feb 2026 19:03:39 +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 v3 0/3] Convert 64-bit x86/mm/pat to ptdescs Message-ID: References: <20260202172005.683870-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: <20260202172005.683870-1-vishal.moola@gmail.com> On Mon, Feb 02, 2026 at 09:20:02AM -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. > > 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. > > [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/ > > ------ > > I've also tested this on a tree that separately allocates ptdescs. That > didn't find any lingering alloc/free issues. > > Based on current mm-new. > > v3: > - Move comment regarding 32-bit conversions into the cover letter > - Correct the handling for the pagetable_alloc() error path > > 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 Acked-by: Mike Rapoport (Microsoft) With some minor comments in patch 1/3 > arch/x86/mm/pat/set_memory.c | 56 +++++++++++++++++++++--------------- > 1 file changed, 33 insertions(+), 23 deletions(-) > > -- > 2.52.0 > -- Sincerely yours, Mike.