Messages in this thread | | | Date | Wed, 30 Nov 2022 09:36:15 -0800 (PST) | From | Hugh Dickins <> | Subject | Re: [PATCH] mm: remove lock_page_memcg() from rmap |
| |
On Wed, 30 Nov 2022, Shakeel Butt wrote: > > 2. For 6.2 (or 6.3), remove the non-present pte migration with some > additional text in the warning and do the rmap cleanup.
I just had an idea for softening the impact of that change: a moment's more thought may prove it's a terrible idea, but right now I like it.
What if we keep the non-present pte migration throughout the deprecation period, but with a change to the where the folio_trylock() is done, and a refusal to move the charge on the page of a non-present pte, if that page/folio is currently mapped anywhere else - the folio lock preventing it from then becoming mapped while in mem_cgroup_move_account().
There's an argument that that's a better implementation anyway: that we should not interfere with others' pages; but perhaps it would turn out to be unimplementable, or would make for less predictable behaviour.
Hugh
| |