Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2083383imm; Thu, 19 Jul 2018 12:55:13 -0700 (PDT) X-Google-Smtp-Source: AAOMgped9Jp/xZ8npdIJDyX2vFmG//CurpEHPOL+a4XLHXMab5tpa+8s6sII6wqTQDlKnwde/XG5 X-Received: by 2002:a63:460d:: with SMTP id t13-v6mr11124827pga.201.1532030113016; Thu, 19 Jul 2018 12:55:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532030112; cv=none; d=google.com; s=arc-20160816; b=PcIS3cD5rZ5QeoXwJym4u1Ol6FXgXs1t73ANez5/6ibAx2xOL/cDCTzUnp384vqNj2 1T0DhjBg2ACAUxBCu21qv5/YgJGC4pXCKPc3yqoY7Z4Iq89+RuX2OQdP6CS6y5EBGUna C93aC2wZpuqLwYA8lmZTay41iMeuF54rsRqnFVPpiWQar7E+QpHA5J8OFVKXuhda5CDd l6v8CBQrcOvJOd49Qb8+8notsYRltFbZPVDDxRQv5RHQVayZQQsH4Bjo6GqbeYHmmNyc Mea4S3hSW5xniUe3+RFVQNDC059V0JmDn8xBlylnnXNkO3uzd3ZI2zDAIl7qLPgu5i++ S0AQ== 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=buJkqeZWCacNEUvWO07bHmW9EcpQ3nuyOMm7iiTjmoE=; b=HZeq4YsDgeMARAQ+xXtJkkImlxGFW+lj4ooILu/phcJbw1sbTFi1+zRw07mRDQL2TM skXh6VxNwQWhG6voNO0BMFDlyDLooyTjKJyO1IEROSHTaattd/quPIlfjmWxo2DksVvO 1hRrOl32CoFgw9eeEEMun83c1jvopnfOIaXV9gc9eGric/HLDJ+xA5LTdbG6FzxCBugl 8elKbdRHx3DtIqI2coOR7sFP/jy1gO8IDH0g4FwyVmy/Oy3hGiCMpguZc9pX8ctyKeRw rQ90vsnKVi6LEZcn8ZOFS3x7qbmbg2NhxqRh0OxCHfr0HYzh10/vqpKwFdAP5rHXkyrq A9Fg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=gZ8VaKvY; dkim=fail header.i=@fb.onmicrosoft.com header.s=selector1-fb-com header.b=J4N4fgoh; 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 a4-v6si5767pfk.253.2018.07.19.12.54.57; Thu, 19 Jul 2018 12:55:12 -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=gZ8VaKvY; dkim=fail header.i=@fb.onmicrosoft.com header.s=selector1-fb-com header.b=J4N4fgoh; 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 S1728912AbeGSUjB (ORCPT + 99 others); Thu, 19 Jul 2018 16:39:01 -0400 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:52658 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727539AbeGSUjA (ORCPT ); Thu, 19 Jul 2018 16:39:00 -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 w6JJnPbe007022; Thu, 19 Jul 2018 12:53:48 -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=buJkqeZWCacNEUvWO07bHmW9EcpQ3nuyOMm7iiTjmoE=; b=gZ8VaKvYOmZI1BnIHqMKilIOTAamCrF1XZtDraSHwEvxRKptGS5JYJBrkY1W360H8GCb lTJZLc/IE+V2G9OQ4D87fqgURr/AxnqBWsjMls6NFWRBeNGILleBvvzpMB+5iWSEDOgJ ijnXDT4fY3JXt/Rnn5iSy1zqYsvxp96qmEU= Received: from maileast.thefacebook.com ([199.201.65.23]) by mx0a-00082601.pphosted.com with ESMTP id 2kax7c0hys-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 19 Jul 2018 12:53:48 -0700 Received: from NAM03-DM3-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; Thu, 19 Jul 2018 15:53:44 -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:X-MS-Exchange-SenderADCheck; bh=buJkqeZWCacNEUvWO07bHmW9EcpQ3nuyOMm7iiTjmoE=; b=J4N4fgoh41IlFzCTvv6Vd0mGI1rBaQm/s7mj5ntVHRRQkBPZz7UyqGu6e+ZKGo0c8+opHksaD0rML+FBhLdYxAvkChmAmmJOnIUj8aLvfM55wUaD3Z1Ae2oFB1q1275tgXoCtJ9rdXzsYnnX2BkHg1/Gq6TO/KikjX1ZPgyBbZ0= Received: from castle.DHCP.thefacebook.com (2620:10d:c090:200::5:7d2) by BLUPR15MB0163.namprd15.prod.outlook.com (2a01:111:e400:5249::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.952.19; Thu, 19 Jul 2018 19:53:39 +0000 Date: Thu, 19 Jul 2018 12:53:33 -0700 From: Roman Gushchin To: Vlastimil Babka CC: Andrew Morton , , , , Michal Hocko , Johannes Weiner , Christoph Lameter , David Rientjes , Joonsoo Kim , Mel Gorman , Matthew Wilcox , Laura Abbott , Sumit Semwal , Vijayanand Jitta Subject: Re: [PATCH v3 0/7] kmalloc-reclaimable caches Message-ID: <20180719195332.GB26595@castle.DHCP.thefacebook.com> References: <20180718133620.6205-1-vbabka@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20180718133620.6205-1-vbabka@suse.cz> User-Agent: Mutt/1.9.2 (2017-12-15) X-Originating-IP: [2620:10d:c090:200::5:7d2] X-ClientProxiedBy: MWHPR20CA0032.namprd20.prod.outlook.com (2603:10b6:300:ed::18) To BLUPR15MB0163.namprd15.prod.outlook.com (2a01:111:e400:5249::13) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a4be9457-1251-4f11-0552-08d5edb153c2 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989117)(5600053)(711020)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060)(7193020);SRVR:BLUPR15MB0163; X-Microsoft-Exchange-Diagnostics: 1;BLUPR15MB0163;3:wJ5W5i2+8UkBOuHxf5+H42MIV6VJzius+OEHrvHtSfMRoxDMJV4ZkK318KaAB4h6ZPFu4x88QPKfTU71MaMDNZrrzPnur5YYgRs4CJL04R1nNce6P1wZ2k6nM7ubC4ajTH1GRhJSUybFilo53g1bOZ6LX1NLsdu6yJ9/DaaHE25Ueu1e6OG5IY2xu8wDIxdkxjZ/s3IN4erYZo909APm83hEdO1CUZl1zD2cnQY8TCt/dE5EduL27SV9DfdR96i9;25:x5wX83s6S6HZWPhv/GLnMJSJTCb60qoJ8FzqnBnE6hewXQS2eYACbPmDv67Sh9ECeBv1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JWcKCYSfhU9w6pgafss9MHzD24K3O+WNeCUYe;4:2QG036aYz5Tu3jbJdrfQwpE9aipt377skk8p1Ey5NnTZhIDLNtjAVJ8hVFqdsvIikfE1PtWYVCiOmaM2IhiNY/FMC7HQbYbfuipvNr7OywM6g3cZurUIBh8XqZ4YqZCHkaIH3kFcObfUqM8TSrg1ytz6nxNzXSYl+ZpmvWhtdgi6y43Uw7zob0Be0Yk8MS4PmU5095ojxYwbI9Ne5bPzyA6Dg9p8vrgX1U+QdlOkadunmhHADZFOAmVSKQU6rhZh2peh9tzqIScvip4ROqd1pRlvx0/Vs7Tu1VHS7Xv9TOwz+NIyeUlYwM/WUR0xIBX5dRYzCgIv+/QLibTQYLBfaDz+kSoOk7ox7VALLZOmMVk= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192374486261705)(67672495146484); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(10201501046)(93006095)(93001095)(3231311)(11241501184)(944501410)(52105095)(3002001)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123558120)(20161123562045)(6072148)(201708071742011)(7699016);SRVR:BLUPR15MB0163;BCL:0;PCL:0;RULEID:;SRVR:BLUPR15MB0163; X-Forefront-PRVS: 0738AF4208 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(366004)(396003)(136003)(346002)(39860400002)(376002)(189003)(199004)(68736007)(229853002)(8936002)(106356001)(105586002)(6916009)(7416002)(2906002)(6666003)(33656002)(478600001)(5660300001)(53936002)(6116002)(23726003)(47776003)(1076002)(6246003)(50466002)(7696005)(97736004)(4326008)(25786009)(8676002)(6506007)(386003)(55016002)(446003)(186003)(16526019)(14444005)(81166006)(316002)(54906003)(16586007)(9686003)(52116002)(81156014)(476003)(86362001)(7736002)(76176011)(11346002)(486006)(52396003)(58126008)(305945005)(46003)(18370500001)(42262002);DIR:OUT;SFP:1102;SCL:1;SRVR:BLUPR15MB0163;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;BLUPR15MB0163;23:RuefyWYOPkQbNC4fG5ujtPHv/F6PZPgLkiub1Bf8i?= =?us-ascii?Q?L3sGm3b1RfMSahucH+eVVudoT5rWe7KvgFIV3TihePL+8J7/JX8vANThGxyw?= =?us-ascii?Q?kEO0B/NGGQnoSLTkKpKBRZZQkz+j4b6DHhvRutFxhtXzqvPcv91s55oWqNpO?= =?us-ascii?Q?PX8K0D1PacUmip7oNdF3EYTfU563MIFcPGmxOsq53szMVF9YmE/vq2SZt1M3?= =?us-ascii?Q?Gs4vpPJPCcq2Q2RQ8yjjDsmWZy+WAqwGkpMg3aVXZnUKQpB0dms+1Rje8yAW?= =?us-ascii?Q?iCXdpLBf5hemITRRuDpNT2FHa7DVovn0DH0TEtb/HSN7SYOz6ySI03+NaAUH?= =?us-ascii?Q?Dc/EeoclzLakmSTRo+QvvwVjtbVBs9+VBZ6Gw4GOILyBwekFXDJQzVuoJ7L4?= =?us-ascii?Q?OjmV5THxWfkvCT/qN1Oew+L4JGdN0rlPqUVCsrhxE65vkYwDcvw/HUsNNqjY?= =?us-ascii?Q?lqh5i9ca88l4wTXbiCp8qDCkmI85JT3Fz9b39KVAFdalkr5eVKV1TSHEqjkX?= =?us-ascii?Q?nXkcaiy/8HOCp/zrUpOCwT3JYhmbAc0ZZOmDlEjLDE7HINACb7oeNOpmUyJg?= =?us-ascii?Q?GE28kWorIk3vw+lbyAWjPTz9HBCMvKImKQsGBcMLVLjbNeqIAtxgTB5MbD5g?= =?us-ascii?Q?hr1a/IcEJyOX+sn10NWdHWtjBUNDsh10Fp0V9U7tVFHPYmPjtV0uMQxT2mnU?= =?us-ascii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OW7m6XabYKSgLWbGhyJY1Edu7vMk8v+0itEE5ukN3PyXpiBzCty0bKaBsFkC1xAD4K1aw5axArpzysL+lwAv;20:+QHvMhGezsJg0FaB3QpQIgyoW7QlsFq+0NiYg4ZWoAnTcNHbW56CNgQw7u0Fq/oCeLlzB/zgMeya6kBvGwXEsSnLoQMWvtjq+DXZ2vAppYeSMQKrrkRs1GSZGUqfS7X3cg7/58kcEDpT8wSbIurqz3Xla+Ovp6hBMOvLwsUq+lw= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jul 2018 19:53:39.3644 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a4be9457-1251-4f11-0552-08d5edb153c2 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ae927fe-1255-47a7-a2af-5f3a069daaa2 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR15MB0163 X-OriginatorOrg: fb.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-07-19_07:,, 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, Jul 18, 2018 at 03:36:13PM +0200, Vlastimil Babka wrote: > v3 changes: > - fix missing hunk in patch 5/7 > - more verbose cover letter and patch 6/7 commit log > v2 changes: > - shorten cache names to kmalloc-rcl- > - last patch shortens for all kmalloc caches to e.g. "1k", "4M" > - include dma caches to the 2D kmalloc_caches[] array to avoid a branch > - vmstat counter nr_indirectly_reclaimable_bytes renamed to > nr_kernel_misc_reclaimable, doesn't include kmalloc-rcl-* > - /proc/meminfo counter renamed to KReclaimable, includes kmalloc-rcl* > and nr_kernel_misc_reclaimable > > Hi, > > as discussed at LSF/MM [1] here's a patchset that introduces > kmalloc-reclaimable caches (more details in the second patch) and uses them for > SLAB freelists and dcache external names. The latter allows us to repurpose the > NR_INDIRECTLY_RECLAIMABLE_BYTES counter later in the series. > > With patch 4/7, dcache external names are allocated from kmalloc-rcl-* > caches, eliminating the need for manual accounting. More importantly, it > also ensures the reclaimable kmalloc allocations are grouped in pages > separate from the regular kmalloc allocations. The need for proper > accounting of dcache external names has shown it's easy for misbehaving > process to allocate lots of them, causing premature OOMs. Without the > added grouping, it's likely that a similar workload can interleave the > dcache external names allocations with regular kmalloc allocations > (note: I haven't searched myself for an example of such regular kmalloc > allocation, but I would be very surprised if there wasn't some). A > pathological case would be e.g. one 64byte regular allocations with 63 > external dcache names in a page (64x64=4096), which means the page is > not freed even after reclaiming after all dcache names, and the process > can thus "steal" the whole page with single 64byte allocation. > > If there other kmalloc users similar to dcache external names become > identified, they can also benefit from the new functionality simply by > adding __GFP_RECLAIMABLE to the kmalloc calls. > > Side benefits of the patchset (that could be also merged separately) > include removed branch for detecting __GFP_DMA kmalloc(), and shortening > kmalloc cache names in /proc/slabinfo output. The latter is potentially > an ABI break in case there are tools parsing the names and expecting the > values to be in bytes. > > This is how /proc/slabinfo looks like after booting in virtme: > > ... > kmalloc-rcl-4M 0 0 4194304 1 1024 : tunables 1 1 0 : slabdata 0 0 0 > ... > kmalloc-rcl-96 7 32 128 32 1 : tunables 120 60 8 : slabdata 1 1 0 > kmalloc-rcl-64 25 128 64 64 1 : tunables 120 60 8 : slabdata 2 2 0 > kmalloc-rcl-32 0 0 32 124 1 : tunables 120 60 8 : slabdata 0 0 0 > kmalloc-4M 0 0 4194304 1 1024 : tunables 1 1 0 : slabdata 0 0 0 > kmalloc-2M 0 0 2097152 1 512 : tunables 1 1 0 : slabdata 0 0 0 > kmalloc-1M 0 0 1048576 1 256 : tunables 1 1 0 : slabdata 0 0 0 > ... > > /proc/vmstat with renamed nr_indirectly_reclaimable_bytes counter: > > ... > nr_slab_reclaimable 2817 > nr_slab_unreclaimable 1781 > ... > nr_kernel_misc_reclaimable 0 > ... > > /proc/meminfo with new KReclaimable counter: > > ... > Shmem: 564 kB > KReclaimable: 11260 kB > Slab: 18368 kB > SReclaimable: 11260 kB > SUnreclaim: 7108 kB > KernelStack: 1248 kB > ... > > Thanks, > Vlastimil Hi, Vlastimil! Overall the patchset looks solid to me. Please, feel free to add Acked-by: Roman Gushchin Two small nits: 1) The last patch is unrelated to the main idea, and can potentially cause ABI breakage. I'd separate it from the rest of the patchset. 2) It's actually re-opening the security issue for SLOB users. Is the memory overhead really big enough to justify that? Thanks!