Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp5449258imm; Tue, 16 Oct 2018 10:23:04 -0700 (PDT) X-Google-Smtp-Source: ACcGV63g/XG9bnIslYicjsbXekcTicY8jO6RYNMu+FpYaJtgYWx9ZFp8dpO1aKGO+qOOJaV8nR79 X-Received: by 2002:a62:ff09:: with SMTP id b9-v6mr22832087pfn.46.1539710584296; Tue, 16 Oct 2018 10:23:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539710584; cv=none; d=google.com; s=arc-20160816; b=rD50Uj6w/3PbjMOTeyoS4a0CP0FQ79UG0KJy4mcbrQy0/N3alFAsUhIMVSWlko3XXL mjbXS47PHW/iV1KSIpzuoXD9v8SfWgkh3ZMeru3CkEwTVYgBO2NR6MP2jsKMDVKy1CjF LXXMwnXwZCiSTP08dsQHktXJkkAo+KrJdQ30+ufhuJIiRM2CPppOYHjbaEGegJNmvyxS 42Lmf7bNy13d+VgVnHmHAmGLjuBFpcLblI2Rz8mWFLyZrcGv76nT05qDpFQCJFDmunj2 VtdQuPoXGAaWmACqtvEPfapKxkyCCeYpvkKqQi4joiZatcGdlX7ortPxEYBVhMYshWSd YTcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=k5NIMskMod9QTStRFYmKa9LOO9E883ZrnoU3bNsLv/s=; b=mrPOumxguR1wnOHnGm1Ne3RuRADdY9/6AfYMp0D2nESZ1vBQqBZEJfBrB70+t4E0hO ywVP9mLe8pFdJhxLRUOqi5XBRnPV6qH3qQ7SEa5q7HIxBH6lEYIkUw5El8bBmp5FJ4yO Gf2CKNn5y7Qgs8oZl9O73NwowEN3CLc++2bBnFl/2qntJnpFO9dj1G94NuQ8pksqMiuJ LefJLOlM4i8trZkh2dxfOVwCVG59PSBLM06oKdt3IUykQ1wSnPiJb2PpW+00eQLoEUdL Nlyb9kzIWw9FkjU33X/Jq247Kn9Q5c/V1BIAaE78bSeZX95cXoP1fs/05k2paoCdRtky 3Ttg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="f/KsxI3W"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z11-v6si12627238plk.90.2018.10.16.10.22.48; Tue, 16 Oct 2018 10:23:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="f/KsxI3W"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731040AbeJQBNb (ORCPT + 99 others); Tue, 16 Oct 2018 21:13:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:59426 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727433AbeJQBNb (ORCPT ); Tue, 16 Oct 2018 21:13:31 -0400 Received: from localhost (ip-213-127-77-176.ip.prioritytelecom.net [213.127.77.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 737AB20866; Tue, 16 Oct 2018 17:22:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1539710526; bh=P13NySxIXzQ+Ok5Nf5C5MNtOeuvCyF7s3woxQ98MQfI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=f/KsxI3WXoUEx/gVwz5tU7m01OmASsUtokvZgkrxXNrMG2A3dy6jNe7mR96Tf0glm 4CkFsStUYghfiC8r7II4a3d68ezrUP5fltaYirNsaJsm7k2HQjUH7kH9/VP6Zsxywe Ex0PHqRymbGa72ouRkrci/Ed27pntd2XP47BIQR0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Roman Gushchin , Andrew Morton , Alexander Viro , Michal Hocko , Johannes Weiner , Mel Gorman , Linus Torvalds Subject: [PATCH 4.14 080/109] mm: introduce NR_INDIRECTLY_RECLAIMABLE_BYTES Date: Tue, 16 Oct 2018 19:05:48 +0200 Message-Id: <20181016170529.311166330@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181016170524.530541524@linuxfoundation.org> References: <20181016170524.530541524@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Roman Gushchin commit eb59254608bc1d42c4c6afdcdce9c0d3ce02b318 upstream. Patch series "indirectly reclaimable memory", v2. This patchset introduces the concept of indirectly reclaimable memory and applies it to fix the issue of when a big number of dentries with external names can significantly affect the MemAvailable value. This patch (of 3): Introduce a concept of indirectly reclaimable memory and adds the corresponding memory counter and /proc/vmstat item. Indirectly reclaimable memory is any sort of memory, used by the kernel (except of reclaimable slabs), which is actually reclaimable, i.e. will be released under memory pressure. The counter is in bytes, as it's not always possible to count such objects in pages. The name contains BYTES by analogy to NR_KERNEL_STACK_KB. Link: http://lkml.kernel.org/r/20180305133743.12746-2-guro@fb.com Signed-off-by: Roman Gushchin Reviewed-by: Andrew Morton Cc: Alexander Viro Cc: Michal Hocko Cc: Johannes Weiner Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- include/linux/mmzone.h | 1 + mm/vmstat.c | 1 + 2 files changed, 2 insertions(+) --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -180,6 +180,7 @@ enum node_stat_item { NR_VMSCAN_IMMEDIATE, /* Prioritise for reclaim when writeback ends */ NR_DIRTIED, /* page dirtyings since bootup */ NR_WRITTEN, /* page writings since bootup */ + NR_INDIRECTLY_RECLAIMABLE_BYTES, /* measured in bytes */ NR_VM_NODE_STAT_ITEMS }; --- a/mm/vmstat.c +++ b/mm/vmstat.c @@ -1090,6 +1090,7 @@ const char * const vmstat_text[] = { "nr_vmscan_immediate_reclaim", "nr_dirtied", "nr_written", + "nr_indirectly_reclaimable", /* enum writeback_stat_item counters */ "nr_dirty_threshold",