From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-173.mta0.migadu.com (out-173.mta0.migadu.com [91.218.175.173]) (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 6BCB5313E21 for ; Wed, 11 Feb 2026 12:55:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770814523; cv=none; b=gD0IH2+EFzK5dY33mqjGwYoaAmjZuLFzVWY4mMH2ItR2xLdF4vYTTRge+MElg8DTGt7R/RJjB3VVeHiZ3GNnW+r27VEXGwjbhMOxGid3/tOrqNpIiSVPOvu9m1FK1PfQh2dnFsFFqLfbDUO6SIY+Qnuavvec2aXxWvMVmtg2Ju8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770814523; c=relaxed/simple; bh=OgswS1kuISvO5cQwhaz/Jt57w7PsiUpkUVnRqE77pRg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=t2zIDGd1J8kb00C6ZMXvEa4N5CWrnAg76nbuZ1oD5pY5i4Pdjqk7fvGrcIOyGO3s4e089u/9fsXfrpgDeQZIeY8I6K3JPrEZCdyIbU+/WfT0AYJPoMOJW2KjZsChGj5JJEQQtBxNoQUN1yEksI7+oAYnv3l1cQfi43A/eRxrYHk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=SWq7b2JH; arc=none smtp.client-ip=91.218.175.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="SWq7b2JH" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1770814519; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=+YanjR3U4weMG4VW1vewWJqflQleiBR1ZTIDoCsnaFE=; b=SWq7b2JH1CPOwxMheZnHimW9HJpL8AZg6obmI0m2dIL+Pom0a96tDKGXBlm8ruKKKsFrn+ TnH/GuegF2B4bovwZO9eQapE+u5h2PEERC2fOJL4Wx93p3PofpYC/8qjmJhDNI7R61Z2sX OwEvT520XSi/SJcKyf0n2epz/VtjbD0= From: Usama Arif To: Andrew Morton , david@kernel.org, lorenzo.stoakes@oracle.com, willy@infradead.org, linux-mm@kvack.org Cc: fvdl@google.com, hannes@cmpxchg.org, riel@surriel.com, shakeel.butt@linux.dev, kas@kernel.org, baohua@kernel.org, dev.jain@arm.com, baolin.wang@linux.alibaba.com, npache@redhat.com, Liam.Howlett@oracle.com, ryan.roberts@arm.com, vbabka@suse.cz, lance.yang@linux.dev, linux-kernel@vger.kernel.org, kernel-team@meta.com, Usama Arif Subject: [RFC 0/2] mm: thp: split time allocation of page table for THPs Date: Wed, 11 Feb 2026 04:49:44 -0800 Message-ID: <20260211125507.4175026-1-usama.arif@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT This is an RFC patch to allocate the PTE page table at split time only and not do pre-deposit for THPs as suggested by David [1]. The core patch is the first one. The second one is not needed and its just vmstat counters I used to show that split doesn't fail. Its going to be 0 all the time and won't include it in future revisions. It would have been ideal if all pre-deposit code was removed but its not possible due to PowerPC. The rationale and further details are covered in the commit message of the first patch, including why the patch is safe. [1] https://lore.kernel.org/all/ee5bd77f-87ad-4640-a974-304b488e4c64@kernel.org/ Usama Arif (2): mm: thp: allocate PTE page tables lazily at split time mm: thp: add THP_SPLIT_PMD_PTE_ALLOC_FAILED counter include/linux/huge_mm.h | 4 +- include/linux/vm_event_item.h | 1 + mm/huge_memory.c | 145 ++++++++++++++++++++++++---------- mm/khugepaged.c | 7 +- mm/migrate_device.c | 15 ++-- mm/rmap.c | 42 +++++++++- mm/vmstat.c | 1 + 7 files changed, 162 insertions(+), 53 deletions(-) -- 2.47.3