4 * Copyright (C) Hubertus Franke, IBM Corp. 2003
6 * This files contains the type definition of the record
7 * created by the CRBCE CKRM classification engine
10 * Latest version, more details at http://ckrm.sf.net
12 * This program is free software; you can redistribute it and/or modify it
13 * under the terms of version 2.1 of the GNU Lesser General Public License
14 * as published by the Free Software Foundation.
16 * This program is distributed in the hope that it would be useful, but
17 * WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
27 * 2003-11-11 Created by H.Franke
28 * 2003-12-01 Sanitized for Delivery by H.Franke
32 #ifndef CRBCE_RECORDS_H
33 #define CRBCE_RECORDS_H
36 #include <linux/autoconf.h>
40 #define CONFIG_DELAY_ACCT
43 #include <linux/types.h>
44 #include <linux/ckrm.h>
45 #include <linux/ckrm_ce.h>
47 #define CRBCE_UKCC_NAME "crbce_ukcc"
48 #define CRBCE_UKCC_PATH "/mnt/relayfs"
50 #define CRBCE_UKCC_PATH_NAME CRBCE_UKCC_PATH"/"CRBCE_UKCC_NAME
52 #define CRBCE_MAX_CLASS_NAME_LEN 256
54 /****************************************************************
56 * CRBCE EVENT SET is and extension to the standard CKRM_EVENTS
58 ****************************************************************/
61 /* we use the standard CKRM_EVENT_<..>
62 * to identify reclassification cause actions
63 * and extend by additional ones we need
68 CRBCE_REC_EXIT = CKRM_NUM_EVENTS,
69 CRBCE_REC_DATA_DELIMITER,
74 CRBCE_REC_KERNEL_CMD_DONE,
77 /* down command issueance */
83 struct task_sample_info {
87 uint32_t memio_delayed;
90 /*********************************************
91 * KERNEL -> USER records *
92 *********************************************/
94 /* we have records with either a time stamp or not */
100 struct crbce_hdr_ts {
107 /* individual records */
109 struct crbce_rec_fork {
110 struct crbce_hdr_ts hdr;
114 struct crbce_rec_data_delim {
115 struct crbce_hdr_ts hdr;
116 int is_stop; /* 0 start, 1 stop */
119 struct crbce_rec_task_data {
120 struct crbce_hdr_ts hdr;
121 struct task_sample_info sample;
122 struct task_delay_info delay;
125 struct crbce_ukcc_full {
126 struct crbce_hdr_ts hdr;
129 struct crbce_class_info {
130 struct crbce_hdr_ts hdr;
133 char name[CRBCE_MAX_CLASS_NAME_LEN];
136 /*********************************************
137 * USER -> KERNEL records *
138 *********************************************/
140 enum crbce_kernel_cmd {
147 struct crbce_command {
148 int type; /* we need this for the K->U reflection */
150 uint32_t len; /* added in the kernel for reflection */
153 #define set_cmd_hdr(rec,tok) \
154 ((rec).hdr.type=CRBCE_REC_KERNEL_CMD,(rec).hdr.cmd=(tok))
156 struct crbce_cmd_done {
157 struct crbce_command hdr;
162 struct crbce_command hdr;
165 struct crbce_cmd_send_data {
166 struct crbce_command hdr;
170 struct crbce_cmd_settimer {
171 struct crbce_command hdr;
172 uint32_t interval; /* in msec .. 0 means stop */