Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2945520imm; Thu, 24 May 2018 19:37:45 -0700 (PDT) X-Google-Smtp-Source: AB8JxZr6Zkyl2hcQRBcZ28QKUDxj7qIlFPVkNVajAz7cRbMK8zdozcOjAGa47EgkI1h7EyrD1y4y X-Received: by 2002:a17:902:3a5:: with SMTP id d34-v6mr600746pld.103.1527215865749; Thu, 24 May 2018 19:37:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527215865; cv=none; d=google.com; s=arc-20160816; b=gHUUrvYnFdhl1L+9Dj6M7M+tjRhfztZb6AomeUoCc8Txv33lG6f1fjEevtN9LuJCnt YsuHvzbOrKi/9508wioq7lS3Bbh6yVGmaT70MLTmx8HnLCqvXTaFilDBg1WgI/1vw1vb IEnKkz7sFm06uY/nIHLcO1OVYZ2jjeAYma0zbX1Ve3PP8zbBXA1v0eyujrM/KvQp8bcH PdcmilYHc9VWBR4DIy+kvPcf4t1kUclQOABBwM3veIk5RRUkYRUqwX4zeI9VTLMs9qGZ 0A35e+NUocPGr0BsK1fYpmHViQY0Vu31ueruiKA2DMaYYmAFtl9h4bhaEJbhFC+ZVkHi p0Og== 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=0XukgB3kSh/hR2BMdYPxsugARzhV4gr1ln+fUT/NYXs=; b=TpyXDnVjr3L62bn8YdabaN2PvDg439Meq9+JDVBbLIwnZZhXpOuK7kzFIk74Yq5PAC BJXr1gv9CCRhVeMzf+pu6XvkphtKWqaneVqsSoPALDjNWMlP5RiAvhSeLWClUk6/Yhzu jgKIk/t2WPCpD4brmkHw1G8KvKiBr3sLc5HGnRbLM35hkVWMw6Rz86GQWhDwDTnR3PDf MOcohr7Y+V3NRW23ckko7qVRSYEyLk9GybEo+C4IWu/apC7EJd/cnIUGzEtk5rzdPcqL d2rYgepRYZfnOQ0Cfg+lJEknoA50I04h2/o1uFh9NE1MCklyxxyLp1VuyBJraJ+9iPhE zc0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=ZmcQpkg5; 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 c2-v6si5762567pgt.310.2018.05.24.19.37.31; Thu, 24 May 2018 19:37:45 -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=ZmcQpkg5; 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 S1034280AbeEXSlR (ORCPT + 99 others); Thu, 24 May 2018 14:41:17 -0400 Received: from merlin.infradead.org ([205.233.59.134]:55922 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030324AbeEXSlQ (ORCPT ); Thu, 24 May 2018 14:41:16 -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=0XukgB3kSh/hR2BMdYPxsugARzhV4gr1ln+fUT/NYXs=; b=ZmcQpkg5ZqcXRSo3CC1S2y2VHb ve0OSNLWhGGLYz2cdzYyPpDOjRRK/kkd2BfkgnBX9Em3jXEjMHWfXIcfGc1mx0SpBXbs/YeeLYqLJ Dq9imFYMC2rs8+rz3HGSyWGUkaApYQB8MruFG4w9XyBVq3U46yqd3FeZxbu2Vbl9MbAydoPJv/8co Z+d11WJeAN0ztaZCuEsWKVPUnh7+mlVQRzmzs3Gnu8GzZ/FInwZ6I8kxW/DAU5+nZoVSsM8Tff2o0 RuDLEeuKYiYflcErg/D94+fvn/dXjiwzg73NC2tTEVEhrG8pitOnyBPYc3AJw17no/5K3o7gk9lRo sty+uxBg==; 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 1fLvAc-00046c-JO; Thu, 24 May 2018 18:41:02 +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> <0944e1ed-60fe-36ce-ea06-936b3f595d5f@infradead.org> From: Randy Dunlap Message-ID: Date: Thu, 24 May 2018 11:40:59 -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: <0944e1ed-60fe-36ce-ea06-936b3f595d5f@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 09:18 AM, Randy Dunlap wrote: > 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) { I would use (size >= 1024) so that 1M is printed instead of 1024K. >> size /= 1024; >> idx++; >> } >> >> sprintf("%d%c", size, suffices[idx]); > > suffixes >> >> -- > > -- ~Randy