Lines Matching refs:nrg
441 struct file_region *nrg; in get_file_region_entry_from_cache() local
446 nrg = list_first_entry(&resv->region_cache, struct file_region, link); in get_file_region_entry_from_cache()
447 list_del(&nrg->link); in get_file_region_entry_from_cache()
449 nrg->from = from; in get_file_region_entry_from_cache()
450 nrg->to = to; in get_file_region_entry_from_cache()
452 return nrg; in get_file_region_entry_from_cache()
455 static void copy_hugetlb_cgroup_uncharge_info(struct file_region *nrg, in copy_hugetlb_cgroup_uncharge_info() argument
459 nrg->reservation_counter = rg->reservation_counter; in copy_hugetlb_cgroup_uncharge_info()
460 nrg->css = rg->css; in copy_hugetlb_cgroup_uncharge_info()
470 struct file_region *nrg) in record_hugetlb_cgroup_uncharge_info() argument
474 nrg->reservation_counter = in record_hugetlb_cgroup_uncharge_info()
476 nrg->css = &h_cg->css; in record_hugetlb_cgroup_uncharge_info()
495 nrg->reservation_counter = NULL; in record_hugetlb_cgroup_uncharge_info()
496 nrg->css = NULL; in record_hugetlb_cgroup_uncharge_info()
523 struct file_region *nrg, *prg; in coalesce_file_region() local
537 nrg = list_next_entry(rg, link); in coalesce_file_region()
538 if (&nrg->link != &resv->regions && nrg->from == rg->to && in coalesce_file_region()
539 has_same_uncharge_info(nrg, rg)) { in coalesce_file_region()
540 nrg->from = rg->from; in coalesce_file_region()
553 struct file_region *nrg; in hugetlb_resv_map_add() local
556 nrg = get_file_region_entry_from_cache(map, from, to); in hugetlb_resv_map_add()
557 record_hugetlb_cgroup_uncharge_info(cg, h, map, nrg); in hugetlb_resv_map_add()
558 list_add(&nrg->link, rg); in hugetlb_resv_map_add()
559 coalesce_file_region(map, nrg); in hugetlb_resv_map_add()
837 struct file_region *nrg = NULL; in region_del() local
861 if (!nrg && in region_del()
863 nrg = list_first_entry(&resv->region_cache, in region_del()
866 list_del(&nrg->link); in region_del()
870 if (!nrg) { in region_del()
872 nrg = kmalloc(sizeof(*nrg), GFP_KERNEL); in region_del()
873 if (!nrg) in region_del()
883 nrg->from = t; in region_del()
884 nrg->to = rg->to; in region_del()
886 copy_hugetlb_cgroup_uncharge_info(nrg, rg); in region_del()
888 INIT_LIST_HEAD(&nrg->link); in region_del()
893 list_add(&nrg->link, &rg->link); in region_del()
894 nrg = NULL; in region_del()
923 kfree(nrg); in region_del()