Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp2789114ybh; Mon, 9 Mar 2020 13:04:32 -0700 (PDT) X-Google-Smtp-Source: ADFU+vu5OfMi3lIFQNFQLK0uJKY/Mo8it09xVJtGLEOlBntOmbJ21KTBLyJ43bMKvdUi1fQ0E375 X-Received: by 2002:a05:6830:103:: with SMTP id i3mr13781297otp.270.1583784271921; Mon, 09 Mar 2020 13:04:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583784271; cv=none; d=google.com; s=arc-20160816; b=UgimjmGlvbi9r70T4kxwmwqbSNbE3KpuX6+xUh1U5TpNzZ2Rrh6CQnCtiaFjXgOzRI YQ1dUVvHgniQQljrLAs/d6SBMJDVyjjw3NgyIL15FATWEu4uP09vx3spBYuBImrXyAid 5bGEwWhftjq3PC8VpkPzcJfBZ/pU1jTrdgvqvG2rpdxqPedPB9uPtN+mPC/HDczJVGzR JF87H31yMiI/1orqXcIbAX9q+T9jGoWWU8fvRCYgaM2l1HxhSNdvF15ALqojjCpPRLhK 4V7LPTfRnn+5l367LUrYQ0fnazwD+2XRjRZlRAGZrUmiz/GVf5Vj5IoYPGaEbPCGFCPS oIrA== 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:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=YiTm90yuX7JDQwvpB8LhB1Wbvp96rI/4I4yK09N3xFA=; b=OQ4uDwMKw4Jy1RWZOTLlY3kjrpTTmHKTLwkPSCDD2yz6VFQ3SxKk0iWKCamVHwgsfU eO0LM/KfLs298Wj7DgtJeYmCVEdj9sn1gkc9rP33ICWFbc5CAJPjK1iSHpHjgRU+y9AP pbhAia9FHDpBHi4WxwwJDwp6CSAXwhY3JnwChBJImjQzzsdAkgdie5/pKZ1c4SgyuD8L OQ1yqcHDXnWQfjYZEINs90ZaUnm23e6KJNYxbSy546CIsXLllN3jsF8/RZNgmiPMsOHe 1m0JBCooXZvkzn0GbvZgi3Ga+TCWCxH8naAIML9VjhHakd+vqwGdnctMZUwb8Z94sBF1 4BAw== ARC-Authentication-Results: i=1; mx.google.com; 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 f5si1198267otq.73.2020.03.09.13.03.57; Mon, 09 Mar 2020 13:04:31 -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; 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 S1726617AbgCIUAc (ORCPT + 99 others); Mon, 9 Mar 2020 16:00:32 -0400 Received: from smtprelay0027.hostedemail.com ([216.40.44.27]:55570 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725992AbgCIUAc (ORCPT ); Mon, 9 Mar 2020 16:00:32 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay07.hostedemail.com (Postfix) with ESMTP id E7891181D3030; Mon, 9 Mar 2020 20:00:30 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,,RULES_HIT:41:355:379:599:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1539:1593:1594:1711:1730:1747:1777:1792:2393:2553:2559:2562:2692:2828:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3868:3871:3873:4321:5007:7903:8603:10004:10400:10848:11232:11658:11914:12296:12297:12740:12760:12895:13069:13311:13357:13439:14096:14097:14659:14721:21080:21627:30054:30090:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:1,LUA_SUMMARY:none X-HE-Tag: angle62_44c5bace4011 X-Filterd-Recvd-Size: 1773 Received: from XPS-9350.home (unknown [47.151.143.254]) (Authenticated sender: joe@perches.com) by omf10.hostedemail.com (Postfix) with ESMTPA; Mon, 9 Mar 2020 20:00:29 +0000 (UTC) Message-ID: <84ef5548ee27e7150d0b7a5702ce50536cea975a.camel@perches.com> Subject: Re: [PATCH v2 1/4] kernfs: kvmalloc xattr value instead of kmalloc From: Joe Perches To: Tejun Heo Cc: Daniel Xu , cgroups@vger.kernel.org, lizefan@huawei.com, hannes@cmpxchg.org, shakeelb@google.com, linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org, kernel-team@fb.com Date: Mon, 09 Mar 2020 12:58:49 -0700 In-Reply-To: <20200309195104.GA77841@mtj.thefacebook.com> References: <6bbfc8b8c9c206d80de43a64bfe4b8083cc2c02f.camel@perches.com> <20200309195104.GA77841@mtj.thefacebook.com> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.34.1-2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2020-03-09 at 15:51 -0400, Tejun Heo wrote: > On Mon, Mar 09, 2020 at 12:41:05PM -0700, Joe Perches wrote: > > If the need is to allocate from a single block of memory, > > perhaps you need a submemory allocator like gen_pool. > > (gennalloc.h) > > > > Dunno. Maybe i just don't quite understand your need. > > vmalloc is the right thing to do here. vmalloc space isn't a scarce > resource on any 64bit machines. On 32bits, which basically are tiny > machines at this point, these allocations are both size and quantity > limited by other factors (e.g. each cgroup consumes way more memory). This feels like driving spikes into a living thing more than into a corpse. I've still got more than a few 32-bit devices around.