-
Notifications
You must be signed in to change notification settings - Fork 398
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Provide APIs for enabling cgroup subsystems
Instead of providing APIs that enable cgroup limits for all subsystems, a new set of APIs is added which allows to query which subsystems are available and enable subsystems individually. This would allow runtimes to enable cgroup subsystems based on their requirements. Note that there is another subtle change in the design of the port library APIs related to cgroup system. Enabling a cgroup subsystem in portlibrary (by calling omrsysinfo_cgroup_enable_subsystems) would make the port library APIs to use cgroup limits internally. Any port library API that directly returns cgroup limits, eg omrsysinfo_cgroup_get_memlimit(), does not check whether the corresponding subsystem (eg memory) is enabled or not. Therefore, when using omrsysinfo_cgroup_* APIs, the caller doesn't need to explicitly enable the corresponding subsystem in the port library. Consider the case of omrsysinfo_get_physical_memory() which returns physical memory of the system. If the system is running in a cgroup, and the cgroup's "memory" subsystem is enabled, then omrsysinfo_get_physical_memory() would internally call omrsysinfo_cgroup_get_memlimit(), and return memory limit imposed by the cgroup. However, if the user wants to just get the memory limit imposed by the cgroup, it can directly call omrsysinfo_cgroup_get_memlimit(), without enabling the "memory" subsystem. Issue: #1281 Signed-off-by: Ashutosh Mehra <asmehra1@in.ibm.com>
- Loading branch information
Ashutosh Mehra
committed
Aug 14, 2017
1 parent
4b395f8
commit 36753bb
Showing
9 changed files
with
252 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.