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 94BE7C433EF for ; Thu, 24 Feb 2022 13:31:59 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 04EBE8D0005; Thu, 24 Feb 2022 08:31:59 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id F3DA18D0001; Thu, 24 Feb 2022 08:31:58 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DDE8E8D0005; Thu, 24 Feb 2022 08:31:58 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0174.hostedemail.com [216.40.44.174]) by kanga.kvack.org (Postfix) with ESMTP id CA84B8D0001 for ; Thu, 24 Feb 2022 08:31:58 -0500 (EST) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 86CB3998F0 for ; Thu, 24 Feb 2022 13:31:58 +0000 (UTC) X-FDA: 79177761516.24.CFC5A1B Received: from mail-pf1-f180.google.com (mail-pf1-f180.google.com [209.85.210.180]) by imf15.hostedemail.com (Postfix) with ESMTP id F1967A0006 for ; Thu, 24 Feb 2022 13:31:57 +0000 (UTC) Received: by mail-pf1-f180.google.com with SMTP id l19so1886396pfu.2 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=a2ALe24nGfw888LnPRSkX6d0i7WC79G7arcap1NLJhKSinOyROs1SLJwSWqNMLcpHF FSkJqV8jLvVWocMCxXF8OvVN3jbE9o4lGjuO3Bm5XaZxkqo2Uw7OT2qcWMgF68/WKncL WQNiS4ZtrIA7kWmuysredjQfHEUwm6EvgDLQDJmQJlKAPIEOlIk5ranyY2VFRDJmezib oBGpAhz/5WpoM6VveYZkpk5FTQwRT6rwdiCY/hUS1SbB2zejjlVRE555wZhuSBMFxypT Mj1Q6tkzVt0v28FBHauFSXyGG9j+yfDRS7gX2ZHVbw56JTrFn1FxUnvYw6iD7pildXyr R0VA== X-Gm-Message-State: AOAM531xQYXN3D7dGj3ZwAmBR+iT3QnsG5Uxj4ykcfMJXG+p+kjGAYRG lCdQ0ILQSeCnlofv9CBytbE= X-Google-Smtp-Source: ABdhPJyJwrxYkxGuYUqzQh0P8T0d3Irzg87pct15JGOUsVd4Muoy4g6GUZ84E+A1ouGwDfgLhI4fbw== 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> Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=CMWX0MHQ; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf15.hostedemail.com: domain of 42.hyeyoo@gmail.com designates 209.85.210.180 as permitted sender) smtp.mailfrom=42.hyeyoo@gmail.com X-Rspam-User: X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: F1967A0006 X-Stat-Signature: 9whm4hkhpe4q8ktt34mnk4i6gasw4f13 X-HE-Tag: 1645709517-761866 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 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