From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 12BA6C433EF for ; Tue, 22 Feb 2022 19:59:21 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7610F8D0002; Tue, 22 Feb 2022 14:59:20 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 7162A8D0001; Tue, 22 Feb 2022 14:59:20 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5B0378D0002; Tue, 22 Feb 2022 14:59:20 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0194.hostedemail.com [216.40.44.194]) by kanga.kvack.org (Postfix) with ESMTP id 483138D0001 for ; Tue, 22 Feb 2022 14:59:20 -0500 (EST) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id EFA998248D52 for ; Tue, 22 Feb 2022 19:59:19 +0000 (UTC) X-FDA: 79171480038.26.33BACB1 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf15.hostedemail.com (Postfix) with ESMTP id E1A22A0003 for ; Tue, 22 Feb 2022 19:59:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.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; bh=aRVJAANOsC10dJ0998zCbenF+8pqHZX+lNyjxaw/Qfk=; b=Z6c3tbfng6/e48jDlayJS7QvuT 89RIH3AHlxz3EjtDqZMSU7Gt4J4we1XXPncRxY+nNaP52I+h1nL9mO4DIaj6149wVT1JmvG7eLNJz XpkRDzIlb0pkw91fSckO6vPAMZ7s9hA2rjqKHH2a2Y5STVeSeNXW0En0wF9FhIrpm+mg6n+QVVxPb ppqJeI3dEDD9XORTRGBDRmJwwusoQoXxbsuZDw5IBQVWlKUtQyTC/XBpR4KxZmiBAe/zYnKC8OYC4 yP2o3jHdiVQmjRF2nTT1Uafzf5J6pwDmchP74pltAvknasYlvNFLondS8ZEBtuAj6bgCT8W5CuF2y NuDQqKLQ==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nMbJU-0036Sc-Bq; Tue, 22 Feb 2022 19:59:08 +0000 Date: Tue, 22 Feb 2022 19:59:08 +0000 From: Matthew Wilcox To: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: linux-mm@kvack.org, Roman Gushchin , Andrew Morton , Vlastimil Babka , linux-kernel@vger.kernel.org, Joonsoo Kim , David Rientjes , Christoph Lameter , Pekka Enberg Subject: Re: [PATCH 3/5] mm/slab: Do not call kmalloc_large() for unsupported size Message-ID: References: <20220221105336.522086-1-42.hyeyoo@gmail.com> <20220221105336.522086-4-42.hyeyoo@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=Z6c3tbfn; dmarc=none; spf=none (imf15.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org X-Rspam-User: X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: E1A22A0003 X-Stat-Signature: 87t1eqfhwwxe7ptc8ei66njoxzgzi44q X-HE-Tag: 1645559958-774987 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, Feb 22, 2022 at 08:10:32AM +0000, Hyeonggon Yoo wrote: > On Mon, Feb 21, 2022 at 03:53:39PM +0000, Matthew Wilcox wrote: > > On Mon, Feb 21, 2022 at 10:53:34AM +0000, Hyeonggon Yoo wrote: > > > SLAB's kfree() does not support freeing an object that is allocated from > > > kmalloc_large(). Fix this as SLAB do not pass requests larger than > > > KMALLOC_MAX_CACHE_SIZE directly to page allocator. > > > > I was wondering if we wanted to go in the other direction and get rid of > > kmalloc cache sizes larger than, say, 64kB from the SLAB allocator. > > Good point. > > Hmm.. I don't think SLAB is benefiting from queueing that large objects, > and maximum size is still limited to what buddy allocator supports. > > I'll try reducing kmalloc caches up to order-1 page like SLUB. > That would be easier to maintain. If you have time to investigate these kinds of things, I think SLUB would benefit from caching order-2 and order-3 slabs as well. Maybe not so much now that Mel included order-2 and order-3 caching in the page allocator. But it'd be interesting to have numbers.