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
94
95
96
97
98
99
100
101
102
|
Index: vserver-sources-2.1.1_2.6.15.4/include/linux/vserver/debug.h
===================================================================
--- vserver-sources-2.1.1_2.6.15.4.orig/include/linux/vserver/debug.h
+++ vserver-sources-2.1.1_2.6.15.4/include/linux/vserver/debug.h
@@ -29,6 +29,7 @@ extern unsigned int vx_debug_nid;
extern unsigned int vx_debug_tag;
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_quota;
extern unsigned int vx_debug_cvirt;
@@ -80,6 +81,7 @@ void dump_vx_info_inactive(int);
#define vx_debug_tag 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.1.1_2.6.15.4/include/linux/vserver/limit_int.h
===================================================================
--- vserver-sources-2.1.1_2.6.15.4.orig/include/linux/vserver/limit_int.h
+++ vserver-sources-2.1.1_2.6.15.4/include/linux/vserver/limit_int.h
@@ -4,6 +4,7 @@
#ifdef __KERNEL__
+#define VXD_RCRES_COND(r) VXD_CBIT(cres, (r))
#define VXD_RLIMIT_COND(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_COND(res))
+ if (VXD_RCRES_COND(res))
vxlprintk(1, "vx_acc_cres[%5d,%s,%2d]: %5ld%s (%p)",
(vxi ? vxi->vx_id : -1), vlimit_name[res], res,
(vxi ? (long)__rlim_get(&vxi->limit, 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_COND(res))
+ if (VXD_RCRES_COND(res))
vxlprintk(1, "vx_add_cres[%5d,%s,%2d]: %5ld += %5d (%p)",
(vxi ? vxi->vx_id : -1), vlimit_name[res], res,
(vxi ? (long)__rlim_get(&vxi->limit, res) : 0),
Index: vserver-sources-2.1.1_2.6.15.4/kernel/vserver/sysctl.c
===================================================================
--- vserver-sources-2.1.1_2.6.15.4.orig/kernel/vserver/sysctl.c
+++ vserver-sources-2.1.1_2.6.15.4/kernel/vserver/sysctl.c
@@ -31,6 +31,7 @@ enum {
CTL_DEBUG_TAG,
CTL_DEBUG_NET,
CTL_DEBUG_LIMIT,
+ CTL_DEBUG_CRES,
CTL_DEBUG_DLIM,
CTL_DEBUG_QUOTA,
CTL_DEBUG_CVIRT,
@@ -44,6 +45,7 @@ unsigned int vx_debug_nid = 0;
unsigned int vx_debug_tag = 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_quota = 0;
unsigned int vx_debug_cvirt = 0;
@@ -146,6 +148,7 @@ static ctl_table debug_table[] = {
CTL_ENTRY (CTL_DEBUG_TAG, debug_tag),
CTL_ENTRY (CTL_DEBUG_NET, debug_net),
CTL_ENTRY (CTL_DEBUG_LIMIT, debug_limit),
+ CTL_ENTRY (CTL_DEBUG_CRES, debug_cres),
CTL_ENTRY (CTL_DEBUG_DLIM, debug_dlim),
CTL_ENTRY (CTL_DEBUG_QUOTA, debug_quota),
CTL_ENTRY (CTL_DEBUG_CVIRT, debug_cvirt),
@@ -171,6 +174,7 @@ static match_table_t tokens = {
{ CTL_DEBUG_TAG, "tag=%x" },
{ CTL_DEBUG_NET, "net=%x" },
{ CTL_DEBUG_LIMIT, "limit=%x" },
+ { CTL_DEBUG_CRES, "cres=%x" },
{ CTL_DEBUG_DLIM, "dlim=%x" },
{ CTL_DEBUG_QUOTA, "quota=%x" },
{ CTL_DEBUG_CVIRT, "cvirt=%x" },
@@ -207,6 +211,7 @@ static int __init vs_debug_setup(char *s
HANDLE_CASE(NID, nid, value);
HANDLE_CASE(NET, net, value);
HANDLE_CASE(LIMIT, limit, value);
+ HANDLE_CASE(CRES, cres, value);
HANDLE_CASE(DLIM, dlim, value);
HANDLE_CASE(QUOTA, dlim, value);
HANDLE_CASE(CVIRT, cvirt, value);
@@ -228,6 +233,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_quota);
EXPORT_SYMBOL_GPL(vx_debug_cvirt);
|