Lines Matching refs:memcg_lru

4712 	spin_lock(&pgdat->memcg_lru.lock);  in lru_gen_rotate_memcg()
4725 new = get_memcg_gen(pgdat->memcg_lru.seq); in lru_gen_rotate_memcg()
4727 new = get_memcg_gen(pgdat->memcg_lru.seq + 1); in lru_gen_rotate_memcg()
4734 hlist_nulls_add_head_rcu(&lruvec->lrugen.list, &pgdat->memcg_lru.fifo[new][bin]); in lru_gen_rotate_memcg()
4736 hlist_nulls_add_tail_rcu(&lruvec->lrugen.list, &pgdat->memcg_lru.fifo[new][bin]); in lru_gen_rotate_memcg()
4738 pgdat->memcg_lru.nr_memcgs[old]--; in lru_gen_rotate_memcg()
4739 pgdat->memcg_lru.nr_memcgs[new]++; in lru_gen_rotate_memcg()
4744 if (!pgdat->memcg_lru.nr_memcgs[old] && old == get_memcg_gen(pgdat->memcg_lru.seq)) in lru_gen_rotate_memcg()
4745 WRITE_ONCE(pgdat->memcg_lru.seq, pgdat->memcg_lru.seq + 1); in lru_gen_rotate_memcg()
4747 spin_unlock(&pgdat->memcg_lru.lock); in lru_gen_rotate_memcg()
4760 spin_lock(&pgdat->memcg_lru.lock); in lru_gen_online_memcg()
4764 gen = get_memcg_gen(pgdat->memcg_lru.seq); in lru_gen_online_memcg()
4766 hlist_nulls_add_tail_rcu(&lruvec->lrugen.list, &pgdat->memcg_lru.fifo[gen][bin]); in lru_gen_online_memcg()
4767 pgdat->memcg_lru.nr_memcgs[gen]++; in lru_gen_online_memcg()
4771 spin_unlock(&pgdat->memcg_lru.lock); in lru_gen_online_memcg()
4795 spin_lock(&pgdat->memcg_lru.lock); in lru_gen_release_memcg()
4802 pgdat->memcg_lru.nr_memcgs[gen]--; in lru_gen_release_memcg()
4804 if (!pgdat->memcg_lru.nr_memcgs[gen] && gen == get_memcg_gen(pgdat->memcg_lru.seq)) in lru_gen_release_memcg()
4805 WRITE_ONCE(pgdat->memcg_lru.seq, pgdat->memcg_lru.seq + 1); in lru_gen_release_memcg()
4807 spin_unlock(&pgdat->memcg_lru.lock); in lru_gen_release_memcg()
5373 gen = get_memcg_gen(READ_ONCE(pgdat->memcg_lru.seq)); in shrink_many()
5377 hlist_nulls_for_each_entry_rcu(lrugen, pos, &pgdat->memcg_lru.fifo[gen][bin], list) { in shrink_many()
6134 spin_lock_init(&pgdat->memcg_lru.lock); in lru_gen_init_pgdat()
6138 INIT_HLIST_NULLS_HEAD(&pgdat->memcg_lru.fifo[i][j], i); in lru_gen_init_pgdat()