Re: [PATCH v10 1/8] hugetlb_cgroup: Add hugetlb_cgroup reservation counter

From: Mina Almasry
Date: Mon Feb 03 2020 - 18:16:36 EST


> > Proposed Solution:
> > A new page counter named
> > 'hugetlb.xMB.reservation_[limit|usage|max_usage]_in_bytes'. This counter has
> > slightly different semantics than
> > 'hugetlb.xMB.[limit|usage|max_usage]_in_bytes':
> >
>
> Changelog looks like it needs to be updated with the new resv naming.
>

I updated to the rsvd naming, which you suggested earlier and Mike
agreed was better.

> > +
> > static inline
> > struct hugetlb_cgroup *hugetlb_cgroup_from_css(struct cgroup_subsys_state *s)
> > {
>
> Small nit: hugetlb_cgroup_get_counter(), to me, implies incrementing a
> reference count, perhaps a better name would be in order. No strong
> preference.
>

Changed
> > /* Add the events file */
> > - cft = &h->cgroup_files_dfl[2];
> > + cft = &h->cgroup_files_dfl[4];
> > snprintf(cft->name, MAX_CFTYPE_NAME, "%s.events", buf);
> > cft->private = MEMFILE_PRIVATE(idx, 0);
> > cft->seq_show = hugetlb_events_show;
>
> Any cleanup to __hugetlb_cgroup_file_dfl_init() and
> __hugetlb_cgroup_file_legacy_init() that is possible would be great in a
> follow-up patch :)
>

Will do!

> Other than that, this looks very straight forward.
>
> Acked-by: David Rientjes <rientjes@xxxxxxxxxx>