[Devel] [PATCH RFC v0 1/3] cgroup: implement eventfd-based generic API for notifications
Kirill A. Shutemov
kirill at shutemov.name
Thu Nov 26 08:27:36 PST 2009
This patch introduces write-only file "cgroup.event_control" in every
cgroup.
To register new notification handler you need:
- create an eventfd;
- open a control file to be monitored. Callbacks register_event() and
unregister_event() must be defined for the control file;
- write "<event_fd> <control_fd> <args>" to cgroup.event_control.
Interpretation of args is defined by control file implementation;
eventfd will be woken up by control file implementation or when the
cgroup is removed.
To unregister notification handler just close eventfd.
Signed-off-by: Kirill A. Shutemov <kirill at shutemov.name>
--
1.6.5.3
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
More information about the Devel
mailing list