Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp13311098rwb; Sun, 27 Nov 2022 03:45:01 -0800 (PST) X-Google-Smtp-Source: AA0mqf7fp6YHV5ms3nx3cKHpH/AjUsZz8cgPcd0XSGU/71TGZG6kmHSci7+HMYeUXflsDra7JweR X-Received: by 2002:a63:d18:0:b0:46e:b0e3:ee46 with SMTP id c24-20020a630d18000000b0046eb0e3ee46mr22678056pgl.622.1669549501177; Sun, 27 Nov 2022 03:45:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669549501; cv=none; d=google.com; s=arc-20160816; b=osA4cHB/jIKg+8f3+HAAjeUI7BEQ3KLD/Fyexzd/2jtMiU+vdtHLqHUwsYRIJk6tg2 txZQOHU8sXhdhzjF+fsGerH1wVsntB1e4rTdTls1T4RkpZCxw6vYtR0nNqnWBGgSSMUi 84VXEx+WOea+1+/sYm5AcBQofQi2xEZyYb60rYpPk5Kn7eNsUx0hOZZKPm45ff/rHQTT Q6y+1KojEQzJ0AL3eFKG8a9+KVQYodY6BsGwpz6xqV2w64bb+z7mAiZu3SFZhZKGYCAe t6SlHDiv/CFSU0fjlE5538+6i+KpAM6qWupW9VEY6j066LKuyJeYL2vGtIa7Q9a7puYE dYQg== 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=Yktw0YNbfJViRzOBK1z1I3DiZx0Xo+QXXrahApjTukw=; b=M4GK+rdPqu/laUKwNYhiOlvW8X6BVCL2AAEJPX+xkGGjGexTZ/sUedMFCkQqcFRUrq OM4ykNN337Xd24UM8+0EVL/yPL4NlKk9hZlSLRuO7s13DJGIQyameJsAX/JQpiSFQ6F2 R8Gg47gT1iw9YD/UmLyqyKSsCZVsWWjYnn/g8NuXeWpV3r6BnhFy1IhObP+Tg7fRtHfX JUy7zuZmcIw+HFjlmzsBZzt5kn2dT14rFc949MZdAkvQITi0zC7pXobMA1feFYQ0G82L cEJq2zmdMXl8Is1lVPN3qyOeBV4YLmEfwJwTN4IHUtEsm+vKcb3xkGsdaTUYfQpXn0/8 RqRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=dsfe0IZy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o12-20020a056a0015cc00b0057509d0411esi2557338pfu.192.2022.11.27.03.44.50; Sun, 27 Nov 2022 03:45:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=dsfe0IZy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229597AbiK0LGD (ORCPT + 84 others); Sun, 27 Nov 2022 06:06:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229569AbiK0LGA (ORCPT ); Sun, 27 Nov 2022 06:06:00 -0500 Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4CB111837 for ; Sun, 27 Nov 2022 03:05:59 -0800 (PST) Received: by mail-pf1-x42a.google.com with SMTP id w79so7952349pfc.2 for ; Sun, 27 Nov 2022 03:05:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=Yktw0YNbfJViRzOBK1z1I3DiZx0Xo+QXXrahApjTukw=; b=dsfe0IZycca1vKvPwH0+SS5PnahlyMoY18LuHqrV4rMcpk9V74A+jred7IP/Ms4NAD 4S1o7vIrooX8tyVA6iDKcoYDosvFFcTSN6xS7wTYh+BQfBKKG33oAqJAQJ3zHhs5EGiz y7CNB3c2+7nu4yvVXyiU/AgxeXwwSuKq9BcbSSQo8crxcTFLwNFaSaM0ws4LIuwC9unC xLYSuNmDlkTwurv3fwqsOL+9r25NcgJHB4JucUtMmBeON+IMitFWRD8CVO460c3yLn1B DyZvxxl0ibCIwOJwwKyKkxxKYJhWueM02jw6I+PtVf7/PFmqgtXjZhTmM5m4QVO89upz PkQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Yktw0YNbfJViRzOBK1z1I3DiZx0Xo+QXXrahApjTukw=; b=8JWeCp7cP8ZfRys7X7S8On4TDAS7YcKiyvtROVev2y+huyOmEGgAcBM80QWAiN/Edl nR8Ir/ohJjwInkPboF3rI9ltEvRNgDfWr4KdFABp2z/kIHwFIXxrEHNU4dIxZ4tiaxfP lv6G/GC1LUcHNO3zTZQbVK2p01iRtLGnmE2XJ6IVGOCFrRTOiRRuUZx/qjIUm1Sxkli8 707K9e+nHmLpPPorcwX4jjdh+Gs7HI7h39A/wqDtQRCSyYUMn9K/R2if3iiKxZ54EOc/ R1l+kRxGW7kaWUCY8YjSnv00fAEGKn9MTeAYCY5pTTq2CfDSKyj0zBJhGATVZXvwVuZk 3Klw== X-Gm-Message-State: ANoB5pmjc5THhDnnvdtf9Ne4DUnczIguC65WAvJT07LxQyereY9e36B1 rgGTvI6UeZOmwAN+s30vwCE= X-Received: by 2002:a62:605:0:b0:574:ec7f:20d0 with SMTP id 5-20020a620605000000b00574ec7f20d0mr5952033pfg.77.1669547159386; Sun, 27 Nov 2022 03:05:59 -0800 (PST) Received: from hyeyoo ([114.29.91.56]) by smtp.gmail.com with ESMTPSA id x4-20020a170902ec8400b00186b04776b0sm6680417plg.118.2022.11.27.03.05.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Nov 2022 03:05:58 -0800 (PST) Date: Sun, 27 Nov 2022 20:05:52 +0900 From: Hyeonggon Yoo <42.hyeyoo@gmail.com> To: Vlastimil Babka Cc: Christoph Lameter , David Rientjes , Joonsoo Kim , Pekka Enberg , Roman Gushchin , Andrew Morton , Linus Torvalds , Matthew Wilcox , patches@lists.linux.dev, Dennis Zhou , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 10/12] mm, slub: remove percpu slabs with CONFIG_SLUB_TINY Message-ID: References: <20221121171202.22080-1-vbabka@suse.cz> <20221121171202.22080-11-vbabka@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221121171202.22080-11-vbabka@suse.cz> X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HK_RANDOM_ENVFROM, HK_RANDOM_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 Mon, Nov 21, 2022 at 06:12:00PM +0100, Vlastimil Babka wrote: > SLUB gets most of its scalability by percpu slabs. However for > CONFIG_SLUB_TINY the goal is minimal memory overhead, not scalability. > Thus, #ifdef out the whole kmem_cache_cpu percpu structure and > associated code. Additionally to the slab page savings, this reduces > percpu allocator usage, and code size. [+Cc Dennis] Wondering if we can reduce (or zero) early reservation of percpu area when #if !defined(CONFIG_SLUB) || defined(CONFIG_SLUB_TINY)? > This change builds on recent commit c7323a5ad078 ("mm/slub: restrict > sysfs validation to debug caches and make it safe"), as caches with > enabled debugging also avoid percpu slabs and all allocations and > freeing ends up working with the partial list. With a bit more > refactoring by the preceding patches, use the same code paths with > CONFIG_SLUB_TINY. > > Signed-off-by: Vlastimil Babka -- Thanks, Hyeonggon