Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp1304922rdb; Mon, 2 Oct 2023 05:54:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFjPCiwcRrcPs6si/38NsDCN4epe2CnQ3z/Ez7+gNNtl5GzrSkZqtmNrbYfAprn0amIMzZI X-Received: by 2002:a17:902:f687:b0:1c7:47f4:7c86 with SMTP id l7-20020a170902f68700b001c747f47c86mr13975657plg.15.1696251290733; Mon, 02 Oct 2023 05:54:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696251290; cv=none; d=google.com; s=arc-20160816; b=N7Ej9YOnktC6nBhwtzPzHFjHni4giiDv6c8OsOn+FuGSogw4f9/LOdT+apxP653rK6 B8KvlZy96IdrIUbLkif9DWYBRCgfanm2tFq9BZ3PDTPH7XYQfpcSWEp6R0auccmUbtfJ QtKU5PShzCbdjF80cJE7zM5zzHY5ZHIfGSLVm5y5Cnan+3387hRjM3PHbXJGFHvUQ53F pHuCAS7Y2i7ZRYvgvudhUSp/+MWXmHoLvM97Woked8CCXBQuRdcD1l1DHO3JIbSGztjt 5SgrVXmx1uwUpmeT6h8srXtt6K241pSgcN1MFkBmBwixl0Wfznts7mqhY/fTCVNCcQHD LWzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature:dkim-signature; bh=D3WQVSuM8f1XKbYHPZOprGX2nORQUomt4Hm5zfLQyVg=; fh=VghAL7JMx8JsxvK7XFk95jqwu7Hazjj3q3ozt6P2jGw=; b=xRDLfNX7L1PKYuQHDEPGSlcPpbmfXHroK09LJ8G5mQavY/dWUgw7oOMUo3yeuFIbVQ UKs3CB8fI0BokCSv28wkaPaH+ei6UqXt8MAn77iGRI7wdgdl7YJ0Wita1bmIKnvwJLB4 e4aucJKrPupX29i/vOlAc+vu+RN39Upv6QKX0bGbBQJePfS3eXqNARwCKIf8evicxGgM ZDu1ZcPaXH0s5qPUJU+J3RlwbNA9BB4x11QXsavtU5/68lE2iZ67x4tbWkXfE9UJmKZd cPpHOzlTN0YeA6r4M++FIGbujY3OhYLbcE8rvPSKzUFws6CxvtsmvV1sofAYMVscvgh7 hvVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=Z7smfT6g; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=iiVZps1K; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id w12-20020a170902e88c00b001c76e9f12a3si2847533plg.575.2023.10.02.05.54.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 05:54:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=Z7smfT6g; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=iiVZps1K; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (Postfix) with ESMTP id 4A3D68085F91; Mon, 2 Oct 2023 05:38:40 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237137AbjJBMii (ORCPT + 99 others); Mon, 2 Oct 2023 08:38:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54748 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237062AbjJBMig (ORCPT ); Mon, 2 Oct 2023 08:38:36 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BCD1983 for ; Mon, 2 Oct 2023 05:38:33 -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 71A89211C3; Mon, 2 Oct 2023 12:38:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1696250312; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=D3WQVSuM8f1XKbYHPZOprGX2nORQUomt4Hm5zfLQyVg=; b=Z7smfT6g59C4upjye0xt6u0/aK1cLq9ILbqv5RwmfJnLc2dAvUoFFrgZzeK7ynfLDzH7RX 0ErjM0PVt0nknn1mUeXOdWO+ee0SXt9MnZfRyRDvqnfBLYd7q/NI852F9w4tTHCG9mYGr4 naepL3oSC9E9AZr7MQ+jNzJyEHaZSvc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1696250312; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=D3WQVSuM8f1XKbYHPZOprGX2nORQUomt4Hm5zfLQyVg=; b=iiVZps1Ki1Eb1u/undkL7t8OFyhHIfHeRIFXaSuEWWbJN7ylxqW2VrrgMU6fJySMg5Iovz RIYjDuwniXAWqaBw== 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 4703F13434; Mon, 2 Oct 2023 12:38:32 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 70lyEMi5GmWgKwAAMHmgww (envelope-from ); Mon, 02 Oct 2023 12:38:32 +0000 Message-ID: <6db4338b-279e-acc6-9e95-17e0f2716f0c@suse.cz> Date: Mon, 2 Oct 2023 14:38:31 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH 0/4] SLUB: calculate_order() cleanups To: jaypatel@linux.ibm.com, David Rientjes , Christoph Lameter , Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Roman Gushchin , Pekka Enberg , Joonsoo Kim , linux-mm@kvack.org, patches@lists.linux.dev, linux-kernel@vger.kernel.org References: <20230908145302.30320-6-vbabka@suse.cz> <5c933e2b06ab9090d9190bac41ebbc175b0a9357.camel@linux.ibm.com> Content-Language: en-US From: Vlastimil Babka In-Reply-To: <5c933e2b06ab9090d9190bac41ebbc175b0a9357.camel@linux.ibm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_SOFTFAIL 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Mon, 02 Oct 2023 05:38:40 -0700 (PDT) On 9/28/23 06:46, Jay Patel wrote: > On Fri, 2023-09-08 at 16:53 +0200, Vlastimil Babka wrote: >> Since reviewing recent patches made me finally dig into these >> functions >> in details for the first time, I've also noticed some opportunities >> for >> cleanups that should make them simpler and also deliver more >> consistent >> results for some corner case object sizes (probably not seen in >> practice). Thus patch 3 can increase slab orders somewhere, but only >> in >> the way that was already intended. Otherwise it's almost no >> functional >> changes. >> > Hi Vlastimil, Hi, Jay! > This cleanup patchset looks promising. > I've conducted test > on PowerPC with 16 CPUs and a 64K page size, and here are the results. > > S > lub Memory Usage > > +-------------------+--------+------------+ > | | Normal | With Patch | > +-------------------+--------+------------+ > | Total Slub Memory | 476992 | 478464 | > | Wastage | 431 | 451 | > +-------------------+--------+------------+ > > Also, I have not detected any changes in the page order for slub caches > across all objects with 64K page size. As expected. Which should mean any benchmark differences should be noise and not caused by the patches. > Hackbench Results > > +-------+----+---------+------------+----------+ > | > | | Normal | With Patch | | > +-------+----+---------+----- > -------+----------+ > | Amean | 1 | 1.1530 | 1.1347 | ( 1.59%) | > | > Amean | 4 | 3.9220 | 3.8240 | ( 2.50%) | > | Amean | 7 | 6.7943 | > 6.6300 | ( 2.42%) | > | Amean | 12 | 11.7067 | 11.4423 | ( 2.26%) | > | Amean | 21 | 20.6617 | 20.1680 | ( 2.39%) | > | Amean | 30 | 29.4200 > | 28.6460 | ( 2.63%) | > | Amean | 48 | 47.2797 | 46.2820 | ( 2.11%) > | > | Amean | 64 | 63.4680 | 62.1813 | ( 2.03%) | > +-------+----+------ > ---+------------+----------+ > > > Reviewed-by: Jay Patel > > Tested-by: Jay Patel Thanks! Applied your Reviewed-and-tested-by: > Th > ank You > Jay Patel >> Vlastimil Babka (4): >> mm/slub: simplify the last resort slab order calculation >> mm/slub: remove min_objects loop from calculate_order() >> mm/slub: attempt to find layouts up to 1/2 waste in >> calculate_order() >> mm/slub: refactor calculate_order() and calc_slab_order() >> >> mm/slub.c | 63 ++++++++++++++++++++++++----------------------------- >> -- >> 1 file changed, 27 insertions(+), 36 deletions(-) >> >