Re: [RFC] docs/admin-guide/cgroup-v2: Add hugetlb rsvd files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Apr 16, 2021 at 04:45:38PM -0400, Tejun Heo wrote:
> (cc'ing memcg maintainers)
> 
> On Fri, Apr 16, 2021 at 04:11:46PM +0200, Odin Ugedal wrote:
> > Add missing docs about reservation accounting for hugetlb in cgroup v2.
> > 
> > Signed-off-by: Odin Ugedal <odin@xxxxxxx>
> > ---
> > RFC: This is linking from cgroup-v1 docs, and that is probably not
> > optimal. The information about the difference between reservation
> > accounting and page fault accounting is pretty hard to make short.
> > 
> > I think we have four ways to do it, but I don't know what is
> > most optimal:
> > 
> > - Link from cgroup-v2 to cgroup-v1 (this patch)
> > - Have a separate description for both v1 and v2
> > - Move description from cgroup-v1 to cgroup-v2, and link from v1 to
> >   v2.
> 
> This would be my preference but I don't really mind the other way around
> that much.

v1/hugetlb.rst is quite verbose, and some things are implementation
details. I'm not sure we want all that in the cgroup2 documentation.

My preference would be to first try to write a version of the doc in
cgroup2's briefer style, and then, depending on how that works out,
see whether we can delete (replace with link) the cgroup1 text, or
keep it for archiving purposes.

v1/hugetlb doc items that seem unnecesary to keep in v2:

- how to mount the cgroupfs, create cgroups, and move tasks into it

- the page fault accounting description could be compressed a
  bit. maybe drop the part about it being the admin's job to avoid
  sigbus by being careful with the allocations. that's obvious imo
  when you simply describe the sigbus semantics.

- likewise, reservation accounting can be briefer too. there is quite
  a bit of opinion in there that could probably be cut short. maybe a
  one-liner that says "mmap-time accounting gives userspace easier
  error handling - if in doubt, use reservation accounting" or so.

- caveats with shared memory: not sure this is needed at all, but if
  so, it can be a one liner saying "hugetlb uses the same first-hit
  semantics as the memory controller (see Memory Ownership)"

- Caveats with HugeTLB cgroup offline: this is an implementation
  detail that i don't think is actionable information for users



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [Monitors]

  Powered by Linux