Re: [PATCH v3 1/3] memcontrol: add helpers for hugetlb memcg accounting

Johannes Weiner
2023-10-03T12:47:35Z

On Mon, Oct 02, 2023 at 05:18:26PM -0700, Nhat Pham wrote:
> This patch exposes charge committing and cancelling as parts of the
> memory controller interface. These functionalities are useful when the
> try_charge() and commit_charge() stages have to be separated by other
> actions in between (which can fail). One such example is the new hugetlb
> accounting behavior in the following patch.
>
> The patch also adds a helper function to obtain a reference to the
> current task's memcg.
>
> Signed-off-by: Nhat Pham <nphamcs@gmail.com>

Acked-by: Johannes Weiner <hannes@cmpxchg.org>