Skip to content

RFC CKRM after a major overhaul

[email protected] lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest12 patches 22 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12Register/Unregister interface for Controllersinclude/linux/ckrm.h include/linux/ckrm_rc.h init/Kconfig +4 more+382 -00 replies
2/12Class creation/deletioninclude/linux/ckrm.h include/linux/ckrm_rc.h kernel/ckrm/ckrm.c+175 -130 replies
3/12Share Handlinginclude/linux/ckrm.h include/linux/ckrm_rc.h kernel/ckrm/Makefile +3 more+297 -10 replies
4/12Add task logic to classinclude/linux/sched.h kernel/ckrm/Makefile kernel/ckrm/ckrm.c +2 more+174 -10 replies
5/12Init and clear class info in taskinclude/linux/ckrm.h init/main.c kernel/ckrm/ckrm.c +4 more+77 -00 replies
6/12Add proc interface to get class info of taskfs/proc/base.c include/linux/ckrm.h kernel/ckrm/ckrm_task.c+52 -10 replies
7/12Configfs based filesystem user interface - RCFSinit/Kconfig kernel/ckrm/Makefile kernel/ckrm/ckrm_rcfs.c+173 -00 replies
8/12Add attribute support to RCFSkernel/ckrm/ckrm_rcfs.c+50 -10 replies
9/12Add stats file support to RCFSkernel/ckrm/ckrm_rcfs.c+112 -20 replies
10/12Add shares file support to RCFSkernel/ckrm/ckrm_rcfs.c+136 -00 replies
11/12Add members file support to RCFSkernel/ckrm/ckrm_rcfs.c+49 -00 replies
12/12Documentation for CKRMDocumentation/ckrm/ckrm_basics Documentation/ckrm/ckrm_install Documentation/ckrm/ckrm_usage+171 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC] [PATCH 00/12] CKRM after a major overhaul

CKRM has gone through a major overhaul by removing some of the complexity, cutting down on features and moving portions to userspace.

Diffstat of this patchset (including the numtasks controller that follows) is:

	23 files changed, 2475 insertions(+), 5 deletions(-)

including Documentaion and comments.

This patchset will be followed with two controllers:
- a simple controller, numtasks to control number of tasks
- CPU controller, to control CPU resource.
--

Brief Intro for CKRM:

Class-based Kernel Resource Management (CKRM) enables control of system resource usage and monitoring of resource usage through user-defined groups of tasks called classes.

Class is a group of tasks that is grouped by the administrator.

By assigning tasks to classes, administrators can monitor and bound the resource usage of any system resource with a resource controller. Resources amenable to such control include CPU ticks, physical pages, disk I/O bandwidth, number of open file handles, and number of tasks to name a few.

Userspace interfaces with CKRM through a configfs subsystem: Resource Control File System (RCFS). Users create and delete classes simply by issuing mkdir or rmdir commands. Once created the user may set the resource share of a class and alter the group of tasks bound to those classes by writing to files in the class directory. Similarly, to monitor the subsequent resource utilization of the class, users read files in the class directory.

Users control different resource shares of a class independent of other resource. In other words, CPU share of class can be very different from memory share and that of I/O share.

Resource controllers implement a small set of functions that respond to changes in resource shares, class creation/deletion and class membership. Given a class and its shares the controller then manages resource usage of tasks in that class. For instance, a CPU resource controller might manipulate the timeslice of each task according to its class' remaining CPU share.

--

Patch Descriptions:

This set of patches implements classes, resource controller registration, and the RCFS interface. Subsequent sets of patches add specific resource controllers.

More details are available in the doumentation patch.

Patch descriptions:
01/12: ckrm_core
- Provides register/unregister functions for a controller

02/12: ckrm_core_class_support
- Provides functions to alloc and free a user defined class
- Provides utility functions to walk through the class hierarchy

03/12: ckrm_core_handle_shares
- Provides functions to set/get shares of a class
- Defines a teardown function that is intended to be called when user disables CKRM (by umount of configfs or rmmod of rcfs)

04/12: ckrm_tasksupport
- Adds logic to support adding/removing task to/from a class
- Provides an interface to set a task's class

05/12: ckrm_tasksupport_fork_exit_init
- Initializes and clears ckrm specific information at fork() and exit()
- Inititalizes ckrm (called from start_kernel)

06/12: ckrm_tasksupport_procsupport
- Adds an interface in /proc to get the class name of a task.

07/12 - ckrm_configfs_rcfs
Creates configfs interface(RCFS) for managing CKRM. Hooks up with configfs. Provides functions for creating and deleting classes.

08/12 - ckrm_configfs_rcfs_attr_support
Adds the basic attribute store and show functions.

09/12 - 04ckrm_configfs_rcfs_stats
Adds attr_store and attr_show support for stats file.

10/12 - ckrm_configfs_rcfs_shares
Adds attr_store and attr_show support for shares file.

11/12 - ckrm_configfs_rcfs_members
Adds attr_store and attr_show support for members file.

12/12 - ckrm_docs
Documentation describing important CKRM elements such as classes, shares, controllers, and the interface provided to userspace via RCFS

Signature · 4 lines
----------------------------------------------------------------------
    Chandra Seetharaman               | Be careful what you choose....
              - [email protected]   |      .......you may get it.
----------------------------------------------------------------------