linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / include / linux / vserver / cvirt_def.h
index bf4bd84..c368c2e 100644 (file)
@@ -4,9 +4,12 @@
 #include <linux/jiffies.h>
 #include <linux/utsname.h>
 #include <linux/spinlock.h>
+#include <linux/wait.h>
 #include <linux/time.h>
 #include <asm/atomic.h>
 
+#include "cacct.h"
+
 
 struct _vx_usage_stat {
        uint64_t user;
@@ -18,6 +21,19 @@ struct _vx_usage_stat {
        uint64_t iowait;
 };
 
+struct _vx_syslog {
+       wait_queue_head_t log_wait;
+       spinlock_t logbuf_lock;         /* lock for the log buffer */
+
+       unsigned long log_start;        /* next char to be read by syslog() */
+       unsigned long con_start;        /* next char to be sent to consoles */
+       unsigned long log_end;  /* most-recently-written-char + 1 */
+       unsigned long logged_chars;     /* #chars since last read+clear operation */
+
+       char log_buf[1024];
+};
+
+
 /* context sub struct */
 
 struct _vx_cvirt {
@@ -40,7 +56,9 @@ struct _vx_cvirt {
        uint32_t load_last;             /* last time load was cacled */
        uint32_t load[3];               /* load averages 1,5,15 */
 
-       struct _vx_usage_stat cpustat[NR_CPUS];
+       atomic_t total_forks;           /* number of forks so far */
+
+       struct _vx_syslog syslog;
 };
 
 struct _vx_sock_acc {
@@ -53,7 +71,7 @@ struct _vx_sock_acc {
 struct _vx_cacct {
        unsigned long total_forks;
 
-       struct _vx_sock_acc sock[5][3];
+       struct _vx_sock_acc sock[VXA_SOCK_SIZE][3];
 };
 
 #endif /* _VX_CVIRT_DEF_H */