mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-07-24 04:34:25 +08:00
ZONE(9): Enable UMA sysctls
This commit is contained in:
parent
a27a1ba4f5
commit
aa4f504b20
@ -61,9 +61,9 @@ SYSCTL_NODE(, 0, sysctl, CTLFLAG_RW, 0,
|
||||
"Sysctl internal magic");
|
||||
SYSCTL_NODE(, CTL_KERN, kern, CTLFLAG_RW|CTLFLAG_CAPRD, 0,
|
||||
"High kernel, proc, limits &c");
|
||||
#ifndef __rtems__
|
||||
SYSCTL_NODE(, CTL_VM, vm, CTLFLAG_RW, 0,
|
||||
"Virtual memory");
|
||||
#ifndef __rtems__
|
||||
SYSCTL_NODE(, CTL_VFS, vfs, CTLFLAG_RW, 0,
|
||||
"File system");
|
||||
#endif /* __rtems__ */
|
||||
|
@ -261,20 +261,16 @@ static inline void keg_relock(uma_keg_t keg, uma_zone_t zone);
|
||||
|
||||
void uma_print_zone(uma_zone_t);
|
||||
void uma_print_stats(void);
|
||||
#ifndef __rtems__
|
||||
static int sysctl_vm_zone_count(SYSCTL_HANDLER_ARGS);
|
||||
static int sysctl_vm_zone_stats(SYSCTL_HANDLER_ARGS);
|
||||
#endif
|
||||
|
||||
SYSINIT(uma_startup3, SI_SUB_VM_CONF, SI_ORDER_SECOND, uma_startup3, NULL);
|
||||
|
||||
#ifndef __rtems__
|
||||
SYSCTL_PROC(_vm, OID_AUTO, zone_count, CTLFLAG_RD|CTLTYPE_INT,
|
||||
0, 0, sysctl_vm_zone_count, "I", "Number of UMA zones");
|
||||
|
||||
SYSCTL_PROC(_vm, OID_AUTO, zone_stats, CTLFLAG_RD|CTLTYPE_STRUCT,
|
||||
0, 0, sysctl_vm_zone_stats, "s,struct uma_type_header", "Zone Stats");
|
||||
#endif /* __rtems__ */
|
||||
|
||||
/*
|
||||
* This routine checks to see whether or not it's safe to enable buckets.
|
||||
@ -3270,6 +3266,7 @@ uma_zone_sumstat(uma_zone_t z, int *cachefreep, u_int64_t *allocsp,
|
||||
*sleepsp = sleeps;
|
||||
}
|
||||
#endif /* DDB */
|
||||
#endif /* __rtems__ */
|
||||
|
||||
static int
|
||||
sysctl_vm_zone_count(SYSCTL_HANDLER_ARGS)
|
||||
@ -3391,6 +3388,7 @@ skip:
|
||||
return (error);
|
||||
}
|
||||
|
||||
#ifndef __rtems__
|
||||
#ifdef DDB
|
||||
DB_SHOW_COMMAND(uma, db_show_uma)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user