Thread (36 messages) 36 messages, 7 authors, 2024-11-04

Re: [PATCH v1 2/6] memcg-v1: remove charge move code

From: David Hildenbrand <hidden>
Date: 2024-10-28 10:40:28
Also in: linux-doc, linux-fsdevel, linux-mm, lkml

On 28.10.24 11:22, David Hildenbrand wrote:
quoted
-
-	pgdat = folio_pgdat(folio);
-	from_vec = mem_cgroup_lruvec(from, pgdat);
-	to_vec = mem_cgroup_lruvec(to, pgdat);
-
-	folio_memcg_lock(folio);
-
-	if (folio_test_anon(folio)) {
-		if (folio_mapped(folio)) {
-			__mod_lruvec_state(from_vec, NR_ANON_MAPPED, -nr_pages);
-			__mod_lruvec_state(to_vec, NR_ANON_MAPPED, nr_pages);
Good, because this code was likely wrong :) (-> partially mapped anon
folios)
Staring at the code some more, mem_cgroup_move_charge_pte_range() refuses
PTE-mapped large folios, so that might have done the right thing.

-- 
Cheers,

David / dhildenb
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help