Hello Guiseppe. Thanks for incorporating the changes. On Fri, Dec 13, 2019 at 11:28:08AM +0100, Giuseppe Scrivano <gscrivan@xxxxxxxxxx> wrote: > @@ -202,8 +234,11 @@ int hugetlb_cgroup_charge_cgroup(int idx, unsigned long nr_pages, > } > rcu_read_unlock(); > > - if (!page_counter_try_charge(&h_cg->hugepage[idx], nr_pages, &counter)) > + if (!page_counter_try_charge(&h_cg->hugepage[idx], nr_pages, > + &counter)) { > ret = -ENOMEM; > + hugetlb_event(h_cg, idx, HUGETLB_MAX); Here should be something like - hugetlb_event(h_cg, idx, HUGETLB_MAX); + hugetlb_event(hugetlb_cgroup_from_counter(counter), idx, HUGETLB_MAX); in order to have consistent behavior with memcg events (because page_counter_try_charge may fail higher in the hierarchy than h_cg). Michal
Attachment:
signature.asc
Description: Digital signature