Received: by 10.192.165.156 with SMTP id m28csp767088imm; Wed, 11 Apr 2018 07:00:47 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+o24BNfhszCBi0Pzw6F+zwkTuHchJ0pR5yBzmm9mfQGVmDoJaSBFTBX87eOToxnjLhvU4+ X-Received: by 10.99.61.202 with SMTP id k193mr3529419pga.435.1523455247356; Wed, 11 Apr 2018 07:00:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523455247; cv=none; d=google.com; s=arc-20160816; b=pvi2FYk2yohtUgmiJxEAYn1q/G9M3LVT89AvK/QjotETpVTHyGhLwPDeWMmyE5TXDI 8Za9R4W/U6ANpfwrB7fYs/q2FZSE6aGkI4BQ3UuXTpz4Fv6OjG8/7+AIICKohDNjNqr5 nfrE0xPcG2WxmqdmW4xgYhcFSJ4iWUD4Y6gdqQ3gmcNzXvAjY8M08/oiHpp6XY+L/VIp deLvMiGzKj+mQhxbcVIwuktxXBmAwIH7Wmp6G4bfrEW2USLU7KHSuUOmf7NmYiChB2kN 31Tk6OGpmy00OWbkeEi+xqVNuFhd55SFrddA2kR1bFH730tKPWye2PXPdQs2QtXl5cy3 ZRDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature:dkim-signature:arc-authentication-results; bh=GyozvLjaKJtFsa4MIE1+sGkYb/bfrDDd5uyKyA+gPN4=; b=qdrBuBXE9qt3gWn+vV+edfgAdOTP+ZAW+mfhoXuo+d09tIJu2jQr5Cv47+AZyz/zot j6VJmkig56F0pXPtJT8DtWIwM9nMZND43NEZro/WxSXKO6rP1Cgn4dJctEbF69U5K8GK zh8dqHkHW7H6YbNCSAiS0NM7fC0ykE8fNToLm0pd1K12ZeyUVz+UP8kTekV79EWxJ8z7 PsjUPbLMkyZqIaWMQWV+GtYvp9zfG8KU5MS/XTA3YBpUhnMDK/7Wl6NsKM95kOo36V/m RZ5i2pYv6RenwBRFPnK42f+QmpZ+9QapLFRfI7B5rAYRVdg8e9bhdtUE8WkLIjU7+hzF 7Fbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=Z9j+Gg5B; dkim=fail header.i=@fb.onmicrosoft.com header.s=selector1-fb-com header.b=cMy6sHYh; 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 b8-v6si1189846pla.272.2018.04.11.07.00.09; Wed, 11 Apr 2018 07:00:47 -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=@fb.com header.s=facebook header.b=Z9j+Gg5B; dkim=fail header.i=@fb.onmicrosoft.com header.s=selector1-fb-com header.b=cMy6sHYh; 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 S1753193AbeDKN5K (ORCPT + 99 others); Wed, 11 Apr 2018 09:57:10 -0400 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:37808 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752664AbeDKN5H (ORCPT ); Wed, 11 Apr 2018 09:57:07 -0400 Received: from pps.filterd (m0044008.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w3BDsfJJ010192; Wed, 11 Apr 2018 06:56:54 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=facebook; bh=GyozvLjaKJtFsa4MIE1+sGkYb/bfrDDd5uyKyA+gPN4=; b=Z9j+Gg5BMXqOeCkCcJhKNEhl3YNeNyIiwSdiFsQf4Kp+s4AYbm0UHXfkRUAlhAgRaAz3 n3pKoZsHpTZhdgKZw7CFrdDAYosTHi+Mbgf9ezC179/vasI4toIGyWL7aEWI04VkHTuk Ae7LUGAXW4a7y6KcPvkh0qEzXSyf0Z+k20Q= Received: from maileast.thefacebook.com ([199.201.65.23]) by mx0a-00082601.pphosted.com with ESMTP id 2h9gsm8fd8-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 11 Apr 2018 06:56:54 -0700 Received: from NAM02-BL2-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; Wed, 11 Apr 2018 09:56:51 -0400 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=GyozvLjaKJtFsa4MIE1+sGkYb/bfrDDd5uyKyA+gPN4=; b=cMy6sHYhdcDGdHnqBcoEofi27TBqJtu4AXoJ1BiVBDaOUMVG9ZEFG14wdrBVKujtBGTiLeAEyxHhIWrZaZVNSJl/8hIYLa1s8DTRrth5BWhEKJ4Rr4ny3ep20SF+ttztkvm+XCHnHVMKuRXI1xNd6bmf9vRY7rSrAGdcTvnBxSM= Received: from castle.DHCP.thefacebook.com (2620:10d:c092:200::1:afb) by DM3PR15MB1083.namprd15.prod.outlook.com (2603:10b6:0:12::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.653.12; Wed, 11 Apr 2018 13:56:45 +0000 Date: Wed, 11 Apr 2018 14:56:31 +0100 From: Roman Gushchin To: Vlastimil Babka CC: , Andrew Morton , Alexander Viro , Michal Hocko , Johannes Weiner , , , , Linux API Subject: Re: [PATCH 1/3] mm: introduce NR_INDIRECTLY_RECLAIMABLE_BYTES Message-ID: <20180411135624.GA24260@castle.DHCP.thefacebook.com> References: <20180305133743.12746-1-guro@fb.com> <20180305133743.12746-2-guro@fb.com> <08524819-14ef-81d0-fa90-d7af13c6b9d5@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <08524819-14ef-81d0-fa90-d7af13c6b9d5@suse.cz> User-Agent: Mutt/1.9.2 (2017-12-15) X-Originating-IP: [2620:10d:c092:200::1:afb] X-ClientProxiedBy: HE1PR05CA0348.eurprd05.prod.outlook.com (2603:10a6:7:92::43) To DM3PR15MB1083.namprd15.prod.outlook.com (2603:10b6:0:12::9) X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020);SRVR:DM3PR15MB1083; X-Microsoft-Exchange-Diagnostics: 1;DM3PR15MB1083;3:HLTcSAXCgR1Py2GXQhlgpxbkm0mV3Hz3UJHTLUk69jNJH2dmFXw76c+Rd3GmRRH1Ui/Wu3+1lC548BmvhPwbGF98NSui14sSMO8AjqqW1jDstiB1zaJSXrnUreuAcgAApcyPF0UMTRF+YxPoXVIlVEL4P8GZPLb6C+SKHCI8fvuJRWwzdq7ipPT3ZEOv/+VwBfLIW9V7hfEJUjaJmQ1ca7dbSTSG+2OCAGIqyvVWADndzH/pWnJ8uoJtjEZ0FF0t;25:MXCS8UdjKEeukPkaHeBNliXCD27jRtm7VU8FeoHany27bT1dOO27fHJeU2GOXqb1XHgLyqqYWzBRX+UwDUGqvXwvL117iM/AoQJTdpfRrNxRzI2q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4Z5mSBFAfo28yRsW6Tw+uqyVnywquMjMjG+vBAa3i2pyAZKagIC2IoggyeEibYRFhlgfDhDEcapxhWVpyYYboE8XEl21vftMdvEmJh35gyDVC45iaz4lcxZ1dlv5Fpc78ls16XyRmG6j7/FQ1sYqA1g2DuUwbmEFxQuDQQXjnqP4jq17buzWzpBh3CeY0z36XyS91VVEbH/9o4MvgcbJ5dIP7UTV69SzzvC8Z6ldMWDvkkYl6n6J8ojCHQhiKBubfxhgvMXlaMKS8Ypwox7bSx6Yj6CrSBrDJDckBO8o+khrYJprQqnYP5dl9PR5xHPMf1W0mpZ4t+MeukSkgaTS+U= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(9452136761055)(67672495146484); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3002001)(10201501046)(3231221)(11241501184)(944501327)(52105095)(93006095)(93001095)(6041310)(20161123562045)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(6072148)(201708071742011);SRVR:DM3PR15MB1083;BCL:0;PCL:0;RULEID:;SRVR:DM3PR15MB1083; X-Forefront-PRVS: 0639027A9E X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(979002)(376002)(39850400004)(396003)(366004)(39380400002)(346002)(189003)(51444003)(199004)(52396003)(81166006)(106356001)(446003)(486006)(33656002)(50466002)(8936002)(4326008)(53936002)(6246003)(1076002)(23726003)(6916009)(2906002)(105586002)(16526019)(229853002)(305945005)(25786009)(97736004)(81156014)(7736002)(186003)(6116002)(5660300001)(68736007)(86362001)(58126008)(54906003)(16586007)(55016002)(9686003)(6666003)(316002)(47776003)(11346002)(46003)(52116002)(59450400001)(478600001)(476003)(76176011)(6506007)(7696005)(386003)(53546011)(8676002)(18370500001)(42262002)(969003)(989001)(999001)(1009001)(1019001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM3PR15MB1083;H:castle.DHCP.thefacebook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; Received-SPF: None (protection.outlook.com: fb.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;DM3PR15MB1083;23:eN9xE6scjtHJw2iCA87TqxFmvLdZspWhrxcKdd6Kv?= =?us-ascii?Q?igVmbPIfJHN/x8uxh3ckj5QlcT4LkAc9DE5oiGTGY6FE+9ZJtGYSA5CINtZr?= =?us-ascii?Q?aK4eSMzIj19h1SvVp2mIsrwgCv208BQrpxhEcyHbxhdXgJTYDlNQDBzab4ks?= =?us-ascii?Q?hq2Y4XjlIfELQfsh90xInMwkEqpQzfodHpukDlhj6weUpbAhFX553iIiiCK1?= =?us-ascii?Q?xWtmNpVrCLeCr/iMD4aEvchIwqDqLTdEG96+EX4D/3NFnbL7uuke/aUnUc6K?= =?us-ascii?Q?Nsmcv7R1xJGKdEjQAIXqQyrHI4HYcTLyoeGo7FLpeddR2Ea84KrGAXZImXU7?= =?us-ascii?Q?zGkbLNeKX1uDf8ICXlk2dC5VM5hgghYghMKJUrBgldKpi4mE4XH85xeE1ONX?= =?us-ascii?Q?xMM2LTGPi4jOW47L7iz7QP5ERotYfP1kjFCIPaMBhlDp9uycTVXzArzPu8QS?= =?us-ascii?Q?IcMijNlzaPMRfeVZoRkmoXrZ4wVxf64BERcBPWFsYkw+Y77kwABe3yT6R3H1?= =?us-ascii?Q?8kICbl6DRqSqhAjdpneo0NQrgsOfYXTfX7z2eFvLbaUbnhwdUq7dhNwhUqFD?= =?us-ascii?Q?rTa+hzADS0mlIpl7cIWXqo1SG+WBWggvcaus/lmQwchOoIfWjut2zdqj5IGK?= =?us-ascii?Q?4OaZ2sOpaLKuBPcvpQrIC8YZBAreY5QKXorJ553j7gLi5omcHmmofg9HUSWb?= =?us-ascii?Q?k3yvPzvrU/ktC7XUu9DXVwBqpnNnpeiANgWP7r50bnJqs//Ojt+03jFn7wKx?= =?us-ascii?Q?jLniyp1aclTVl20VDS+IeIPUUV+4Nkv1YDi3wIer2uNlLyA2UKtR2kxXNev7?= =?us-ascii?Q?Ukmgi50//vhHr/IZ3yAUkab1EzDbbEmMKs5VklVLoPohMpdH9S/vISurIwrc?= =?us-ascii?Q?uyidXMLQBzp/aFqhs1fDeuq8BgyxYZvh+FHeOAY6Jxjgy53dbYLZoe7y+2/5?= =?us-ascii?Q?7umLAfkdHjD5wfW/1MH6znTp9xWcTxL3jxdWhxrI6rIOMUwTUdE1Z0JRSd1N?= =?us-ascii?Q?vBP57+MGRJsGs2BnzF9J05dW5kEG6SCB/VFHMXgBFbqMCxTU81mPG0Jlc4h2?= =?us-ascii?Q?t4oWJrMFw+b9pJoGeNqFueo5V8c+/OPzcAUISjSF5vnYGqveqaD6q7anx+GI?= =?us-ascii?Q?o6bEN3DVZQVAZZkBEmz6eTYnW4RxqgUPvtPiRg6IO+GT9xfpf2J/ti3pA6rw?= =?us-ascii?Q?GJiGveq7+0E0LazaOprGpr+JvCyDVwGIrIvsi1mfHalol2oAnlSYKAyoVHfZ?= =?us-ascii?Q?Zyt3TBzEWVh4uHxF2ygAowGlVcDkSryfP7NbtQDBRm29Fow5M76rP46zIJ01?= =?us-ascii?Q?uZGTRdlQcoKLnLPMtQYRgXJOQMFX26eZPAruFdAUW5tCekzTptY23NUG3okG?= =?us-ascii?Q?FOHmMikwcNDIq5h+gUKyJbt5eU1TtXmvuvubcSTHwhRLAx3MOC8LJFaqcBsS?= =?us-ascii?Q?vfadPAClA=3D=3D?= X-Microsoft-Antispam-Message-Info: zCqC6QekyTKtWsKvorxdZvciJ18Q7bzXjTdrvJaftdEaMcBl5FchfA4q8TFQACXmD9kq6q9JoxEruWaUrDwJw5NXj8QLQgANWe2pQurmali1URC/0y1U0bgKVKTpL86yFtT0GVQlsyArsRKwt5A8vTtmpilFGnryzEnczc++bQ484Pk+iaJ6lZcu/p79jYS9 X-Microsoft-Exchange-Diagnostics: 1;DM3PR15MB1083;6:edaQq47hK3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:ozv9Q0V07gQZBPQ5/5gF3zJsHByKEjspHRUjOfZZKm3dz/Hrf9AVL9V/ysz0LD92tKGZkCvSoB2IjQCsXPuNPlLZUCzJjmDVIuGXCk5DTxYONKc+wevA68Ne3qBZ3b3BPkPHB5sMCQwYV7Opron9uyUZGPNaa6cnZda9izXERzc= X-MS-Office365-Filtering-Correlation-Id: 57dc62e9-39ae-4e3a-3e6e-08d59fb4119e X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Apr 2018 13:56:45.7554 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 57dc62e9-39ae-4e3a-3e6e-08d59fb4119e X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ae927fe-1255-47a7-a2af-5f3a069daaa2 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM3PR15MB1083 X-OriginatorOrg: fb.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-04-11_06:,, 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 On Wed, Apr 11, 2018 at 03:16:08PM +0200, Vlastimil Babka wrote: > [+CC linux-api] > > On 03/05/2018 02:37 PM, Roman Gushchin wrote: > > This patch introduces 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. > > > > 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 > > Hmm, looks like I'm late and this user-visible API change was just > merged. But it's for rc1, so we can still change it, hopefully? > > One problem I see with the counter is that it's in bytes, but among > counters that use pages, and the name doesn't indicate it. Here I just followed "nr_kernel_stack" path, which is measured in kB, but this is not mentioned in the field name. > Then, I don't > see why users should care about the "indirectly" part, as that's just an > implementation detail. It is reclaimable and that's what matters, right? > (I also wanted to complain about lack of Documentation/... update, but > looks like there's no general file about vmstat, ugh) I agree, that it's a bit weird, and it's probably better to not expose it at all; but this is how all vm counters work. We do expose them all in /proc/vmstat. A good number of them is useless until you are not a mm developer, so it's arguable more "debug info" rather than "api". It's definitely not a reason to make them messy. Does "nr_indirectly_reclaimable_bytes" look better to you? > > I also kind of liked the idea from v1 rfc posting that there would be a > separate set of reclaimable kmalloc-X caches for these kind of > allocations. Besides accounting, it should also help reduce memory > fragmentation. The right variant of cache would be detected via > __GFP_RECLAIMABLE. Well, the downside is that we have to introduce X new caches just for this particular problem. I'm not strictly against the idea, but not convinced that it's much better. > > With that in mind, can we at least for now put the (manually maintained) > byte counter in a variable that's not directly exposed via /proc/vmstat, > and then when printing nr_slab_reclaimable, simply add the value > (divided by PAGE_SIZE), and when printing nr_slab_unreclaimable, > subtract the same value. This way we would be simply making the existing > counters more precise, in line with their semantics. Idk, I don't like the idea of adding a counter outside of the vm counters infrastructure, and I definitely wouldn't touch the exposed nr_slab_reclaimable and nr_slab_unreclaimable fields. We do have some stats in /proc/slabinfo, /proc/meminfo and /sys/kernel/slab and I think that we should keep it consistent. Thanks! > > Thoughts? > Vlastimil > > > --- > > include/linux/mmzone.h | 1 + > > mm/vmstat.c | 1 + > > 2 files changed, 2 insertions(+) > > > > diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h > > index e09fe563d5dc..15e783f29e21 100644 > > --- 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 > > }; > > > > diff --git a/mm/vmstat.c b/mm/vmstat.c > > index 40b2db6db6b1..b6b5684f31fe 100644 > > --- a/mm/vmstat.c > > +++ b/mm/vmstat.c > > @@ -1161,6 +1161,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", > > >