1 /* Rule-based Classification Engine (RBCE) module
3 * Copyright (C) Hubertus Franke, IBM Corp. 2003
4 * (C) Chandra Seetharaman, IBM Corp. 2003
6 * Module for loading of classification policies and providing
7 * a user API for Class-based Kernel Resource Management (CKRM)
9 * Latest version, more details at http://ckrm.sf.net
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
21 * Integrate RBCE and CRBE into a single module
27 // data types defined in main rbcemod.c
28 struct rbce_private_data;
30 struct ckrm_core_class;
32 #ifndef RBCE_EXTENSION
34 /****************************************************************************
36 * RBCE STANDALONE VERSION, NO CHOICE FOR DATA COLLECTION
38 ****************************************************************************/
41 #warning " ... RBCE .."
44 #define RBCE_MOD_DESCR "Rule Based Classification Engine Module for CKRM"
45 #define RBCE_MOD_NAME "rbce"
47 /* extension to private data: NONE */
48 struct rbce_ext_private_data {
51 static inline void init_ext_private_data(struct rbce_private_data *dst)
55 /* sending notification to user: NONE */
57 static void notify_class_action(struct rbce_class *cls, int action)
60 static inline void send_fork_notification(struct task_struct *tsk,
61 struct ckrm_core_class *cls)
64 static inline void send_exit_notification(struct task_struct *tsk)
67 static inline void send_manual_notification(struct task_struct *tsk)
71 /* extension initialization and destruction at module init and exit */
72 static inline int init_rbce_ext_pre(void)
76 static inline int init_rbce_ext_post(void)
80 static inline void exit_rbce_ext(void)
86 /***************************************************************************
88 * RBCE with User Level Notification
90 ***************************************************************************/
93 #warning " ... CRBCE .."
95 #warning " ... CRBCE doing sampling ..."
98 #warning " ... CRBCE doing delay ..."
102 #define RBCE_MOD_DESCR "Rule Based Classification Engine Module" \
103 "with Data Sampling/Delivery for CKRM"
104 #define RBCE_MOD_NAME "crbce"
108 struct rbce_ext_private_data {
109 struct task_sample_info sample;
112 static void notify_class_action(struct rbce_class *cls, int action);
114 static void send_fork_notification(struct task_struct *tsk,
115 struct ckrm_core_class *cls);
116 static void send_exit_notification(struct task_struct *tsk);
117 static void send_manual_notification(struct task_struct *tsk);