Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4876478rdh; Wed, 29 Nov 2023 13:21:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IEEV3wehIh2Q5R095niDsaT8Ej2xUassjEY8pSAW2dtObApOism/XrYEJmf+Hyhn1NlZPLD X-Received: by 2002:a05:6a20:5502:b0:18b:2710:d729 with SMTP id ko2-20020a056a20550200b0018b2710d729mr15720372pzb.31.1701292867186; Wed, 29 Nov 2023 13:21:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701292867; cv=none; d=google.com; s=arc-20160816; b=yg0GaqixWcsDxYt/POVtr3c9dKsN6BHMe0A8M6ML6vOpsh616E2b6sWmduF+EgueSc pZH1GNFPoJKRM0VofGigayy1Acn+Io8LdnxuwHvSD/Z3EkT/jbDc2yqcM1r/zciZzLI0 tvuyVoo0p4F0+OfRWVbuhcck5MjjaT7hiTsJ380J9mQS9FDLyzWYgmbelPEIXxe+5VFK gO0But1e+jCgX1ZfBPnTtgIJ78BqtYZqQJrmnzOMN9g9XIcP/Xef9YgwBGuUWOsOt5Ri iMBRVMVWDuAACXqr9iXW1q7il+wVHEiA0IfF/2Bo2Fr7O2v3Wwml7OLpuct6GXRCkv3W 4sCw== 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=snbaImfv3zlormUNSdyLXEJtHqS0syGmg48S3ZeIobc=; fh=sfyFUDc2Yxxc7p69NEOsj8/pSFZtRk/Y39NPcEotCLs=; b=EfQ26Nre4IWwGCl+fzUNTcZzAmMPQkn4KZrPHKgT2ihuDzUvQMki3QJL/IgebYtAig gd8Hw7JBezmuTCQ+r8YKbE6ZCQt1DWRZXWhbtxvRhIUGnAnzNFamgPo8wi9/yMqAuAHp L2d/7vvLtXMBUcXC+zibsRXOk5XXbL93GfcRssDqvBgXKUgvqC/+dKAfCDcnKTiqLYb5 2IHROFndk+lTHHIZSUMdArxhtDxtyG5vVKEqCWyFfvFKINuHG+mQgqIdJTmfwnp8pcpd yr84A85ZsUxACJrT2tp+Ok9Kr8uP0zf7UqsPBSHtzXG3Vzb1UqH+TQvsgpPapiPTsROt zWjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="Trk/qX+6"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id y16-20020a056a00191000b006cbeff5ae49si14161351pfi.3.2023.11.29.13.21.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 13:21:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="Trk/qX+6"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id A56E680AC369; Wed, 29 Nov 2023 13:20:57 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234196AbjK2VUj (ORCPT + 99 others); Wed, 29 Nov 2023 16:20:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40454 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229941AbjK2VUi (ORCPT ); Wed, 29 Nov 2023 16:20:38 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF4E410DB for ; Wed, 29 Nov 2023 13:20:40 -0800 (PST) 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=snbaImfv3zlormUNSdyLXEJtHqS0syGmg48S3ZeIobc=; b=Trk/qX+6KUWoedcteU9LE/hnH5 Hat6hae4Rg2zFyMNluwy2WNp+EZqrL0Ch4RpT6m/04u4PVnbx/q0YkObKt+r2uOq95KQHpMjUuduM Ac6lKR+C4O8pLAfEu2sZjZCupkxHzY0TU8LDwSu23fvgo02b0zS9Kiv//i44dIFdrOJ8qNph3vnEx SjCLb2Vq6ryo7VXYqkxU8g7Kk+fsdvEExQNuDZ108RqbXdN2ejU0KOFoiMYgaxfzmxyBFf8HinvOw NOraHyXRg3RdaR/Q8FCye3m7CbTjL+rDchu0L7d27uB6gxokLkm4es8hr8XqiqKKvefBPgkF0criY U3sY2eMA==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1r8Rye-00Dm4H-GD; Wed, 29 Nov 2023 21:20:12 +0000 Date: Wed, 29 Nov 2023 21:20:12 +0000 From: Matthew Wilcox To: "Christoph Lameter (Ampere)" Cc: Vlastimil Babka , Pekka Enberg , David Rientjes , Joonsoo Kim , "Liam R. Howlett" , Andrew Morton , Roman Gushchin , Hyeonggon Yoo <42.hyeyoo@gmail.com>, Alexander Potapenko , Marco Elver , Dmitry Vyukov , linux-mm@kvack.org, linux-kernel@vger.kernel.org, maple-tree@lists.infradead.org, kasan-dev@googlegroups.com Subject: Re: [PATCH RFC v3 0/9] SLUB percpu array caches and maple tree nodes Message-ID: References: <20231129-slub-percpu-caches-v3-0-6bcf536772bc@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Wed, 29 Nov 2023 13:20:57 -0800 (PST) On Wed, Nov 29, 2023 at 12:16:17PM -0800, Christoph Lameter (Ampere) wrote: > Percpu arrays require the code to handle individual objects. Handling > freelists in partial SLABS means that numerous objects can be handled at > once by handling the pointer to the list of objects. That works great until you hit degenerate cases like having one or two free objects per slab. Users have hit these cases and complained about them. Arrays are much cheaper than lists, around 10x in my testing. > In order to make the SLUB in page freelists work better you need to have > larger freelist and that comes with larger page sizes. I.e. boot with > slub_min_order=5 or so to increase performance. That comes with its own problems, of course. > Also this means increasing TLB pressure. The in page freelists of SLUB cause > objects from the same page be served. The SLAB queueing approach > results in objects being mixed from any address and thus neighboring objects > may require more TLB entries. Is that still a concern for modern CPUs? We're using 1GB TLB entries these days, and there are usually thousands of TLB entries. This feels like more of a concern for a 90s era CPU.