3 #include <linux/config.h>
6 extern uint64_t vx_idle_jiffies(void);
8 static inline void vx_info_init_cvirt(struct _vx_cvirt *cvirt)
10 uint64_t idle_jiffies = vx_idle_jiffies();
13 do_posix_clock_monotonic_gettime(&cvirt->bias_uptime);
14 nsuptime = (unsigned long long)cvirt->bias_uptime.tv_sec
15 * NSEC_PER_SEC + cvirt->bias_uptime.tv_nsec;
16 cvirt->bias_clock = nsec_to_clock_t(nsuptime);
18 jiffies_to_timespec(idle_jiffies, &cvirt->bias_idle);
19 atomic_set(&cvirt->nr_threads, 0);
20 atomic_set(&cvirt->nr_running, 0);
21 atomic_set(&cvirt->nr_uninterruptible, 0);
22 atomic_set(&cvirt->nr_onhold, 0);
25 cvirt->utsname = system_utsname;
28 spin_lock_init(&cvirt->load_lock);
29 cvirt->load_last = jiffies;
30 atomic_set(&cvirt->load_updates, 0);
34 atomic_set(&cvirt->total_forks, 0);
36 spin_lock_init(&cvirt->syslog.logbuf_lock);
37 init_waitqueue_head(&cvirt->syslog.log_wait);
38 cvirt->syslog.log_start = 0;
39 cvirt->syslog.log_end = 0;
40 cvirt->syslog.con_start = 0;
41 cvirt->syslog.logged_chars = 0;
44 static inline void vx_info_exit_cvirt(struct _vx_cvirt *cvirt)
46 #ifdef CONFIG_VSERVER_DEBUG
49 vxwprintk((value = atomic_read(&cvirt->nr_threads)),
50 "!!! cvirt: %p[nr_threads] = %d on exit.",
52 vxwprintk((value = atomic_read(&cvirt->nr_running)),
53 "!!! cvirt: %p[nr_running] = %d on exit.",
55 vxwprintk((value = atomic_read(&cvirt->nr_uninterruptible)),
56 "!!! cvirt: %p[nr_uninterruptible] = %d on exit.",
58 vxwprintk((value = atomic_read(&cvirt->nr_onhold)),
59 "!!! cvirt: %p[nr_onhold] = %d on exit.",
65 static inline void vx_info_init_cacct(struct _vx_cacct *cacct)
71 atomic_set(&cacct->sock[i][j].count, 0);
72 atomic_set(&cacct->sock[i][j].total, 0);
77 static inline void vx_info_exit_cacct(struct _vx_cacct *cacct)