1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
Index: vserver-sources-2.0.2_2.6.15.4/include/linux/vserver/debug.h
===================================================================
--- vserver-sources-2.0.2_2.6.15.4.orig/include/linux/vserver/debug.h
+++ vserver-sources-2.0.2_2.6.15.4/include/linux/vserver/debug.h
@@ -28,6 +28,7 @@ extern unsigned int vx_debug_xid;
extern unsigned int vx_debug_nid;
extern unsigned int vx_debug_net;
extern unsigned int vx_debug_limit;
+extern unsigned int vx_debug_cres;
extern unsigned int vx_debug_dlim;
extern unsigned int vx_debug_cvirt;
extern unsigned int vx_debug_misc;
@@ -73,6 +74,7 @@ extern unsigned int vx_debug_misc;
#define vx_debug_nid 0
#define vx_debug_net 0
#define vx_debug_limit 0
+#define vx_debug_cres 0
#define vx_debug_dlim 0
#define vx_debug_cvirt 0
Index: vserver-sources-2.0.2_2.6.15.4/include/linux/vserver/limit_int.h
===================================================================
--- vserver-sources-2.0.2_2.6.15.4.orig/include/linux/vserver/limit_int.h
+++ vserver-sources-2.0.2_2.6.15.4/include/linux/vserver/limit_int.h
@@ -4,6 +4,7 @@
#ifdef __KERNEL__
+#define VXD_RCRES(r) VXD_CBIT(cres, (r))
#define VXD_RLIMIT(r) VXD_CBIT(limit, (r))
extern const char *vlimit_name[NUM_LIMITS];
@@ -11,7 +12,7 @@ extern const char *vlimit_name[NUM_LIMIT
static inline void __vx_acc_cres(struct vx_info *vxi,
int res, int dir, void *_data, char *_file, int _line)
{
- if (VXD_RLIMIT(res))
+ if (VXD_RCRES(res))
vxlprintk(1, "vx_acc_cres[%5d,%s,%2d]: %5d%s (%p)",
(vxi ? vxi->vx_id : -1), vlimit_name[res], res,
(vxi ? atomic_read(&vxi->limit.rcur[res]) : 0),
@@ -28,7 +29,7 @@ static inline void __vx_acc_cres(struct
static inline void __vx_add_cres(struct vx_info *vxi,
int res, int amount, void *_data, char *_file, int _line)
{
- if (VXD_RLIMIT(res))
+ if (VXD_RCRES(res))
vxlprintk(1, "vx_add_cres[%5d,%s,%2d]: %5d += %5d (%p)",
(vxi ? vxi->vx_id : -1), vlimit_name[res], res,
(vxi ? atomic_read(&vxi->limit.rcur[res]) : 0),
Index: vserver-sources-2.0.2_2.6.15.4/kernel/vserver/sysctl.c
===================================================================
--- vserver-sources-2.0.2_2.6.15.4.orig/kernel/vserver/sysctl.c
+++ vserver-sources-2.0.2_2.6.15.4/kernel/vserver/sysctl.c
@@ -30,6 +30,7 @@ enum {
CTL_DEBUG_NID,
CTL_DEBUG_NET,
CTL_DEBUG_LIMIT,
+ CTL_DEBUG_CRES,
CTL_DEBUG_DLIM,
CTL_DEBUG_CVIRT,
CTL_DEBUG_MISC,
@@ -41,6 +42,7 @@ unsigned int vx_debug_xid = 0;
unsigned int vx_debug_nid = 0;
unsigned int vx_debug_net = 0;
unsigned int vx_debug_limit = 0;
+unsigned int vx_debug_cres = 0;
unsigned int vx_debug_dlim = 0;
unsigned int vx_debug_cvirt = 0;
unsigned int vx_debug_misc = 0;
@@ -168,6 +170,14 @@ static ctl_table debug_table[] = {
.proc_handler = &proc_dodebug
},
{
+ .ctl_name = CTL_DEBUG_CRES,
+ .procname = "debug_cres",
+ .data = &vx_debug_cres,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = &proc_dodebug
+ },
+ {
.ctl_name = CTL_DEBUG_DLIM,
.procname = "debug_dlim",
.data = &vx_debug_dlim,
@@ -210,6 +220,7 @@ EXPORT_SYMBOL_GPL(vx_debug_xid);
EXPORT_SYMBOL_GPL(vx_debug_nid);
EXPORT_SYMBOL_GPL(vx_debug_net);
EXPORT_SYMBOL_GPL(vx_debug_limit);
+EXPORT_SYMBOL_GPL(vx_debug_cres);
EXPORT_SYMBOL_GPL(vx_debug_dlim);
EXPORT_SYMBOL_GPL(vx_debug_cvirt);
EXPORT_SYMBOL_GPL(vx_debug_misc);
|