X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=kernel%2Fcvirt_def.h;h=47688ed91da6fd565a3f87a75cf019dcd396f711;hb=69c048e18d1630eea2d5c55f7c5acbdcacba846e;hp=23aa246f51299f590d5209db82720ac8675204ea;hpb=9c78378bebc1a9f3d400f422df8ede9efea57dea;p=util-vserver.git diff --git a/kernel/cvirt_def.h b/kernel/cvirt_def.h index 23aa246..47688ed 100644 --- a/kernel/cvirt_def.h +++ b/kernel/cvirt_def.h @@ -35,7 +35,7 @@ struct _vx_syslog { /* context sub struct */ struct _vx_cvirt { - int max_threads; /* maximum allowed threads */ +// int max_threads; /* maximum allowed threads */ atomic_t nr_threads; /* number of current threads */ atomic_t nr_running; /* number of running threads */ atomic_t nr_uninterruptible; /* number of uninterruptible threads */ @@ -43,6 +43,7 @@ struct _vx_cvirt { atomic_t nr_onhold; /* processes on hold */ uint32_t onhold_last; /* jiffies when put on hold */ + struct timeval bias_tv; /* time offset to the host */ struct timespec bias_idle; struct timespec bias_uptime; /* context creation point */ uint64_t bias_clock; /* offset in clock_t */ @@ -51,27 +52,33 @@ struct _vx_cvirt { spinlock_t load_lock; /* lock for the load averages */ atomic_t load_updates; /* nr of load updates done so far */ - uint32_t load_last; /* last time load was cacled */ + uint32_t load_last; /* last time load was calculated */ uint32_t load[3]; /* load averages 1,5,15 */ atomic_t total_forks; /* number of forks so far */ - struct _vx_usage_stat cpustat[NR_CPUS]; - struct _vx_syslog syslog; }; -struct _vx_sock_acc { - atomic_t count; - atomic_t total; +struct _vx_cvirt_pc { + struct _vx_usage_stat cpustat; }; -/* context sub struct */ -struct _vx_cacct { - unsigned long total_forks; +#ifdef CONFIG_VSERVER_DEBUG - struct _vx_sock_acc sock[5][3]; -}; +static inline void __dump_vx_cvirt(struct _vx_cvirt *cvirt) +{ + printk("\t_vx_cvirt:\n"); + printk("\t threads: %4d, %4d, %4d, %4d\n", + atomic_read(&cvirt->nr_threads), + atomic_read(&cvirt->nr_running), + atomic_read(&cvirt->nr_uninterruptible), + atomic_read(&cvirt->nr_onhold)); + /* add rest here */ + printk("\t total_forks = %d\n", atomic_read(&cvirt->total_forks)); +} + +#endif #endif /* _VX_CVIRT_DEF_H */