Received: by 10.223.185.116 with SMTP id b49csp2632465wrg; Mon, 5 Mar 2018 06:19:39 -0800 (PST) X-Google-Smtp-Source: AG47ELsghn3G2g4q+0xMftnuB0FOOsPrIe2AF3glHxHMV9CEAmEVY1d7sHU0hkbL08G0b85zhLrI X-Received: by 2002:a17:902:a584:: with SMTP id az4-v6mr13718891plb.20.1520259578856; Mon, 05 Mar 2018 06:19:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520259578; cv=none; d=google.com; s=arc-20160816; b=zb2nhpjOFJH9kcStGqxm7O5LAF1Td/Y2bu/u7ew0Bde0hJ2zBCcIDRjtTZw2crb6Z6 Rn+q1wPyA5olCqCgxS3ygm1MSMmrq/MMNHMKE9uvSSs81TjClOlNpurD1wR3xpyRD1tj h/2WN5VN6YcvbtxRiki2k3sZgWUVWK5BTk5suh9mYOfcjgu8ZjhsyWVfZzR1xZ4V+Qo7 fsjCFI4IXmQvq2cNacXwEY0cXgHq8RI4TZ8IUZ3NVFpj7GgNdHiOE4Q2su6mHLmqWSXF LSG+JndnpwbzMOzUf6RZ3BOnVCbbp3Kalh3xHGb3FVwsV5Hi3dq2Ru5p+dtwQgkYaaMp 0Ysg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:message-id:date:subject:cc:to :from:dkim-signature:dkim-signature:arc-authentication-results; bh=Jl83GXg8Iv/deEL4KBNTryMkHVJ18al3AkzZr+AnsGk=; b=v+hvOgUB4onLqYpUH/AZ8STAiN8qMdXHLov2C2D8IUakzMk/7eDUTaGCkMyPKadDvI kkxSB88t9SM5ODRAIQ0j7WL4Y0lA8VFdPr25Tifevq+h6CtqRK5tx+Mv6T0saLkCWGdE qCqQ+M38Bwc9yVkhWH+DUQczhH8WywoHbqN7Kzq4cdHf752XYTGhXMPIk1wqpajnVQg4 eYp1Yj7FsFF/UDC+edBysjXJe8dFOCvLW1w0HGbOTbpzzKtVsQRLIx6bsPU6sUx0mD63 UJuSAzwTinU3VfX593NGRe2xPP9G6oaR7FPVQNpAU51SMiFMvnY69oj5zi+mEYbWCMPf 1atw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=N7EePQW0; dkim=pass header.i=@fb.onmicrosoft.com header.s=selector1-fb-com header.b=BAWRAUMT; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fb.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f5si8335238pgq.806.2018.03.05.06.19.24; Mon, 05 Mar 2018 06:19:38 -0800 (PST) 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=@fb.com header.s=facebook header.b=N7EePQW0; dkim=pass header.i=@fb.onmicrosoft.com header.s=selector1-fb-com header.b=BAWRAUMT; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fb.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934017AbeCENiX (ORCPT + 99 others); Mon, 5 Mar 2018 08:38:23 -0500 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:39902 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932954AbeCENiV (ORCPT ); Mon, 5 Mar 2018 08:38:21 -0500 Received: from pps.filterd (m0089730.ppops.net [127.0.0.1]) by m0089730.ppops.net (8.16.0.22/8.16.0.22) with SMTP id w25DXrH5015645; Mon, 5 Mar 2018 05:38:12 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=facebook; bh=Jl83GXg8Iv/deEL4KBNTryMkHVJ18al3AkzZr+AnsGk=; b=N7EePQW0wlgTvUIP3Qt3l2658FfP56ynog6ERBfY0KK/n2TP+wd7TQYmer/5wcGQIbaE QGGT7W1TgkAueGmfZ9uHKp98PFf41Ah26My3tuHVC3aU3GzAKvGUD3QvX51AETIQEi9k r77xN9qGmLERUqLHFAuOsQ6/XnskS4Tm7GQ= Received: from maileast.thefacebook.com ([199.201.65.23]) by m0089730.ppops.net with ESMTP id 2gh1f58m45-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 05 Mar 2018 05:38:12 -0800 Received: from NAM03-BY2-obe.outbound.protection.outlook.com (192.168.183.28) by o365-in.thefacebook.com (192.168.177.21) with Microsoft SMTP Server (TLS) id 14.3.361.1; Mon, 5 Mar 2018 08:38:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.onmicrosoft.com; s=selector1-fb-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=Jl83GXg8Iv/deEL4KBNTryMkHVJ18al3AkzZr+AnsGk=; b=BAWRAUMTADy/tlfYfH10qZSs1B4dQpD9pwjvuMA8IR44dr3qt0/lJRPiY+7avfoR43Fsnu0GVFZ1ttkR0ncIlNR/LIhjF/SWEmGUYF6U4sZhssxeI2U1qr6Q1yQA7I8iHR+KHHsZOKSos1TZyaIURluD/d0tYb8bjLXThGVel3Y= Received: from castle.thefacebook.com (2620:10d:c092:200::1:ec6d) by BL2PR15MB1076.namprd15.prod.outlook.com (2603:10b6:201:17::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.548.13; Mon, 5 Mar 2018 13:38:04 +0000 From: Roman Gushchin To: CC: Roman Gushchin , Andrew Morton , Alexander Viro , Michal Hocko , Johannes Weiner , , , Subject: [PATCH 0/3] indirectly reclaimable memory Date: Mon, 5 Mar 2018 13:37:39 +0000 Message-ID: <20180305133743.12746-1-guro@fb.com> X-Mailer: git-send-email 2.14.3 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [2620:10d:c092:200::1:ec6d] X-ClientProxiedBy: VI1PR02CA0076.eurprd02.prod.outlook.com (2603:10a6:802:14::47) To BL2PR15MB1076.namprd15.prod.outlook.com (2603:10b6:201:17::10) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 59964516-1e67-453c-d152-08d5829e5398 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060)(7193020);SRVR:BL2PR15MB1076; X-Microsoft-Exchange-Diagnostics: 1;BL2PR15MB1076;3:aTP5uBtfDvvbkd1N6OuTqZrEWZOSQFKQV1M1Vudv45ro4s+7drd0GLZtuxcohhnpqYFgBtE8s//P+XXWXgDwA0jgZXM3e8to8/BKShPVwHRBUfXldhrnazcn/s6XqT6sfPBjIVFWG3g1YRJ9FkidwtFJurglr871bxF7K8b25S+6r8wefgJA7okR/HC8VHRI2kGo4qs3B3q/8/2p6Sja2MVtIGgTUcP7DhXRFEEfi9kVv0KJYRXGQfJhrNf5KggX;25:aaCjFVQ/fujKJVAKTLODtGApdgSNOECr2CIBzWmbaB1fYwFpbV1pih7EJA/gOuRM/hqQXv5W14ifTfvmlxIo1Tq5Rk4RzPblo6KkcLfAmY3rez4cJwW1rwq1S9uXaM8BPHCyGZJBvzu0uDs1sMHNpMX36NqzCcdT1x3ApmEwNI0JGXUv7p9/g3s7ZdBZOpY8eqYQost6n/1EE6Hu0Y2zUtrSYKBRzPaln7UHSGWpID4BSAjoIPu+96klMzd83dIxCO9o9UXhqNb9zaJD4BiMeiTVgoDr2oe/Cm+L0iQu5Qw4Duu9bkaRwlzr/AsHE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R9bxgaq4xW58R4bWMjo6weRWhhNoUdHiQUU0J0Z7T/3r+OjRNo6P/OM1q3BdAJTsmFazyLbnnKgq+ZeUQfcfDTaXUFZ3L4xMHqVnvBm1mphS1ZZoxgVqmJp5o+eo2L45VuNN0/0bQI= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(9452136761055)(67672495146484); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040501)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231220)(11241501184)(944501244)(52105095)(10201501046)(3002001)(6041288)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(6072148)(201708071742011);SRVR:BL2PR15MB1076;BCL:0;PCL:0;RULEID:;SRVR:BL2PR15MB1076; X-Forefront-PRVS: 06022AA85F X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(396003)(39860400002)(39380400002)(366004)(346002)(376002)(189003)(199004)(8936002)(47776003)(50466002)(1076002)(50226002)(48376002)(7736002)(16526019)(186003)(4326008)(305945005)(8676002)(81156014)(81166006)(2906002)(59450400001)(6506007)(386003)(5660300001)(2351001)(478600001)(36756003)(106356001)(2361001)(6666003)(6916009)(6116002)(6486002)(16586007)(316002)(97736004)(54906003)(52396003)(52116002)(46003)(51416003)(53936002)(6512007)(6306002)(69596002)(105586002)(25786009)(966005)(68736007)(86362001)(53416004)(42262002);DIR:OUT;SFP:1102;SCL:1;SRVR:BL2PR15MB1076;H:castle.thefacebook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; Received-SPF: None (protection.outlook.com: fb.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BL2PR15MB1076;23:xj+YJjrGCj/yknixDJLQmy9Qon3PAfSYidGSCpiuv?= =?us-ascii?Q?Lce5P4XjqajjUN3lLEs/2mzaTZSnEBOOFtXIcNY4SnBpfWSHbMuckx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PxvHxLVztNDUxF7xplSmhyoisszEm7t9q4+RBbgIr9t73H2tKW/+igHlqfTrj11MSaYkaNzcUcDtOQV5LWH5Ehu/8NmU=;24:PM2aBSMIL5GC0dflANI+7TI6v83n/PBlOK5mKjQ+XG6xhFqQdE6XQpcy01+LmGz24oyZk6u0Dik7u5uqeRoCTdc+rowRhQsJLu6pyxqsULE=;7:RRVm6JhULo0OnMzE0ecxUSs4t7onlL9NRg1dghwNQagANiNVI8YIxXDl+Injlv7j1Lpe9tK61iyf0Z6Q6gD52phWoqkvZyHaOTi57qsUDm1KesTTALYswo7fsdG298Fy4XRlpXrsSrc6xBUZU422LOaL01NGG+NtTz07QO9ECuRxUeRazWPoH/Aj+RGeodfHPS17atPQpw5fKoFDYfbiRAJ3rE5B4AY6fUsYqr4J+fzovvsynA6/iSozrWvXUtzL SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BL2PR15MB1076;20:Z9xWhVbb9ustsK2/PGzPwoB3VW4u5PsVg+hHPQHGai9v4meQK8oZ4/Pa3LMCLM/o+/C29NPWNZfp5UZKHYk6Vwh4IPALUcbh0stfmn9ZlsGXEmJAx/6bFM6MX9JkUV7AEgmRsZ3SpCSYBIfcnGe+HEr/jhLAtqzRHNtLo0QhhJs= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2018 13:38:04.6760 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 59964516-1e67-453c-d152-08d5829e5398 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ae927fe-1255-47a7-a2af-5f3a069daaa2 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL2PR15MB1076 X-OriginatorOrg: fb.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-03-05_05:,, signatures=0 X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch set introduces the concept of indirectly reclaimable memory and applies it to fix the issue, when a big number of dentries with external names can significantly affect the MemAvailable value. v2: 1) removed comments specific to unreclaimable slabs 2) splitted into 3 patches v1: https://lkml.org/lkml/2018/3/1/961 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 Roman Gushchin (3): mm: introduce NR_INDIRECTLY_RECLAIMABLE_BYTES mm: treat indirectly reclaimable memory as available in MemAvailable dcache: account external names as indirectly reclaimable memory fs/dcache.c | 29 ++++++++++++++++++++++++----- include/linux/mmzone.h | 1 + mm/page_alloc.c | 7 +++++++ mm/vmstat.c | 1 + 4 files changed, 33 insertions(+), 5 deletions(-) -- 2.14.3