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 it
12 * under the terms of version 2.1 of the GNU Lesser General Public License
13 * as published by the Free Software Foundation.
15 * This program is distributed in the hope that it would be useful, but
16 * WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
25 * Integrate RBCE and CRBE into a single module
32 // data types defined in main rbcemod.c
33 struct rbce_private_data;
35 struct ckrm_core_class;
37 #ifndef RBCE_EXTENSION
39 /****************************************************************************
41 * RBCE STANDALONE VERSION, NO CHOICE FOR DATA COLLECTION
43 ****************************************************************************/
46 #warning " ... RBCE .."
49 #define RBCE_MOD_DESCR "Rule Based Classification Engine Module for CKRM"
50 #define RBCE_MOD_NAME "rbce"
52 /* extension to private data: NONE */
53 struct rbce_ext_private_data {
56 static inline void init_ext_private_data(struct rbce_private_data *dst)
60 /* sending notification to user: NONE */
62 static void notify_class_action(struct rbce_class *cls, int action)
65 static inline void send_fork_notification(struct task_struct *tsk,
66 struct ckrm_core_class *cls)
69 static inline void send_exit_notification(struct task_struct *tsk)
72 static inline void send_manual_notification(struct task_struct *tsk)
76 /* extension initialization and destruction at module init and exit */
77 static inline int init_rbce_ext_pre(void)
81 static inline int init_rbce_ext_post(void)
85 static inline void exit_rbce_ext(void)
91 /***************************************************************************
93 * RBCE with User Level Notification
95 ***************************************************************************/
98 #warning " ... CRBCE .."
100 #warning " ... CRBCE doing sampling ..."
103 #warning " ... CRBCE doing delay ..."
107 #define RBCE_MOD_DESCR "Rule Based Classification Engine Module" \
108 "with Data Sampling/Delivery for CKRM"
109 #define RBCE_MOD_NAME "crbce"
111 #include <linux/crbce.h>
113 struct rbce_ext_private_data {
114 struct task_sample_info sample;
117 static void notify_class_action(struct rbce_class *cls, int action);
119 static void send_fork_notification(struct task_struct *tsk,
120 struct ckrm_core_class *cls);
121 static void send_exit_notification(struct task_struct *tsk);
122 static void send_manual_notification(struct task_struct *tsk);