From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796018119; b=uTsHx8L+2cfR+6B8Fer6/hT1bUiVnEvLqLs+JozAAfixVU5FY4ZKXsCnoi6lkhWbqIX5 gGjilVOUIrlnIgIX+USNxZfWswE8woSSnM4sgXxMpi+7QedNL/NJuiLBms8Lrx3PRaFJR Mu04IjKrBwFTLgkEaPQynosGr1uWl0Era41FKcz00jCMUiLX1xx1EtTPx3uVaDrz9QCg2 5CbUQNBqJl/xSBwT8/vuJAdMAt9p57YwLQ6rAQZbtkDkn0HLPl8IHlBu8//hxEfs3zZMx SmhYyMlPopP6FDJ97jXkpmcnrU2zVUho3z77ZV08ayHHORe2evm4qzwoPLv2vRG1OTw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796018119; h=Received:DKIM-Signature:Date:To:From:In-Reply-To:References:Subject: Message-Id; bh=rtX190c/MGXJ9eTS9WlRa1xCJTiy8NlFILQderdkZek=; b=k/4uZMkudT3NhqkNaXuvz12przLkKffJxwqdwJy1tz1u4CAlRHuXO4gpFsX11aUEUKqO fTCTSBusEKDafwI0Qj9zcPtbgFMAum17oIiaZo4n1jMliH2nYrkVgx6aCJwr8XcrzaavY z1DW6kE/tkglhjtvpnvFBIABaUAx+CdBaSqtHgMkA0dbwuscIszBqVLZeccc4S3j04UKt +lFfXNFTKbPs4GMZlBxJTKJjNYniKc5CaLVjdKT2BBFBScthDIC9tJDExB+Fy3YzfhoR9 8L1BBqXxMZPfR2I1KNRqQtpYe5VTWOLAM2be/RPSTukdBtURlAxeufAL/31qHohLclw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linux-foundation.org header.i=@linux-foundation.org header.a=rsa-sha256 header.s=korg header.b=bDrSumOX; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2BF78606A31C; Mon, 30 Nov 2026 05:55:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.a=rsa-sha256 header.s=korg header.b=bDrSumOX Received: by smtp.kernel.org (Postfix) with ESMTPSA id 53CF31F00896; Mon, 30 Nov 2026 05:55:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=korg; t=1796018118; bh=rtX190c/MGXJ9eTS9WlRa1xCJTiy8NlFILQderdkZek=; h=Date:To:From:In-Reply-To:References:Subject; b=bDrSumOXQBonsVykO1rAjFNaQcER280ApBTaF6zIaOMgycw7fFCPJrKNYgzpqFXNu guu1Ate5FL+gn10ZPQXtlkTlI8Uu4x7w8cZHY/23NX+wTfCUmei9fnV8RqokIBDr1B 0y0oIgyoXRNxe+g996uvJjiq1YlXaFrGDYKx1KlU= Date: Sun, 29 Nov 2026 21:55:17 -0800 To: mm-commits@vger.kernel.org,ziy@nvidia.com,ying.huang@linux.alibaba.com, vbabka@kernel.org,surenb@google.com,stable@vger.kernel.org, shakeel.butt@linux.dev,ryan.roberts@arm.com,rppt@kernel.org,riel@surriel.com, pfalcato@suse.de,nico.pache@linux.dev,mhocko@suse.com, matthew.brost@intel.com,ljs@kernel.org,liam@infradead.org, lance.yang@linux.dev,kas@kernel.org,joshua.hahnjy@gmail.com,jannh@google.com, hannes@cmpxchg.org,gourry@gourry.net,dev.jain@arm.com,david@kernel.org, chris@chrisdown.name,byungchul@sk.com,baolin.wang@linux.alibaba.com, baohua@kernel.org,apopple@nvidia.com,usama.arif@linux.dev, akpm@linux-foundation.org From: Andrew Morton In-Reply-To: <20261125115014.4014507-4-usama.arif@linux.dev> References: <20261125115014.4014507-4-usama.arif@linux.dev> Subject: + fs-proc-task_mmu-account-device-private-pmds-as-present-in-smaps.patch added to mm-new branch Message-Id: <20261130055518.53CF31F00896@smtp.kernel.org> X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list The patch titled Subject: fs/proc/task_mmu: account device-private PMDs as present in smaps has been added to the -mm mm-new branch. Its filename is fs-proc-task_mmu-account-device-private-pmds-as-present-in-smaps.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/fs-proc-task_mmu-account-device-private-pmds-as-present-in-smaps.patch This patch will later appear in the mm-new branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Note, mm-new is a provisional staging ground for work-in-progress patches, and acceptance into mm-new is a notification for others take notice and to finish up reviews. Please do not hesitate to respond to review feedback and post updated versions to replace or incrementally fixup patches in mm-new. The mm-new branch of mm.git is not included in linux-next If a few days of testing in mm-new is successful, the patch will me moved into mm.git's mm-unstable branch, which is included in linux-next Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via various branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there most days ------------------------------------------------------ From: Usama Arif Subject: fs/proc/task_mmu: account device-private PMDs as present in smaps Date: Wed, 25 Nov 2026 03:49:59 -0800 Device-private PMDs represent mapped pages, but smaps_pmd_entry() passes present=false to smaps_account(). That treats them like migration entries: mapcounts are ignored, PSS is charged in full, and exclusive mappings are accounted as shared. Match smaps_pte_entry() and mark device-private PMDs as present so smaps_account() uses mapcounts for PSS and private/shared accounting. Link: https://patch.msgid.link/20261125115014.4014507-4-usama.arif@linux.dev Fixes: a30b48bf1b24 ("mm/migrate_device: implement THP migration of zone device pages") Signed-off-by: Usama Arif Signed-off-by: Andrew Morton Acked-by: Lorenzo Stoakes (ARM) Acked-by: David Hildenbrand (Arm) Reviewed-by: Zi Yan Reviewed-by: Kiryl Shutsemau (Meta) Cc: Nico Pache Cc: Alistair Popple Cc: Byungchul Park Cc: Gregory Price Cc: Jann Horn Cc: Joshua Hahn Cc: Liam R. Howlett Cc: Matthew Brost Cc: Michal Hocko Cc: Pedro Falcato Cc: Mike Rapoport Cc: Suren Baghdasaryan Cc: Vlastimil Babka Cc: Ying Huang Cc: Johannes Weiner Cc: Rik van Riel Cc: Shakeel Butt Cc: Baolin Wang Cc: Ryan Roberts Cc: Dev Jain Cc: Barry Song Cc: Lance Yang Cc: Chris Down Cc: fs/proc/task_mmu.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- a/fs/proc/task_mmu.c~fs-proc-task_mmu-account-device-private-pmds-as-present-in-smaps +++ a/fs/proc/task_mmu.c @@ -1034,8 +1034,11 @@ static void smaps_pmd_entry(pmd_t *pmd, } else if (unlikely(thp_migration_supported())) { const softleaf_t entry = softleaf_from_pmd(pmdval); - if (softleaf_has_pfn(entry)) + if (softleaf_has_pfn(entry)) { + if (softleaf_is_device_private(entry)) + present = true; page = softleaf_to_page(entry); + } } if (IS_ERR_OR_NULL(page)) return; _ Patches currently in -mm which might be from usama.arif@linux.dev are mm-zswap-use-separate-compression-and-decompression-requests.patch mm-zswap-use-stack-requests-for-synchronous-decompression.patch fs-proc-task_mmu-read-the-pmd-once-in-smaps_pmd_entry.patch fs-proc-task_mmu-dont-read-young-dirty-from-a-non-present-pmd-in-smaps.patch fs-proc-task_mmu-account-device-private-pmds-as-present-in-smaps.patch