summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJerry Jelinek <jerry.jelinek@joyent.com>2016-03-30 18:28:53 +0000
committerJerry Jelinek <jerry.jelinek@joyent.com>2016-03-30 18:28:53 +0000
commitab664c06caf06e9ce7586bff956e7709df1e702e (patch)
tree7e18a5d8dd49b0144c9fe7dbdb37934883732685
parentcfb2c4dcba83efa2701eb3e0828d6ad81196b256 (diff)
downloadillumos-joyent-release-20160331.tar.gz
OS-4630 lxbrand: want vm.max_map_count tunablerelease-20160331
Reviewed by: Patrick Mooney <patrick.mooney@joyent.com>
-rw-r--r--usr/src/uts/common/brand/lx/procfs/lx_proc.h1
-rw-r--r--usr/src/uts/common/brand/lx/procfs/lx_prvnops.c13
2 files changed, 14 insertions, 0 deletions
diff --git a/usr/src/uts/common/brand/lx/procfs/lx_proc.h b/usr/src/uts/common/brand/lx/procfs/lx_proc.h
index 471d7c0fdd..ee60028110 100644
--- a/usr/src/uts/common/brand/lx/procfs/lx_proc.h
+++ b/usr/src/uts/common/brand/lx/procfs/lx_proc.h
@@ -219,6 +219,7 @@ typedef enum lxpr_nodetype {
LXPR_SYS_NET_COREDIR, /* /proc/sys/net/core */
LXPR_SYS_NET_CORE_SOMAXCON, /* /proc/sys/net/core/somaxconn */
LXPR_SYS_VMDIR, /* /proc/sys/vm */
+ LXPR_SYS_VM_MAX_MAP_CNT, /* /proc/sys/vm/max_map_count */
LXPR_SYS_VM_MINFR_KB, /* /proc/sys/vm/min_free_kbytes */
LXPR_SYS_VM_NHUGEP, /* /proc/sys/vm/nr_hugepages */
LXPR_SYS_VM_OVERCOMMIT_MEM, /* /proc/sys/vm/overcommit_memory */
diff --git a/usr/src/uts/common/brand/lx/procfs/lx_prvnops.c b/usr/src/uts/common/brand/lx/procfs/lx_prvnops.c
index 2040aadade..13f1b73ba2 100644
--- a/usr/src/uts/common/brand/lx/procfs/lx_prvnops.c
+++ b/usr/src/uts/common/brand/lx/procfs/lx_prvnops.c
@@ -227,6 +227,7 @@ static void lxpr_read_sys_kernel_shmmax(lxpr_node_t *, lxpr_uiobuf_t *);
static void lxpr_read_sys_kernel_shmmni(lxpr_node_t *, lxpr_uiobuf_t *);
static void lxpr_read_sys_kernel_threads_max(lxpr_node_t *, lxpr_uiobuf_t *);
static void lxpr_read_sys_net_core_somaxc(lxpr_node_t *, lxpr_uiobuf_t *);
+static void lxpr_read_sys_vm_max_map_cnt(lxpr_node_t *, lxpr_uiobuf_t *);
static void lxpr_read_sys_vm_minfr_kb(lxpr_node_t *, lxpr_uiobuf_t *);
static void lxpr_read_sys_vm_nhpages(lxpr_node_t *, lxpr_uiobuf_t *);
static void lxpr_read_sys_vm_overcommit_mem(lxpr_node_t *, lxpr_uiobuf_t *);
@@ -519,6 +520,7 @@ static lxpr_dirent_t sys_net_coredir[] = {
* contents of /proc/sys/vm directory
*/
static lxpr_dirent_t sys_vmdir[] = {
+ { LXPR_SYS_VM_MAX_MAP_CNT, "max_map_count" },
{ LXPR_SYS_VM_MINFR_KB, "min_free_kbytes" },
{ LXPR_SYS_VM_NHUGEP, "nr_hugepages" },
{ LXPR_SYS_VM_OVERCOMMIT_MEM, "overcommit_memory" },
@@ -732,6 +734,7 @@ static void (*lxpr_read_function[LXPR_NFILES])() = {
lxpr_read_invalid, /* /proc/sys/net/core */
lxpr_read_sys_net_core_somaxc, /* /proc/sys/net/core/somaxconn */
lxpr_read_invalid, /* /proc/sys/vm */
+ lxpr_read_sys_vm_max_map_cnt, /* /proc/sys/vm/max_map_count */
lxpr_read_sys_vm_minfr_kb, /* /proc/sys/vm/min_free_kbytes */
lxpr_read_sys_vm_nhpages, /* /proc/sys/vm/nr_hugepages */
lxpr_read_sys_vm_overcommit_mem, /* /proc/sys/vm/overcommit_memory */
@@ -856,6 +859,7 @@ static vnode_t *(*lxpr_lookup_function[LXPR_NFILES])() = {
lxpr_lookup_sys_net_coredir, /* /proc/sys/net/core */
lxpr_lookup_not_a_dir, /* /proc/sys/net/core/somaxconn */
lxpr_lookup_sys_vmdir, /* /proc/sys/vm */
+ lxpr_lookup_not_a_dir, /* /proc/sys/vm/max_map_count */
lxpr_lookup_not_a_dir, /* /proc/sys/vm/min_free_kbytes */
lxpr_lookup_not_a_dir, /* /proc/sys/vm/nr_hugepages */
lxpr_lookup_not_a_dir, /* /proc/sys/vm/overcommit_memory */
@@ -980,6 +984,7 @@ static int (*lxpr_readdir_function[LXPR_NFILES])() = {
lxpr_readdir_sys_net_coredir, /* /proc/sys/net/core */
lxpr_readdir_not_a_dir, /* /proc/sys/net/core/somaxconn */
lxpr_readdir_sys_vmdir, /* /proc/sys/vm */
+ lxpr_readdir_not_a_dir, /* /proc/sys/vm/max_map_count */
lxpr_readdir_not_a_dir, /* /proc/sys/vm/min_free_kbytes */
lxpr_readdir_not_a_dir, /* /proc/sys/vm/nr_hugepages */
lxpr_readdir_not_a_dir, /* /proc/sys/vm/overcommit_memory */
@@ -4418,6 +4423,14 @@ lxpr_read_sys_net_core_somaxc(lxpr_node_t *lxpnp, lxpr_uiobuf_t *uiobuf)
}
static void
+lxpr_read_sys_vm_max_map_cnt(lxpr_node_t *lxpnp, lxpr_uiobuf_t *uiobuf)
+{
+ ASSERT(lxpnp->lxpr_type == LXPR_SYS_VM_MAX_MAP_CNT);
+ /* We don't limit mappings, just say we have a large limit. */
+ lxpr_uiobuf_printf(uiobuf, "%d\n", 16777215);
+}
+
+static void
lxpr_read_sys_vm_minfr_kb(lxpr_node_t *lxpnp, lxpr_uiobuf_t *uiobuf)
{
ASSERT(lxpnp->lxpr_type == LXPR_SYS_VM_MINFR_KB);