Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1734245pxm; Thu, 24 Feb 2022 08:24:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJw09zrHC2xMH7vI2HvrpqSVLynUn8qd5dvg9288LQ7AyhXszt5016xZS5v7D1//4qeokGAP X-Received: by 2002:a63:7781:0:b0:372:ba7b:c894 with SMTP id s123-20020a637781000000b00372ba7bc894mr2844716pgc.458.1645719846554; Thu, 24 Feb 2022 08:24:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645719846; cv=none; d=google.com; s=arc-20160816; b=bAP0iT/hVmfTjE+dPKAzDq5AUwLoFnJ8EAczmcgvWF+5JsYZSGtUWEB2EmSx8Vp7tt X+xUAhjh80tot3OrldR1kVn+grFUGeKGkBGpFyUPJEwZmxmg9M3OS7c2bjsTn0rrXB/G ukdaOc27NRbbKtdP6PkHQd6gz2BoHGJBR5IRcAHaQCLl0A8GpajvFvHWGBvnpFtqUNGQ OTLy3WHtgM4cFDWzOF3W8KmI7pbt9Oc2dLJSPTsw+g7jbzVJpwKGsNTzs/otPtfP32XF qAjmHQNDD5+/atwQTEyvLFp3WdYShHQpV0vGn6MaOkPu14KkefOmGniRXbEia4RYHv6L zdSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=vB1qPinuIx5GJjxM9OclEcDCM4HkOuUdI7J7QIrR8QM=; b=DKkw7p5BJSY9D4mTXMZGKkDf3pSTJ9yg0MbagAUlcz2bexg6OkMmyDJ0BMFrDvwbPI TAOPoQTAG21ETQ9SR1zEL+skZWSyCF93hSmPlq/Nlw3Zv5aNps8A1/+4ohynxZ9R2YOt C0+526kVXy6qp71AGqDUOOtoNjkoo8iZnCj9Av/sO2ece7AipZjriCpaZFTEIwHYo77E hR8Yvun4aOKXDzd9qAIUA0FlOJ+InF9NN3OGOeEA18tZcuILZTsbSxHSqWPsOWv1x3gH yBiuiU9GqF6x3NFeOBvpH2zHvz6ErYsspx03UJeC7adqQ1hhFXlY1vzbGikzBSs6Ksxb 6pIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=CMWX0MHQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id t190si2691887pgc.341.2022.02.24.08.24.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Feb 2022 08:24:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=CMWX0MHQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8EB1F18CC40; Thu, 24 Feb 2022 08:14:07 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234994AbiBXNck (ORCPT + 99 others); Thu, 24 Feb 2022 08:32:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235006AbiBXNcd (ORCPT ); Thu, 24 Feb 2022 08:32:33 -0500 Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C33B354F8C for ; Thu, 24 Feb 2022 05:31:57 -0800 (PST) Received: by mail-pf1-x430.google.com with SMTP id u16so1850772pfg.12 for ; Thu, 24 Feb 2022 05:31:57 -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=vB1qPinuIx5GJjxM9OclEcDCM4HkOuUdI7J7QIrR8QM=; b=CMWX0MHQCq61Rcj3Lh1fYx6ag2pjCyHBbAm3PFhe8VuNHoL4dmtuRGbuoEkThL3SLs /CZAsggglroair2/MduxqDWQIqBnmYYEojzVncOpv9ZLaA06+XaNo8CMJr/ZDwKGevNi OPrU1ZsR15gYoyDeMerIHUzqjy0fKD5EWJsHLaKAFr0YrURkU35895YhEBeCHOWZWM/F j965QZkZWovbjAZkxMaEInABShRIzQzyoQmrDd1O0WUIV6Ih1Puc+sVpJj+h/a2tHvS+ Hsz9K8gtVF/9yFbK1kxfdJCJ5MoM776lDhCoyh1lidRmpz/mSQq6ya0rMp9HNui6rFBE B4EQ== 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=vB1qPinuIx5GJjxM9OclEcDCM4HkOuUdI7J7QIrR8QM=; b=3qtoJBJgn5IFFMS9+wFAw8tZf/2vr5EZd39s0BehhtOJNbTOIzlVBiCzHOKmtw7Tc/ yFYoSSxV7Kan4nCzjsTptM3QM24n9nPDg3YmXNxf5EvEydAW59AJy2YUiEbzQbavRlNi q4zvbGEiGL7F1fM3NDRjwNDatLHmXO5I9yL7wO/b38ZbBaNbdln3DOOcQWhjyBcE7qNm eOZ1sczTe2P/1+xVthFN0DCWCN9wLkxTPeuWs9gSKpnq8l7LrzyaUaLgJZR+8Hp3ZHfi glJQJONQ8dodR/kUZ2FdwV4JTIBA9Di5KSMlQBnA6Xc3nWNXRem/pHOINQFuLge/O9HL +LsQ== X-Gm-Message-State: AOAM533ChE/tDsgMkMjEo1VxcZpZvKGVVtbNwFffvqgVu3tqk41ceDFM Tvf6xHJDcPokRpDk0V3KDHg= X-Received: by 2002:a65:4348:0:b0:375:9840:b064 with SMTP id k8-20020a654348000000b003759840b064mr1083683pgq.270.1645709516842; Thu, 24 Feb 2022 05:31:56 -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 q1sm3404717pfs.112.2022.02.24.05.31.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Feb 2022 05:31:56 -0800 (PST) Date: Thu, 24 Feb 2022 13:31:51 +0000 From: Hyeonggon Yoo <42.hyeyoo@gmail.com> To: Vlastimil Babka Cc: linux-mm@kvack.org, Roman Gushchin , Andrew Morton , linux-kernel@vger.kernel.org, Joonsoo Kim , David Rientjes , Christoph Lameter , Pekka Enberg , Matthew Wilcox 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> <8915b858-b46d-0acd-bebd-80a0c9882a7e@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8915b858-b46d-0acd-bebd-80a0c9882a7e@suse.cz> X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HK_RANDOM_FROM,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 24, 2022 at 01:48:47PM +0100, Vlastimil Babka wrote: > On 2/21/22 11:53, 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. > > AFAICS this issue is limited to build-time constant sizes. Might be better > to make this a build error rather than build-time NULL? Right. And sounds better. But what about another direction as Matthew said: passing large requests to page allocator like SLUB? I think it's better for maintenance. Any obstacles for this direction? Thank you! > > Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> -- Hyeonggon