From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-177.mta1.migadu.com (out-177.mta1.migadu.com [95.215.58.177]) (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 F01C03C8705 for ; Mon, 27 Apr 2026 13:38:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777297132; cv=none; b=s3NOyALOVCc/w3D3AJluv0BT7YUPjRWrqqgucOPrCd+3mKeGa2YGPUq+f3VXuia2/Xruk7+oO0xyhCtaQ6ZqDPua8k9kEyyDicj/VLArpkv22OZSNp/g3uRs2FwdbNX3ztQx32itLRbCC9Gp/CC/Th4hrn2Ea5VxJVU0DXoWskc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777297132; c=relaxed/simple; bh=SfhJ8ygrfV2IoX+jSTGzDIP/zv2SIhumhEbun1n3YNk=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=rOLb0vpvUcXIVrjLhxh0mzmvp+FxmJrbmDlU+oBDhjSxrm7NdLri/o4qQ2mwWevm03Bw92I9lA2mCfh4t7z2yrAF95vfn5/Uldn03bwczgzTRU10vE1+H3FWgg8Y29SZ2IAk8XN5zLjvyZtVUIWIyJRVYVZ9PM4JdkSupd0QQiQ= 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=LJYL+/4K; arc=none smtp.client-ip=95.215.58.177 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="LJYL+/4K" Message-ID: <6e75c3ce-58b9-40e1-aa6d-ffbeb1215741@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1777297127; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mC2F1gDHIQ0Ve8S2oO/0EYTeoYpTFDkvwFI0aNstl30=; b=LJYL+/4K0NN+bA9SqfwkeKjTRh+yB0PM5IUJVqQgusa4B/1StXN7d4IyqsEOS992tIkl7Q 5CY4zUlvteyclLuzmbsKuZFNllvJn/E1+26ih2oImQoCmyYGeaGbSXkbh6G4puE6wpEYZF dvEHljBDhtVMuD/dvoMyzCMG64jiK8U= Date: Mon, 27 Apr 2026 14:38:32 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH 00/13] mm: PMD-level swap entries for anonymous THPs To: Andrew Morton , david@kernel.org, chrisl@kernel.org, kasong@tencent.com, ljs@kernel.org, ziy@nvidia.com, Hugh Dickins Cc: bhe@redhat.com, willy@infradead.org, youngjun.park@lge.com, hannes@cmpxchg.org, riel@surriel.com, shakeel.butt@linux.dev, alex@ghiti.fr, 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, Vlastimil Babka , lance.yang@linux.dev, linux-kernel@vger.kernel.org, nphamcs@gmail.com, shikemeng@huaweicloud.com, kernel-team@meta.com References: <20260427100553.2754667-1-usama.arif@linux.dev> Content-Language: en-US X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Usama Arif In-Reply-To: <20260427100553.2754667-1-usama.arif@linux.dev> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT On 27/04/2026 11:01, Usama Arif wrote: > When reclaim swaps out a PMD-mapped anonymous THP today, the PMD is > split into 512 PTE-level swap entries via TTU_SPLIT_HUGE_PMD before > unmap. > > This series introduces a PMD-level swap entry. The huge mapping is > preserved across the swap round-trip, and do_huge_pmd_swap_page() > resolves the entire 2 MB region in a single fault on swap-in, > no khugepaged involvement is needed. swap_map metadata is identical > either way (512 single-slot counts), so the PTE split buys nothing > on the swap side, it is purely a page-table representation change. > > This work was brought about after Hugh reported that one of the > major blockers for having lazy page table deposit is the lack of > PMD swap entries [1]. However, this series has benefits of its > own: +Hugh. Hugh raised this in [1], and I completely forgot to add him to the series, sorry about that! [1] https://lore.kernel.org/all/6869b7f0-84e1-fb93-03f1-9442cdfe476b@google.com/