Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2027847imm; Thu, 24 May 2018 04:46:26 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpG7kIXJV7vdimXg4Z3RS4d1d4DR7AcClDR3IBkp2mBTDTpOMRfKKbLK+Nn5nhUDeKjvwJN X-Received: by 2002:a62:3a94:: with SMTP id v20-v6mr6974933pfj.90.1527162386036; Thu, 24 May 2018 04:46:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527162386; cv=none; d=google.com; s=arc-20160816; b=QJ/uMz9yFZR0L2/LEz1mOPEzHe/oIeFpb8fVU6Vp6aSMYpwEDDJePgc955mvZLdcNN vX+p/q90D41l87kjuTUBZYLiktKniDqQguZPnc6Xu8MfM3WpcGjh5uPVqEdgSPevXAXY oVtiBnab29ON4sAGUPLIIm7SeWpRGkVPFD3NWInfpZJD5AWl1R9ZKMo0vcfbs+oxTGj/ 2vNcFz4rdR+Supm77UJro4gxbbtgozgYUwdoI7EtEUtOWDZ0vGVjfQcUAFtl5M+DSoON 2oCx7ZbTPHl2486c5pIcDrhPVmkXhu0mIdK4DJdnDY2qHlkrFQw9e1KmmPU7MqGAMzAK FQGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=vt33RO1NokVciRfoDScoAUjB2y8tK6DXsWjgMKm4/q0=; b=Dv6MSfVKsTLqlWPJN6FklN18RjmemQkv0rp5niCkp9NyA7vHCC/W1RyUDEiRVGYj8H kMAY78L5mkw2CVWwbK2/lnMXqXH7HcusekWmf4VRd2va+2jBuc0Y0R0aS/NggFSdpliy JR15OSyQumhnSmJBOZp/xqUhtVu1EWLLkrheAnyH4jA6ljN/TRMjkb9q+zeZ33rHLjk9 QSO+vMVW+ueUWSwI3z9/BKT27ZDsAyG31gFfd6op+5TXty/ylsS5bXciBuOkiAbXbWfH RXSDnP6TCgtAohX6nEgjjBHvwXQk4D+k0tkOoncjHXUhxG4PlEu8zSRQENWUoopB62oe EzQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=PwrtGmOl; 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 m13-v6si17143633pgt.624.2018.05.24.04.46.11; Thu, 24 May 2018 04:46:26 -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=bombadil.20170209 header.b=PwrtGmOl; 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 S969174AbeEXLoP (ORCPT + 99 others); Thu, 24 May 2018 07:44:15 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:60586 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967191AbeEXLnz (ORCPT ); Thu, 24 May 2018 07:43:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding: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=vt33RO1NokVciRfoDScoAUjB2y8tK6DXsWjgMKm4/q0=; b=PwrtGmOlFMXe+2Lo2tKH7lpOo HtZHmUfHgtNhG1dHO4l+jIC6AjBcTb/nRjbnG8l8r/PE1rfcYKBROEGz8jgZ36PTt6HKq5/qFXY72 G5aadbT7H/PGe0Cpz2y56UPC5Z6LR6W6/EZEw03IVXE2yR1XLFSaZ2WavYV/ZvwP8nUai6d998tGB bGCT0KRrGZk7gRJKyVof+iRM1EZbryp1ziouDhWc2hT1QRhDOmvx6PxxAqsEeig3tMqV6Ix2xI1qb Ou3fVMl1Rb8ypIiedmiAXIKtxaCHpVPEPzq6D1ff7d4h8omL8c4YmcIM9KsfoYi3wv2tjUsN1Ak/0 Ox0skM8iw==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1fLoes-00032N-Pl; Thu, 24 May 2018 11:43:50 +0000 Date: Thu, 24 May 2018 04:43:50 -0700 From: Matthew Wilcox To: 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 Subject: Re: [RFC PATCH 0/5] kmalloc-reclaimable caches Message-ID: <20180524114350.GA10323@bombadil.infradead.org> References: <20180524110011.1940-1-vbabka@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180524110011.1940-1-vbabka@suse.cz> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 static const char suffixes[3] = ' kM'; int idx = 0; while (size > 1024) { size /= 1024; idx++; } sprintf("%d%c", size, suffices[idx]);