Received: by 2002:ac8:5491:0:b0:40f:fb00:664b with SMTP id h17csp636034qtq; Thu, 10 Aug 2023 11:12:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE6Hz4B1Ji5IV95XZtuNc6h09/gBrVSb0IVG5E8LemNWduXE5MgmUmQSywewSw9/cg6QejS X-Received: by 2002:a05:6a20:7f84:b0:13e:9dba:ea43 with SMTP id d4-20020a056a207f8400b0013e9dbaea43mr3121743pzj.2.1691691145813; Thu, 10 Aug 2023 11:12:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691691145; cv=none; d=google.com; s=arc-20160816; b=A5bYkjc+UN3Yt+aFzgw1U68EGyKx+Y5Zr7mb+EdglWVxuwaYWL+obz/9nGLlKeMQGS xznXzFnS7B7RuVjEloca8EP8IuX21sqP2shc7ObSjDS0o1AALMADZbzN7CzF8ppIiWLb 2SX9UhDn23InM3lCzLux8qp+LVyNNGDtkLPOQh8RtLgRkoRgtGIatrHkT8FRz3kWCUjg beBJw+f98Ui7Ic+5T8zqKGJm8P2Ftu9/zwnPNClwNi1SS0PiEUPX0KP2SIezbYO7goMa FkT1g9euH87/Huw1UYoJrxJzoEt2qo1IdW1vj0BoTl6vf2ZuyAwwMTtmZ6JxaUHEvx1u RTow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=a3DtkVdLGQHDYk90N/OXEPjHa8PNLxLzj/qp7wDJMuQ=; fh=2pBnSfjX50e7Wv5klf1T27fGwt6nBz7bVyyBTq15zE4=; b=Tgob0mk0AQXYmM82SMEevCcTiurPLKY6SbGUFoIyn128BRo7q+obWn000oScTomMPY fcokquEtuHr452eo8w3a1Cjk4Y2gWYbv5xFb9+8Zu6JvQHpFZQDRVOvqTaBwOo10Bv/a l1p3ak20cFvzJ+E7plqYfWo74soElC6R7x4rLCAGj0B2k9BYREjxBsmlt3eUuVkgPoFb ClfuGFs89vPbzJrYnL7Qmw3bd166W/Lqnb0Sp5AM5iE5a0otOi44tTyiHkiZnuXj/dcn E4BLxpKNbvlgZGDZDdpHRVVs+fv5oxHcNsxhWm51c4Hh5XdmhyYdYpVHG75MdicO2luv ifqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=izuGpZjT; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s7-20020a634507000000b0056546b5fef6si1939368pga.231.2023.08.10.11.12.12; Thu, 10 Aug 2023 11:12:25 -0700 (PDT) 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=@suse.cz header.s=susede2_rsa header.b=izuGpZjT; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235326AbjHJQgl (ORCPT + 99 others); Thu, 10 Aug 2023 12:36:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234754AbjHJQge (ORCPT ); Thu, 10 Aug 2023 12:36:34 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 726E1C5 for ; Thu, 10 Aug 2023 09:36:34 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id F036821878; Thu, 10 Aug 2023 16:36:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1691685392; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=a3DtkVdLGQHDYk90N/OXEPjHa8PNLxLzj/qp7wDJMuQ=; b=izuGpZjTDaa1X7FM+8xTm5XGp80s21t8mw95pR1CYB5uPp0dA8c+tZ0jgOTQBfSnlPUZXc vQiMiGKsA7yQKGOWxzUA/EX95/ge5PmBAW/5TI6OTaJmg4IENCoK0N2z6vsWBJv2ji8loT oEXgrJoEYRtt2UOfw5uspqh2z5YapbY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1691685392; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=a3DtkVdLGQHDYk90N/OXEPjHa8PNLxLzj/qp7wDJMuQ=; b=p6eqWXON9YDd4m3Wr/OaVX58a9pQHfuB4SGI9tgsmckkAANRrz+0BOIX9nWMdm6L9jpBej SEImetYJhoV2wgAQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id C432F139D1; Thu, 10 Aug 2023 16:36:32 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id IMZJLxAS1WSEPQAAMHmgww (envelope-from ); Thu, 10 Aug 2023 16:36:32 +0000 From: Vlastimil Babka To: "Liam R. Howlett" , Matthew Wilcox , Suren Baghdasaryan , Christoph Lameter , David Rientjes , Pekka Enberg , Joonsoo Kim Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com>, Roman Gushchin , linux-mm@kvack.org, linux-kernel@vger.kernel.org, patches@lists.linux.dev, Vlastimil Babka Subject: [RFC v2 3/7] maple_tree: use slub percpu array Date: Thu, 10 Aug 2023 18:36:31 +0200 Message-ID: <20230810163627.6206-12-vbabka@suse.cz> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230810163627.6206-9-vbabka@suse.cz> References: <20230810163627.6206-9-vbabka@suse.cz> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 Just make sure the maple_node_cache has a percpu array of size 32. Will break with CONFIG_SLAB. --- lib/maple_tree.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/maple_tree.c b/lib/maple_tree.c index 4dd73cf936a6..1196d0a17f03 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -6180,9 +6180,16 @@ bool mas_nomem(struct ma_state *mas, gfp_t gfp) void __init maple_tree_init(void) { + int ret; + maple_node_cache = kmem_cache_create("maple_node", sizeof(struct maple_node), sizeof(struct maple_node), - SLAB_PANIC, NULL); + SLAB_PANIC | SLAB_NO_MERGE, NULL); + + ret = kmem_cache_setup_percpu_array(maple_node_cache, 32); + + if (ret) + pr_warn("error %d creating percpu_array for maple_node_cache\n", ret); } /** -- 2.41.0