From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f69.google.com (mail-wm0-f69.google.com [74.125.82.69]) by kanga.kvack.org (Postfix) with ESMTP id 4EA486B0007 for ; Mon, 5 Mar 2018 08:48:02 -0500 (EST) Received: by mail-wm0-f69.google.com with SMTP id p14so3822776wmc.0 for ; Mon, 05 Mar 2018 05:48:02 -0800 (PST) Received: from mx0a-00082601.pphosted.com (mx0a-00082601.pphosted.com. [67.231.145.42]) by mx.google.com with ESMTPS id i2si9526026wrc.120.2018.03.05.05.48.00 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Mar 2018 05:48:01 -0800 (PST) Date: Mon, 5 Mar 2018 13:47:00 +0000 From: Roman Gushchin Subject: Re: [PATCH 2/3] mm: add indirectly reclaimable memory to MemAvailable Message-ID: <20180305134655.GA13118@castle.DHCP.thefacebook.com> References: <20180305133743.12746-1-guro@fb.com> <20180305133743.12746-3-guro@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20180305133743.12746-3-guro@fb.com> Sender: owner-linux-mm@kvack.org List-ID: To: linux-mm@kvack.org Cc: Andrew Morton , Alexander Viro , Michal Hocko , Johannes Weiner , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@fb.com 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 > Cc: Andrew Morton > Cc: Alexander Viro > Cc: Michal Hocko > Cc: Johannes Weiner > Cc: linux-fsdevel@vger.kernel.org > Cc: linux-kernel@vger.kernel.org > Cc: linux-mm@kvack.org > Cc: kernel-team@fb.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 > -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org