Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2937369imm; Thu, 24 May 2018 19:26:36 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoJ1wKgwHVPfIwOp6KHSPNu5kVlDdqtZAKsDivJMVq9Ujp9ot1QcirWpJlJ0CuIA0Ij16Xb X-Received: by 2002:a65:5206:: with SMTP id o6-v6mr431595pgp.157.1527215196912; Thu, 24 May 2018 19:26:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527215196; cv=none; d=google.com; s=arc-20160816; b=oFx3EQpoorKi7uMs7NBE/ORyvL10eP94dbnBlKsQAmqY/uWMsGG8QTc/hWLrzgvrQs Ou35Q+HPaN5pn+sC8ijNR1fJw/FH+t1QuHbYactzZ8U3WVWtNHFYaqwNFFp73pHckKqS Nbzyhhukp4SOM8XcMJ9GgSQiEiBcE0WVY9MF6hn9vJIFaBXsoXwVTKni2K3gzCPQ/vwi VoSVD1H3Nu/jpQmGwXf6gqujRxKNayiyYST6qg04PgNSS9jdkxgobJzKxxXnPGdoUyim f3F24QCAZMsJg1Hxzm6hMmTB43nP8vdHX9jxpAlfuG7JmVVK5VbJNcy9Ju2Ry0elNf68 uljg== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=4rwppjrm0agUmdTdZr/lLNAMiaC6OdvWMQ2t1n9n9XY=; b=xkrOclBDqG2CSjzSSRRVldeqbG6HlsgdGY9DocWKgs6cbd38d2Hbqa72G54VB6O5oV Q80RzYJtR9gRm7v1OtLECJop8gMEU1U4BMfoL1OvGX26GjBONg2rLeUKYx4BwVK0F+wq gqELl88ivVYQ7W5iEP5+4aD1cPbJjpZL3igtKT+lp0Ytx3ootD7fXo93nxQk7e0biPfz MPNPwoJrMI1Hpodma/uojY15uMmFdURQoK8N8yM3fqcN3nOr7txQb9Lk9QpyhQjt9sT8 3e21V2fJeVmDO1s1Xc2Aztc0zetV/ycCOFIyldLf8arDEy0EXyPgOdWM6hTTZbDx4GEe KwEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=lHKk7/p6; 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 v16-v6si21905463pfn.77.2018.05.24.19.26.22; Thu, 24 May 2018 19:26:36 -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=fail header.i=@infradead.org header.s=merlin.20170209 header.b=lHKk7/p6; 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 S1033545AbeEXQTL (ORCPT + 99 others); Thu, 24 May 2018 12:19:11 -0400 Received: from merlin.infradead.org ([205.233.59.134]:49894 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030896AbeEXQTD (ORCPT ); Thu, 24 May 2018 12:19:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=4rwppjrm0agUmdTdZr/lLNAMiaC6OdvWMQ2t1n9n9XY=; b=lHKk7/p6ubsWLNt4A4118LVzDI DM3Jd0BIW+WNf1PTq6rY81a7a6vhVWfyfEVxfDMOvjC2X4h+bTUu9B3YvmYmo8Gdk7eivrHDU88fT aDkbO778wLKrzlfjjLVC1EwGvG/oEL6sxz5jSBOqBBJHGaG6vwbwCsF2TKAMcaI0nxn9bukrgv+2U KfjPOwfVsEqUA2wXRmO/NrbZKK7P2AzsDtXgPfEGpPBbakHpcgehlA6o/1/7t9G1WL5Ynf+cH5cXl 6p914sCEo8XKIt5hYm2AQYxq8TZdVNqgiOgbrGm44wA5CLbcT95Wu0ZbDDh+f9+QUuR4aKv0VKKFa tqjBtgwA==; Received: from static-50-53-52-16.bvtn.or.frontiernet.net ([50.53.52.16] helo=midway.dunlab) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fLswy-0001rK-4f; Thu, 24 May 2018 16:18:48 +0000 Subject: Re: [RFC PATCH 0/5] kmalloc-reclaimable caches To: Matthew Wilcox , Vlastimil Babka Cc: linux-mm@kvack.org, Roman Gushchin , Michal Hocko , Johannes Weiner , linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Mel Gorman , Vijayanand Jitta References: <20180524110011.1940-1-vbabka@suse.cz> <20180524114350.GA10323@bombadil.infradead.org> From: Randy Dunlap Message-ID: <0944e1ed-60fe-36ce-ea06-936b3f595d5f@infradead.org> Date: Thu, 24 May 2018 09:18:44 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <20180524114350.GA10323@bombadil.infradead.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/24/2018 04:43 AM, Matthew Wilcox wrote: > On Thu, May 24, 2018 at 01:00:06PM +0200, Vlastimil Babka wrote: >> Now for the issues a.k.a. why RFC: >> >> - I haven't find any other obvious users for reclaimable kmalloc (yet) > > Is that a problem? This sounds like it's enough to solve Facebook's > problem. > >> - the name of caches kmalloc-reclaimable-X is rather long > > Yes; Christoph and I were talking about restricting slab names to 16 bytes > just to make /proc/slabinfo easier to read. How about > > kmalloc-rec-128k > 1234567890123456 > > Just makes it ;-) > > Of course, somebody needs to do the work to use k/M instead of 4194304. > We also need to bikeshed about when to switch; should it be: > > kmalloc-rec-512 > kmalloc-rec-1024 > kmalloc-rec-2048 > kmalloc-rec-4096 > kmalloc-rec-8192 > kmalloc-rec-16k > > or should it be > > kmalloc-rec-512 > kmalloc-rec-1k > kmalloc-rec-2k > kmalloc-rec-4k > kmalloc-rec-8k > kmalloc-rec-16k > > I slightly favour the latter as it'll be easier to implement. Something like Yes, agree, start using the suffix early. > > static const char suffixes[3] = ' kM'; > int idx = 0; > > while (size > 1024) { > size /= 1024; > idx++; > } > > sprintf("%d%c", size, suffices[idx]); suffixes > > -- -- ~Randy