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 68277C433EF for ; Tue, 22 Feb 2022 08:10:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B420B8D0003; Tue, 22 Feb 2022 03:10:39 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id AF2668D0001; Tue, 22 Feb 2022 03:10:39 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9BA5C8D0003; Tue, 22 Feb 2022 03:10:39 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.27]) by kanga.kvack.org (Postfix) with ESMTP id 8E7EB8D0001 for ; Tue, 22 Feb 2022 03:10:39 -0500 (EST) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 4A34C22C72 for ; Tue, 22 Feb 2022 08:10:39 +0000 (UTC) X-FDA: 79169694198.08.56465E3 Received: from mail-pg1-f182.google.com (mail-pg1-f182.google.com [209.85.215.182]) by imf01.hostedemail.com (Postfix) with ESMTP id C160F40008 for ; Tue, 22 Feb 2022 08:10:38 +0000 (UTC) Received: by mail-pg1-f182.google.com with SMTP id w37so10017122pga.7 for ; Tue, 22 Feb 2022 00:10:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=dLYMT+TbMwuVBEVL1LUh/1FaEDF3RiFVyuJ9ryG9pZQ=; b=gUBGwwJmZWECPNwfVmegNKWUeav98YrSGHoSxgfJA/X2xB0S4dUuFT/Cj0845cc3Uq UIsotgAA/bwX6PZeLkVO2Cba7onUIGg8Mh8a+1a9D2mYVvzp434EV/xS/ZhP/ux6fMlZ Oo95xBBf9/VHpTG5XqOc6u9EqOmG0y36W53WlNRuhJR6GIX/320WyGOgejnzg8jXobLq UhPi/duN116Svel90rbXIWYWRGeeIYs2my18Fdsm99xEnCuZgAixxW9gDflFXbQentrL L2DgN05hfdZd2K/q4Y4r+W2IdMRpJJpyMn9GSL2dlEFBUhmqkIo/9fYvuMijZzFWH282 jSLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=dLYMT+TbMwuVBEVL1LUh/1FaEDF3RiFVyuJ9ryG9pZQ=; b=ZJAgrJS6i8fZNwqZHUU4Qrb4x5AjAddf7/KSkjOPzKZGHelH6Js8OFY58K2XgH8+kt dStEEh2akIyeqg6Be7PmdKYSZXw97tr6qXORCLatK8BFWHnHvRVCfw5hT4jZFjKcSu2O AS0zkmIRljCRpMt2GYCWimUxalos/zclF1BXKiuk8p0h1bSyvlB0nktdX/xa9NcoS6FZ jlUnBNK/b2pmwtgTan8vpyDGVdegSbkvIrgt2DZCvWJ6PB03l57Qv2YH0lnXXoVaSbTz UK6z4heYuE1u5sO7vLxE1x+tlFq63ecX+EWpeW8Fmbdgkn3UPLM5crNMtS948ptILFSe L8DQ== X-Gm-Message-State: AOAM531/Vh1CzCZoGeIjQpgyR4Eaq1/6Rfv1QGfBw5owxCCW1XZ3abGG cr7BB+VDo2UnkGTsq/jCGLg= X-Google-Smtp-Source: ABdhPJwyJGpw6LufCqfBxI6fEupQpGufZ1VQiF9jqroL+pDp5EvzTwJhjlV5dsPSpCEsFPwVXiwGZw== X-Received: by 2002:a05:6a00:1a04:b0:4e1:786c:cce3 with SMTP id g4-20020a056a001a0400b004e1786ccce3mr23452111pfv.81.1645517437813; Tue, 22 Feb 2022 00:10:37 -0800 (PST) Received: from ip-172-31-19-208.ap-northeast-1.compute.internal (ec2-18-181-137-102.ap-northeast-1.compute.amazonaws.com. [18.181.137.102]) by smtp.gmail.com with ESMTPSA id p4sm20092924pgh.53.2022.02.22.00.10.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Feb 2022 00:10:37 -0800 (PST) Date: Tue, 22 Feb 2022 08:10:32 +0000 From: Hyeonggon Yoo <42.hyeyoo@gmail.com> To: Matthew Wilcox 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: X-Rspamd-Queue-Id: C160F40008 X-Stat-Signature: e4zreus6szisfwgm1anmjh6rquekcg5g X-Rspam-User: Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=gUBGwwJm; spf=pass (imf01.hostedemail.com: domain of 42.hyeyoo@gmail.com designates 209.85.215.182 as permitted sender) smtp.mailfrom=42.hyeyoo@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-Rspamd-Server: rspam05 X-HE-Tag: 1645517438-760934 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 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. Thanks, Hyeonggon