diff -NurpP linux-2.6.15.5-vs2.0.2-rc10/include/linux/vserver/debug.h linux-2.6.15.5-vs2.0.2-rc10.1/include/linux/vserver/debug.h --- linux-2.6.15.5-vs2.0.2-rc10/include/linux/vserver/debug.h 2006-02-10 15:24:43 +0100 +++ linux-2.6.15.5-vs2.0.2-rc10.1/include/linux/vserver/debug.h 2006-03-05 01:28:35 +0100 @@ -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 diff -NurpP linux-2.6.15.5-vs2.0.2-rc10/kernel/vserver/sysctl.c linux-2.6.15.5-vs2.0.2-rc10.1/kernel/vserver/sysctl.c --- linux-2.6.15.5-vs2.0.2-rc10/kernel/vserver/sysctl.c 2006-02-14 16:36:25 +0100 +++ linux-2.6.15.5-vs2.0.2-rc10.1/kernel/vserver/sysctl.c 2006-03-05 01:30:53 +0100 @@ -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); diff -NurpP --minimal linux-2.6.15.5-vs2.0.2-rc10.1/include/linux/vserver/limit_int.h linux-2.6.15.5-vs2.0.2-rc10.2/include/linux/vserver/limit_int.h --- linux-2.6.15.5-vs2.0.2-rc10.1/include/linux/vserver/limit_int.h 2006-02-10 15:24:43 +0100 +++ linux-2.6.15.5-vs2.0.2-rc10.2/include/linux/vserver/limit_int.h 2006-03-05 05:29:09 +0100 @@ -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),