Received: by 10.192.165.156 with SMTP id m28csp1716200imm; Tue, 17 Apr 2018 04:26:01 -0700 (PDT) X-Google-Smtp-Source: AIpwx48/f4RLVPNouXdvnjjixaaPsUZuq6UyEfeFfzJmCBuKd/aITlPYShu+QmVDb8fRMCNsrJ+l X-Received: by 10.98.61.201 with SMTP id x70mr1589677pfj.85.1523964361320; Tue, 17 Apr 2018 04:26:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523964361; cv=none; d=google.com; s=arc-20160816; b=WHyXnP1JKkw4ngHSPOUdaiuUZ1io3WELX5K1q/pH8w7h7HRQE0iLSdvSRYPHhCemFY c+b7eCGpdcF4pdtcnbqVDedihjoFUg9YYdY0qBi+XgnPeqXvKFlvJIyYxNPydfOpf6Jp a3kapfbi3tjY1YYtw92720xHq/Cl8RkJBZHLBoCx6k1vqSqK329xE6BUqFF9k9GOqL7X PJ9xtk0k5JsvvWxYrYO+O7PTFlxDEl42jK35OmkBgYfiZbwFeGpooGgEhOkORxNphMVp Yg6uCSjIfdyXBzMHG+MFOfFrWDd3Hs0h82pTIVQQGZQtFzA0mq09VyFz2o9fL7bgCL88 BStQ== 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=AzubCy9RtOhr/WAdcLcKcG5RT5qIwCQ9Byf5Ry2l71E=; b=l3TFUIt7VKJuQU6eRtXMwH2E9M1uxcJ1XUPt0h/2ijvckKQlDK6sZYIQnmIail09Aa sdkYlBi47NkrZELv7Wk3a3/P7abXGXf3lmS4GIjV49t5obKSO2UZiUo3Fgza/9ReVMx6 XB1KJHkuoAt4IOnAWN2H60uppdTP1VyNNtszlfKS1euN8iGPEq3lp4DYNtAxz6b0oPNx af3r2XVXlgqFyRIPObzCNv3SHY0pWNA/gb2WGFyB7OP6F7Kig7bLpr0IagjHiV/qLDXb 9UHNFTuqJttSczBXrKyZRIXsq6U+XxGvqf8vb/aeiao11AJzljuPaYt227fkszQIUgJV yq3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=RPEGN50C; dkim=fail header.i=@fb.onmicrosoft.com header.s=selector1-fb-com header.b=Ry9MvPcn; 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 a98-v6si2770999pla.239.2018.04.17.04.25.47; Tue, 17 Apr 2018 04:26:01 -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=RPEGN50C; dkim=fail header.i=@fb.onmicrosoft.com header.s=selector1-fb-com header.b=Ry9MvPcn; 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 S1752725AbeDQLYq (ORCPT + 99 others); Tue, 17 Apr 2018 07:24:46 -0400 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:39916 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751270AbeDQLYn (ORCPT ); Tue, 17 Apr 2018 07:24:43 -0400 Received: from pps.filterd (m0044012.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w3HBK9FV029344; Tue, 17 Apr 2018 04:24:31 -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=AzubCy9RtOhr/WAdcLcKcG5RT5qIwCQ9Byf5Ry2l71E=; b=RPEGN50CZiCmX4JJKGSBD+MUbPb5DMd7vMUWuLZ2anpdjYzGO20BkpPX7hzqhCBgdqXO n3bh8WdoB9nb7d8+lp/fPzwBjBvt9JLFdhZu1cn+Mc8s+0hdSUWOnDBftq2izFS5VV3w eg/+GLR5Eo3SySWvMRQvb7P3eOAN35FhNFI= Received: from maileast.thefacebook.com ([199.201.65.23]) by mx0a-00082601.pphosted.com with ESMTP id 2hde04r95a-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 17 Apr 2018 04:24:31 -0700 Received: from NAM01-BN3-obe.outbound.protection.outlook.com (192.168.183.28) by o365-in.thefacebook.com (192.168.177.23) with Microsoft SMTP Server (TLS) id 14.3.361.1; Tue, 17 Apr 2018 07:24:29 -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=AzubCy9RtOhr/WAdcLcKcG5RT5qIwCQ9Byf5Ry2l71E=; b=Ry9MvPcn9StBAHE7KwL0RnWRXlZNCan2TsonLZZcTWyieBwsi7kUfjaV6t99k555yIF8FgSfWCuy55EDtPyV58CYx3Y40MblOHB0C+9Xvg92Spvroofy/ODZDVPH/yRHcrMELkpKrcXnhX+D/EXrJ2NwTjeBssNsPT6S0GeQl/U= Received: from castle.DHCP.thefacebook.com (2620:10d:c092:200::1:b7d9) by BL2PR15MB1075.namprd15.prod.outlook.com (2603:10b6:201:17::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.696.12; Tue, 17 Apr 2018 11:24:23 +0000 Date: Tue, 17 Apr 2018 12:24:13 +0100 From: Roman Gushchin To: Michal Hocko CC: Johannes Weiner , Vlastimil Babka , Minchan Kim , , Andrew Morton , Alexander Viro , , , Subject: Re: [PATCH 3/3] dcache: account external names as indirectly reclaimable memory Message-ID: <20180417112412.GB28901@castle.DHCP.thefacebook.com> References: <20180305133743.12746-1-guro@fb.com> <20180305133743.12746-5-guro@fb.com> <20180413133519.GA213834@rodete-laptop-imager.corp.google.com> <20180413135923.GT17484@dhcp22.suse.cz> <13f1f5b5-f3f8-956c-145a-4641fb996048@suse.cz> <20180413142821.GW17484@dhcp22.suse.cz> <20180413143716.GA5378@cmpxchg.org> <20180416114144.GK17484@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20180416114144.GK17484@dhcp22.suse.cz> User-Agent: Mutt/1.9.2 (2017-12-15) X-Originating-IP: [2620:10d:c092:200::1:b7d9] X-ClientProxiedBy: DB6PR0202CA0028.eurprd02.prod.outlook.com (2603:10a6:4:a5::14) To BL2PR15MB1075.namprd15.prod.outlook.com (2603:10b6:201:17::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:BL2PR15MB1075; X-Microsoft-Exchange-Diagnostics: 1;BL2PR15MB1075;3:oFaid3EZbf9ModlqU2FbEKj3neDt2xIHlXt0Tl5yRa/nm9e0wcw8SrvZy3lm3NHNj8Co9KMpElnBT2pJUSdwW1VaObNQ5ZzF2nd1e7NWpG7bCPSH6Ne5JvXC1VeSUP7iE+GjuYoMDjnznoo2+C4ruNLdqEZoWV2BelJXuIi7f3NsODOBABmAAGVuqbDGHmcQNb0cJw3Gp1J74rldt9vo3bar6n00BLy5L3EpnAKS9FL0l/RMmCOQI1L/60DROSUU;25:LL8lqmN02yi/TQXvIO4eZYCorxGq4Y8TGxxPF/13v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CrWvA+Ruufwi/9VEtZ/9tim6yl7A12jN+tQv5/OYEJeS;4:CMyQ4DJUgiGtue5K3ccxt1Cmsz04t+jKKRGETrjLBC27IDXKA2w/AXkaBiYd7kD0M7IdKdji/sYpSwNQ5hyXjZSD/u/LW4yq1kvnkMpNZvsj6v84VtPjjDPSU6+dmWy8orKKZ6GW0FHXBYMa3rOJyBTVx9FbIBegn9rUuGKkMgFg/5/nkWicaxSBdf7iS3jAD6toDBmdW1mfVm9xbwjCwd35y5DLp7+K/hu60XYBq9uc8PtHbx3w29/CSLB2YjvjofA77RXdm/N80xz91o5w+g== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(10201501046)(3231232)(11241501184)(944501327)(52105095)(3002001)(93006095)(93001095)(6041310)(20161123562045)(20161123558120)(20161123560045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011);SRVR:BL2PR15MB1075;BCL:0;PCL:0;RULEID:;SRVR:BL2PR15MB1075; X-Forefront-PRVS: 0645BEB7AA X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(396003)(346002)(39860400002)(376002)(39380400002)(366004)(377424004)(189003)(199004)(52396003)(106356001)(52116002)(53936002)(1076002)(86362001)(23726003)(47776003)(15650500001)(5660300001)(50466002)(16526019)(6666003)(93886005)(105586002)(81166006)(25786009)(7696005)(8676002)(81156014)(6246003)(16586007)(76176011)(316002)(8936002)(58126008)(486006)(9686003)(54906003)(6116002)(59450400001)(478600001)(476003)(11346002)(446003)(6506007)(386003)(55016002)(97736004)(46003)(2906002)(4326008)(6916009)(33656002)(186003)(7736002)(68736007)(305945005)(229853002)(18370500001)(42262002);DIR:OUT;SFP:1102;SCL:1;SRVR:BL2PR15MB1075;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;BL2PR15MB1075;23:a3eB9PEOjp0HXgoIyurClePZIQTQgGVmvx3PF8jJK?= =?us-ascii?Q?5VHdT9h+qQce/yITeAAY8MKduzsCJruftiC+ku/MrDIaBCI+aJNbUi6ifvIs?= =?us-ascii?Q?6jKBUgwEoDF/zO/muvl+Q31/f6DMnJj8QfToBr2zpx96UqnTP1YHIe8mVHmw?= =?us-ascii?Q?3iKMqeeNTaUQhqQuHVcN4tCaN1mwzxdTlftXy8ohlIbMfH6Nf5OzxrUFok+D?= =?us-ascii?Q?BDXwHAp66Xi/HqtjKfPi4sJc+/a+wmo43TcHS6TX4R9o8DReWJxL2fNwIo3J?= =?us-ascii?Q?CeVOc3DkG8tKXH1r0Xhe3XYvIVXXo/IyHan0l62B7Y02pJNSf3bPWmr1uwQg?= =?us-ascii?Q?06B20Xid9x5u0PzTjLg+oo2LSWBVUEZm0jjowh1JWbS8xJNkUNCBStLbDvPZ?= =?us-ascii?Q?gQyu5wdTPp7WPl+AytxjX32kOG515LtFkWhVLp4ihbZlzx/+06RqznRR5G1q?= =?us-ascii?Q?257Te+Pa7V3U7Pz4RdwEcXRZnkEz2acBaYAgy33rQrk7+VtSfDyQUaFOe0dm?= =?us-ascii?Q?AZPd3yd+9HpIqJ7ukX8exO0ApuNmcDpOwb/qIn3oQ8gvV9nMhQ1gZM2Fa3kR?= =?us-ascii?Q?jiEzh6O/g6vPB2S2CIG1G5svg+IaG6Z4s+uRHqfBlZ5MF6A+gySblG/EYgHM?= =?us-ascii?Q?L8nfDD/poC0QW6GpyzZpV2nkgPuJAMr41T1TOyJ5EvfPZzjQfurZqMenwnIV?= =?us-ascii?Q?c5ZSVvNqPo/MLvabpQGdnc2Pg92dh9+8o8i6sHgxVdxzIwsaSMU8DyXEllVk?= =?us-ascii?Q?A/etYBXFgDEKavT54K+wwB2sfsYEXU1p7TTL9tTaJyhchpdU3/ewPZJHqdoT?= =?us-ascii?Q?Uknee7ScZpNvSaoUv9nqSzxIuGzaQkH0me90/DNujkVSW8Z0C1lSnT9S/Vqi?= =?us-ascii?Q?VQ/Sbe6/P2PVDH+kR4158My8iRsyMmGSlNLw4Dmyp62eKWM9hqzv1V9MEF6c?= =?us-ascii?Q?cUij98dY8uLapxTlkbq6LBKBzwCJFXVO4SlQu772kuQgpz9rH0T6w2dBhUF0?= =?us-ascii?Q?mz8snZpMXdhvZb+8vyrDg2LwsPQ0O1yWH8X+9ZmoVyYhiJyJcBsaEa25Vh23?= =?us-ascii?Q?Xq65L/ZAUzYW1fZBZPdSxclVdrimn/3KrEBblURB7zh4n/pk0WWSTdTuSGrq?= =?us-ascii?Q?zvYRqAxB1L45dsUJcxMAI/cLolOAAS05l7/5ZMQMk7tFZH5awsjR401J8j4o?= =?us-ascii?Q?5bCH/Bpdbe/Ug5JRyqvy84ZtyTK0ehLXqCT6RT32PbSnOckYliALxovla5JN?= =?us-ascii?Q?OMqFQ+OYFKaG8IpT+IUoeJP/N7pSNKODifrk2/StX8NPEz/nNlj2yWIn+kCT?= =?us-ascii?Q?8TcHvg7qy1wIwVs0buJGpjdprAOQqq+A/x1Bic2HxmsJ2zwUTqEk6pEol2Xl?= =?us-ascii?Q?vc1dQ=3D=3D?= X-Microsoft-Antispam-Message-Info: C+n2NY37VdefA4+Y7wDgZKYgDLg4IsVTphAeZZgxoa4dYWUtX8B11JIaH8HTbyrKhnl0pPTjiofdMKKqKE3nLhrGHFkSUllZugMBpmBJNaZY4xCvVEhub3yRlFcQTZ8bHDOx7ZmtNG5wUJXQvDbux4MerlrUpaT4FsLgcoZnF7smx9HGT6TWO8i9zm+M/ADX X-Microsoft-Exchange-Diagnostics: 1;BL2PR15MB1075;6:2jemywq7/baOizB5gEA8ig8eyKh4dlDRhW5OW/pvMh7TRT7pSIwOPnpRVFOP896juhsPLrG5BZG7+iOi7UieASPH+0RTau4FDU78sjBnlB5Cougm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NN1RuTGWOr5Vl+EsV9HTEsGbpdNrIm6p2NacCzWjdLn/QZJtBb6PfF8hiv3XX3+rkV9356XXU= X-MS-Office365-Filtering-Correlation-Id: 49ef788f-3a1a-4a95-43d2-08d5a455c633 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Apr 2018 11:24:23.4286 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 49ef788f-3a1a-4a95-43d2-08d5a455c633 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ae927fe-1255-47a7-a2af-5f3a069daaa2 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL2PR15MB1075 X-OriginatorOrg: fb.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-04-17_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 Mon, Apr 16, 2018 at 01:41:44PM +0200, Michal Hocko wrote: > On Fri 13-04-18 10:37:16, Johannes Weiner wrote: > > On Fri, Apr 13, 2018 at 04:28:21PM +0200, Michal Hocko wrote: > > > On Fri 13-04-18 16:20:00, Vlastimil Babka wrote: > > > > We would need kmalloc-reclaimable-X variants. It could be worth it, > > > > especially if we find more similar usages. I suspect they would be more > > > > useful than the existing dma-kmalloc-X :) > > > > > > I am still not sure why __GFP_RECLAIMABLE cannot be made work as > > > expected and account slab pages as SLAB_RECLAIMABLE > > > > Can you outline how this would work without separate caches? > > I thought that the cache would only maintain two sets of slab pages > depending on the allocation reuquests. I am pretty sure there will be > other details to iron out and maybe it will turn out that such a large > portion of the chache would need to duplicate the state that a > completely new cache would be more reasonable. Is this worth exploring > at least? I mean something like this should help with the fragmentation > already AFAIU. Accounting would be just free on top. IMO, this approach is much better than duplicating all kmalloc caches. It's definitely has to be explored and discussed. Thank you!