lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180305134655.GA13118@castle.DHCP.thefacebook.com>
Date:   Mon, 5 Mar 2018 13:47:00 +0000
From:   Roman Gushchin <guro@...com>
To:     <linux-mm@...ck.org>
CC:     Andrew Morton <akpm@...ux-foundation.org>,
        Alexander Viro <viro@...iv.linux.org.uk>,
        Michal Hocko <mhocko@...e.com>,
        Johannes Weiner <hannes@...xchg.org>,
        <linux-fsdevel@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <kernel-team@...com>
Subject: Re: [PATCH 2/3] mm: add indirectly reclaimable memory to MemAvailable

Please, ignore this particular patch, it was sent by mistake.

On Mon, Mar 05, 2018 at 01:37:41PM +0000, Roman Gushchin wrote:
> This patch adjusts /proc/meminfo MemAvailable calculation
> by adding the amount of indirectly reclaimable memory
> (rounded to the PAGE_SIZE).
> 
> Signed-off-by: Roman Gushchin <guro@...com>
> Cc: Andrew Morton <akpm@...ux-foundation.org>
> Cc: Alexander Viro <viro@...iv.linux.org.uk>
> Cc: Michal Hocko <mhocko@...e.com>
> Cc: Johannes Weiner <hannes@...xchg.org>
> Cc: linux-fsdevel@...r.kernel.org
> Cc: linux-kernel@...r.kernel.org
> Cc: linux-mm@...ck.org
> Cc: kernel-team@...com
> ---
>  mm/page_alloc.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index 2836bc9e0999..2247cda9e94e 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -4695,6 +4695,13 @@ long si_mem_available(void)
>  		     min(global_node_page_state(NR_SLAB_RECLAIMABLE) / 2,
>  			 wmark_low);
>  
> +	/*
> +	 * Part of the kernel memory, which can be released under memory
> +	 * pressure.
> +	 */
> +	available += global_node_page_state(NR_INDIRECTLY_RECLAIMABLE_BYTES) >>
> +		PAGE_SHIFT;
> +
>  	if (available < 0)
>  		available = 0;
>  	return available;
> -- 
> 2.14.3
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ