diff options
-rw-r--r-- | usr/src/uts/common/brand/lx/procfs/lx_prvnops.c | 36 | ||||
-rw-r--r-- | usr/src/uts/common/fs/lxproc/lxpr_vnops.c | 30 |
2 files changed, 38 insertions, 28 deletions
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 90e8fbe4d5..ba32aaf04e 100644 --- a/usr/src/uts/common/brand/lx/procfs/lx_prvnops.c +++ b/usr/src/uts/common/brand/lx/procfs/lx_prvnops.c @@ -3989,24 +3989,32 @@ lxpr_read_meminfo(lxpr_node_t *lxpnp, lxpr_uiobuf_t *uiobuf) * wing it and kill a random process if they run out of backing store * for virtual memory. Our swap reservation doesn't translate to that * model, so just inform the caller that no swap is being used. + * + * MemAvailable + * MemAvailable entry is available since Linux Kernel +3.14, is an + * estimate of how much memory is available for starting new applications, + * without swapping. In lxbrand we will always return the available free + * memory as an estimate of this value. */ lxpr_uiobuf_printf(uiobuf, - "MemTotal: %8lu kB\n" - "MemFree: %8lu kB\n" - "MemShared: %8u kB\n" - "Buffers: %8u kB\n" - "Cached: %8u kB\n" - "SwapCached:%8u kB\n" - "Active: %8u kB\n" - "Inactive: %8u kB\n" - "HighTotal: %8u kB\n" - "HighFree: %8u kB\n" - "LowTotal: %8u kB\n" - "LowFree: %8u kB\n" - "SwapTotal: %8lu kB\n" - "SwapFree: %8lu kB\n", + "MemTotal: %8lu kB\n" + "MemFree: %8lu kB\n" + "MemAvailable: %8lu kB\n" + "MemShared: %8u kB\n" + "Buffers: %8u kB\n" + "Cached: %8u kB\n" + "SwapCached: %8u kB\n" + "Active: %8u kB\n" + "Inactive: %8u kB\n" + "HighTotal: %8u kB\n" + "HighFree: %8u kB\n" + "LowTotal: %8u kB\n" + "LowFree: %8u kB\n" + "SwapTotal: %8lu kB\n" + "SwapFree: %8lu kB\n", btok(total_mem), /* MemTotal */ btok(free_mem), /* MemFree */ + btok(free_mem), /* MemAvailable */ 0, /* MemShared */ 0, /* Buffers */ 0, /* Cached */ diff --git a/usr/src/uts/common/fs/lxproc/lxpr_vnops.c b/usr/src/uts/common/fs/lxproc/lxpr_vnops.c index 9bcc0f7e8b..60b3d52f09 100644 --- a/usr/src/uts/common/fs/lxproc/lxpr_vnops.c +++ b/usr/src/uts/common/fs/lxproc/lxpr_vnops.c @@ -1472,24 +1472,26 @@ lxpr_read_meminfo(lxpr_node_t *lxpnp, lxpr_uiobuf_t *uiobuf) " total: used: free: shared: buffers: cached:\n" "Mem: %8lu %8lu %8lu %8u %8u %8u\n" "Swap: %8lu %8lu %8lu\n" - "MemTotal: %8lu kB\n" - "MemFree: %8lu kB\n" - "MemShared: %8u kB\n" - "Buffers: %8u kB\n" - "Cached: %8u kB\n" - "SwapCached:%8u kB\n" - "Active: %8u kB\n" - "Inactive: %8u kB\n" - "HighTotal: %8u kB\n" - "HighFree: %8u kB\n" - "LowTotal: %8u kB\n" - "LowFree: %8u kB\n" - "SwapTotal: %8lu kB\n" - "SwapFree: %8lu kB\n", + "MemTotal: %8lu kB\n" + "MemFree: %8lu kB\n" + "MemAvailable: %8lu kB\n" + "MemShared: %8u kB\n" + "Buffers: %8u kB\n" + "Cached: %8u kB\n" + "SwapCached: %8u kB\n" + "Active: %8u kB\n" + "Inactive: %8u kB\n" + "HighTotal: %8u kB\n" + "HighFree: %8u kB\n" + "LowTotal: %8u kB\n" + "LowFree: %8u kB\n" + "SwapTotal: %8lu kB\n" + "SwapFree: %8lu kB\n", total_mem, total_mem - free_mem, free_mem, 0, 0, 0, total_swap, used_swap, total_swap - used_swap, btok(total_mem), /* MemTotal */ btok(free_mem), /* MemFree */ + btok(free_mem), /* MemAvailable */ 0, /* MemShared */ 0, /* Buffers */ 0, /* Cached */ |