Re: [v3 PATCH 2/3] memcg/hugetlb: Introduce mem_cgroup_charge_hugetlb

From: Nhat Pham
Date: Fri Dec 13 2024 - 20:29:50 EST


On Wed, Dec 11, 2024 at 12:40 PM Joshua Hahn <joshua.hahnjy@xxxxxxxxx> wrote:
>
> This patch introduces mem_cgroup_charge_hugetlb which combines the logic
> of mem_cgroup_hugetlb_try_charge / mem_cgroup_hugetlb_commit_charge and
> removes the need for mem_cgroup_hugetlb_cancel_charge. It also reduces
> the footprint of memcg in hugetlb code and consolidates all memcg
> related error paths into one.
>
> Signed-off-by: Joshua Hahn <joshua.hahnjy@xxxxxxxxx>

Thanks for simplifying my convoluted code ;)

Reviewed-by: Nhat Pham <nphamcs@xxxxxxxxx>