Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0001-Cgroups-v2.patch #39

Merged
merged 1 commit into from
Mar 15, 2024
Merged

0001-Cgroups-v2.patch #39

merged 1 commit into from
Mar 15, 2024

Conversation

anjalidk
Copy link
Collaborator

  • Re-organized resmem_cg.c code efficiently to use cgroups v2.
  • Changed cgmemread to cgmem & cgmemval, adding new calls like cg_free_mem, cg_free_swap, cg_active, cg_inactive which reuse the existing calls.
  • Modified getmeminfoall to use above functions.
  • Added new function cg_res_val so it can be re-used with normal API and the bulk API.
  • Completed cgroups v2 code for RES_MEM_FREE, RES_MEM_AVAILABLE, RES_MEM_TOTAL RES_MEM_ACTIVE, RES_MEM_INACTIVE, RES_MEM_SWAPTOTAL, RES_MEM_SWAPFREE, RES_MEM_INFOALL. To differentiate between normal memory, pid field is non-null in cgroups calls.
  • Added scaling for cgroups which use the res->res_unit[i] fields to get bulk info about different fields at once.
  • Bulk API is fetched using the cg_res_val() call
  • Added Makefile to tests/MEM and added cgroups test code in mem_test_cg.c.
  • Fixed mem.sh to use Makefile.
  • Fixed some misc. issues in resfs.c, resnet.c, resmem.c, resproc.c, resvm.c, stat.c, resource_impl.h.

- Re-organized resmem_cg.c code efficiently to use cgroups v2.
- Changed cgmemread to cgmem & cgmemval, adding new calls
  like cg_free_mem, cg_free_swap, cg_active, cg_inactive which reuse the
  existing calls.
- Modified getmeminfoall to use above functions.
- Added new function cg_res_val so it can be re-used with normal API and the
  bulk API.
- Completed cgroups v2 code for RES_MEM_FREE, RES_MEM_AVAILABLE, RES_MEM_TOTAL
  RES_MEM_ACTIVE, RES_MEM_INACTIVE, RES_MEM_SWAPTOTAL, RES_MEM_SWAPFREE,
  RES_MEM_INFOALL. To differentiate between normal memory, pid field is
  non-null in cgroups calls.
- Added scaling for cgroups which use the res->res_unit[i] fields
  to get bulk info about different fields at once.
- Bulk API is fetched using the cg_res_val() call
- Added Makefile to tests/MEM and added cgroups test code in mem_test_cg.c.
- Fixed mem.sh to use Makefile.
- Fixed some misc. issues in resfs.c, resnet.c, resmem.c, resproc.c, resvm.c,
  stat.c, resource_impl.h.

Signed-off-by: Anjali Kulkarni <[email protected]>
@anjalidk anjalidk merged commit 5a3d9cb into main Mar 15, 2024
9 of 10 checks passed
@anjalidk anjalidk deleted the net4 branch March 15, 2024 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants