Thread (24 messages) 24 messages, 4 authors, 2020-02-03

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

From: Mina Almasry <hidden>
Date: 2020-02-03 23:16:35
Also in: linux-kselftest, linux-mm, lkml

quoted
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.
quoted
+
 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
quoted
      /* 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 <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help