1
0
mirror of https://github.com/ARM-software/devlib.git synced 2024-10-06 02:40:50 +01:00
Go to file
Patrick Bellasi b569a561a4 cgroups: add support for multi-controller hierarchies
Some systems mount multiple CGroup controllers in the same hierarchy, this
happens in desktop systems using systemd but it's also the default for
systems using CGroups v2. Unfortunately the current CGroup modules can
mount only single-controller hierarchies, thus failing when a controller
is already mounted with others in a single hierarchy.

This patch fixes this issue by:
- keeping track of which controllers are mounted in each hierarchy
- muting hierarchies instead of controllers
- creating Controller objects which reference the hierarchy they belong to

Thus, the new constructor of the Controller object requires to specify
the hierarchy ID as well as the list of controller which have to be
mounted in that hierarchy. The hierarchy ID is used to create a single
mount point for all the controllers in that hierarchy. This single mount
points are now named:
  <CGMOUNT>/devlib_cgh<ID>
where "cgh" stands for "CGroup Hierarchy" and <ID> is the specified
numerical identified of that hierarchy.

This patch removes also the Controller::__new__() method, which seems not to
have sense anymore, as well as the Controller::probe() method, which is
not more used. Indeed, all and only the available hierarchies are pre-mounted
at module initialization time.



Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com>
2016-11-29 10:39:28 +00:00
devlib cgroups: add support for multi-controller hierarchies 2016-11-29 10:39:28 +00:00
doc Added documentation for Target.extract() 2016-07-14 11:15:08 +01:00
src JunoEnergyInstrument: Provide INSTANTANEOUS interface 2015-12-15 17:09:55 +00:00
.gitignore target: add support for target side scripts 2016-01-26 15:58:41 +00:00
README.rst devlib initial commit. 2015-10-09 09:30:04 +01:00
setup.py devlib/utils/misc: improve memoize decorator 2016-06-23 09:51:47 +01:00

devlib
======

``devlib`` exposes an interface for interacting with and collecting
measurements from a variety of devices (such as mobile phones, tablets and
development boards) running a Linux-based operating system.


Installation
------------

::

        sudo -H pip install devlib


Usage
-----

Please refer  to the "Overview" section of the documentation.


License
-------

This package is distributed under `Apache v2.0 License <http://www.apache.org/licenses/LICENSE-2.0>`_. 


Feedback, Contrubutions and Support
-----------------------------------

- Please use the GitHub Issue Tracker associated with this repository for
  feedback.
- ARM licensees may contact ARM directly via their partner managers.
- We welcome code contributions via GitHub Pull requests. Please try to
  stick to the style in the rest of the code for your contributions.