Lines Matching full:ug

6837 static inline void uncharge_gather_clear(struct uncharge_gather *ug)  in uncharge_gather_clear()  argument
6839 memset(ug, 0, sizeof(*ug)); in uncharge_gather_clear()
6842 static void uncharge_batch(const struct uncharge_gather *ug) in uncharge_batch() argument
6846 if (!mem_cgroup_is_root(ug->memcg)) { in uncharge_batch()
6847 page_counter_uncharge(&ug->memcg->memory, ug->nr_pages); in uncharge_batch()
6849 page_counter_uncharge(&ug->memcg->memsw, ug->nr_pages); in uncharge_batch()
6850 if (!cgroup_subsys_on_dfl(memory_cgrp_subsys) && ug->nr_kmem) in uncharge_batch()
6851 page_counter_uncharge(&ug->memcg->kmem, ug->nr_kmem); in uncharge_batch()
6852 memcg_oom_recover(ug->memcg); in uncharge_batch()
6856 __count_memcg_events(ug->memcg, PGPGOUT, ug->pgpgout); in uncharge_batch()
6857 __this_cpu_add(ug->memcg->vmstats_percpu->nr_page_events, ug->nr_pages); in uncharge_batch()
6858 memcg_check_events(ug->memcg, ug->dummy_page); in uncharge_batch()
6862 css_put(&ug->memcg->css); in uncharge_batch()
6865 static void uncharge_page(struct page *page, struct uncharge_gather *ug) in uncharge_page() argument
6880 if (ug->memcg != page->mem_cgroup) { in uncharge_page()
6881 if (ug->memcg) { in uncharge_page()
6882 uncharge_batch(ug); in uncharge_page()
6883 uncharge_gather_clear(ug); in uncharge_page()
6885 ug->memcg = page->mem_cgroup; in uncharge_page()
6888 css_get(&ug->memcg->css); in uncharge_page()
6892 ug->nr_pages += nr_pages; in uncharge_page()
6895 ug->pgpgout++; in uncharge_page()
6897 ug->nr_kmem += nr_pages; in uncharge_page()
6901 ug->dummy_page = page; in uncharge_page()
6903 css_put(&ug->memcg->css); in uncharge_page()
6908 struct uncharge_gather ug; in uncharge_list() local
6911 uncharge_gather_clear(&ug); in uncharge_list()
6924 uncharge_page(page, &ug); in uncharge_list()
6927 if (ug.memcg) in uncharge_list()
6928 uncharge_batch(&ug); in uncharge_list()
6939 struct uncharge_gather ug; in mem_cgroup_uncharge() local
6948 uncharge_gather_clear(&ug); in mem_cgroup_uncharge()
6949 uncharge_page(page, &ug); in mem_cgroup_uncharge()
6950 uncharge_batch(&ug); in mem_cgroup_uncharge()