Thread (119 messages) flat view 119 messages, 9 authors, 8d ago

Re: [RFC PATCH 18/57] mm/collapse: install the destinations at PTE level

From: Kiryl Shutsemau <hidden>
Date: 2026-08-26 16:57:56
Also in: bpf, linux-kselftest, linux-mm, lkml

On Tue, Aug 25, 2026 at 02:48:51PM +0800, Lance Yang wrote:
On Sun, Aug 16, 2026 at 11:45:30PM +0100, Kiryl Shutsemau wrote:
quoted
+		/* Slots with no source gain anon memory that no zap accounted */
+		if (nr_populated)
+			add_mm_counter(mm, MM_ANONPAGES, nr_populated);
Well ... KSM zero-page accounting gets out of sync here.
True. Thanks for catching this!
I was thinking of something like this:
Your code looks correct to me. I will take the collapse_abort_candidate()
hunk as is.

The install side I will organize slightly differently: a
collapse_account_install() that does the MM_ANONPAGES accounting in
addition to the KSM stuff, called from both install paths.

-- 
  Kiryl Shutsemau / Kirill A. Shutemov
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help