Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp34763298rwd; Sun, 9 Jul 2023 20:06:49 -0700 (PDT) X-Google-Smtp-Source: APBJJlHOWL3GBae8OhigQ87PHIYrLPRPPRcQjFLTceraFtY4XMW8z8OVi9uzpSMHtBtfTXXK+Czi X-Received: by 2002:ac8:58ca:0:b0:403:9a00:2edb with SMTP id u10-20020ac858ca000000b004039a002edbmr12472416qta.47.1688958409644; Sun, 09 Jul 2023 20:06:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688958409; cv=none; d=google.com; s=arc-20160816; b=Abh0LEXU80lq07CGYVhgjWqulLQ1JbAgm422WKupvzCTQ6blwC4FeAeeAnNka632U/ h5iFurWgqHKgBAGnconVeSc7eaqlB+fVpUNvBWU2mYlrwuebSUTpbhOdjk3gvegkTMk5 u/GPNw8oPl0FlsDidVtIppBPtj8NA3WNSSIgNvSVSuU8emLMWs7evGCfqPGKKgQhmU5K q1cQytjSTWp1dXoOVNk7h8tGb67sXYnaejLhef+qPaxFa0ltqr1vtFqF7qvMOJhKSKDD Je1RxuTJOTa0ZtLgvh0x9gSN75+bsfHxoeT5+8OO+Y1WnsX3Lc3s1Q405M7knbLzTqyp frNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:date:dkim-signature; bh=z/IXbjfKuqXK0LkUSvyJlpVWtt+IDL+3mxWlVV+iCWs=; fh=TIrfR+kNFGMrw4/iW2/En9LQBJfXONg9+yfcGBkh2uI=; b=gayY0Pd55nr2k5FX+LooJ6SrOtGcOFyeER+MUWjj+Jr0eybtaK+ELH4yhBFZrTlstQ 0vPNjJQB5OXC5JycS9G+hcfEeXZ1H8xW6rIA7V/NW+1b2zP+RTymwKQYofu/HMlvX5R/ yHnnwEinM42KC+cIF9r2dvMtXZFME9Egfp57UEXpGkstO94GcuXjPKhTLfoFnJmA33Hc qpg1xUsAMK9nSJiGgnSHgJxdNLbvJugs3qI2DMQ75+TW9+E1H+4/uEVcuqb2zIICG6b0 8jtUp6CdkO9veWDq2n/7c0kpJM0fa5gP8Vy1bunld13Qf1YkIFGgCf4y6PQ7VFXp5RDj 9DBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=mRUT8n0E; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a38-20020a631a26000000b005577fd7efa2si8094706pga.444.2023.07.09.20.06.37; Sun, 09 Jul 2023 20:06:49 -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=@google.com header.s=20221208 header.b=mRUT8n0E; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230131AbjGJCkn (ORCPT + 99 others); Sun, 9 Jul 2023 22:40:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42232 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229766AbjGJCkm (ORCPT ); Sun, 9 Jul 2023 22:40:42 -0400 Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 917FCE1 for ; Sun, 9 Jul 2023 19:40:41 -0700 (PDT) Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-1b82afd519fso254505ad.1 for ; Sun, 09 Jul 2023 19:40:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1688956841; x=1691548841; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to; bh=z/IXbjfKuqXK0LkUSvyJlpVWtt+IDL+3mxWlVV+iCWs=; b=mRUT8n0EQoIJLjoyT3M/QgbW+yUQhTKEBK2l3R9zCHyVAVWDwrnKGjyZotnTUmr+H/ 6tZ7qCfuSVE/1lIOXyuAM8Ijwppj7m8QLe/Haxi4ypBo908hsu8zbIQ2D5TJGnnv7bPQ y/BBKVOMw3ETioMfZRgTB7WJ6c7QQiPNvGCrPNiq8fYz6UQucv1DnIHJSWGouajGWlUO 7ypAmKo2lGP/nplXlby+JRLJ6/AcXYVfy496QQJg52d3eemfbau3NxmPfs7iVffxGuT3 eGDGkCzTQkonpDA06mGAMVaMahduB/gIY0W8y7dR/hRvoZrldpSgOMOqIqST+RM09rPZ wwUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688956841; x=1691548841; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=z/IXbjfKuqXK0LkUSvyJlpVWtt+IDL+3mxWlVV+iCWs=; b=UwqGTkpQ1EldoZ0J71nac74Cr0h6mjsQZ93dxvOWKQJWneEV6IPgGqtG0pgDwfvS59 G6C3+FTPVYwS9b9N+i/ZxdYwUCkjMN25OqWbNmNHeylC/Wu6WvCaVOiRpxgGIaEKYEBf 4wOj+4u5+yEnMeqVAnazDu30y2CaoMtkDYwRY5wtuBm6v6KZhUUBiQPvZiOqYXez07IZ 1CCg6yoTW96CYySpOBeVl+s0t2csucJ2yaVSHdbKoNJS3YBZ94HjpVDjEssOvm3hy7Lt U4Xb5Ib33kmtaisIaY25m4MDfS6nTeRItWPmM0y0uPfCZBa2QkorFL/pSPgWmx9k3BXa sCsA== X-Gm-Message-State: ABy/qLYiMaMozruz3Px+cdx33CMhvgJ4W99VTOuVOyV1HX4f6XhtRDck LaJbSvDkC9y8DN6z93D1ZYVUwQ== X-Received: by 2002:a17:902:d482:b0:1b0:26c0:757d with SMTP id c2-20020a170902d48200b001b026c0757dmr364822plg.22.1688956840900; Sun, 09 Jul 2023 19:40:40 -0700 (PDT) Received: from [2620:0:1008:15:1612:3901:b423:457c] ([2620:0:1008:15:1612:3901:b423:457c]) by smtp.gmail.com with ESMTPSA id s18-20020a170902a51200b001b8a85489a3sm6912523plq.262.2023.07.09.19.40.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Jul 2023 19:40:40 -0700 (PDT) Date: Sun, 9 Jul 2023 19:40:39 -0700 (PDT) From: David Rientjes To: Julian Pidancet cc: Christoph Lameter , "Lameter, Christopher" , Pekka Enberg , Joonsoo Kim , Andrew Morton , Vlastimil Babka , Roman Gushchin , Hyeonggon Yoo <42.hyeyoo@gmail.com>, linux-mm@kvack.org, Jonathan Corbet , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Matthew Wilcox , Kees Cook , Rafael Aquini Subject: Re: [PATCH v2] mm/slub: disable slab merging in the default configuration In-Reply-To: <3bcfa538-4474-09b7-1812-b4260b09256a@google.com> Message-ID: <7b6b07b3-d8a1-b24f-1df2-bf6080bc5516@google.com> References: <20230629221910.359711-1-julian.pidancet@oracle.com> <38083ed2-333b-e245-44e4-2f355e4f9249@google.com> <8813897d-4a52-37a0-fe44-a9157716be9b@google.com> <17349901-df3a-494e-fa71-2584d92526b5@google.com> <3bcfa538-4474-09b7-1812-b4260b09256a@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=unavailable 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 Sun, 9 Jul 2023, David Rientjes wrote: > There are some substantial performance degradations, most notably > context_switch1_per_thread_ops which regressed ~21%. I'll need to repeat > that test to confirm it and can also try on cascadelake if it reproduces. > So the regression on skylake for will-it-scale appears to be real: LABEL | COUNT | MIN | MAX | MEAN | MEDIAN | STDDEV | DIRECTION ----------------------------------+-------+------------+------------+------------+------------+--------+------------ context_switch1_per_thread_ops | | | | | | | (A) v6.1.30 | 1 | 314507.000 | 314507.000 | 314507.000 | 314507.000 | 0 | (B) v6.1.30 slab_nomerge | 1 | 257403.000 | 257403.000 | 257403.000 | 257403.000 | 0 | !! REGRESSED !! | | -18.16% | -18.16% | -18.16% | -18.16% | --- | + is good but I can't reproduce this on cascadelake: LABEL | COUNT | MIN | MAX | MEAN | MEDIAN | STDDEV | DIRECTION ----------------------------------+-------+------------+------------+------------+------------+--------+------------ context_switch1_per_thread_ops | | | | | | | (A) v6.1.30 | 1 | 301128.000 | 301128.000 | 301128.000 | 301128.000 | 0 | (B) v6.1.30 slab_nomerge | 1 | 301282.000 | 301282.000 | 301282.000 | 301282.000 | 0 | | | +0.05% | +0.05% | +0.05% | +0.05% | --- | + is good So I'm a bit baffled at the moment. I'll try to dig deeper and see what slab caches this benchmark exercises that apparently no other benchmarks do. (I'm really hoping that the only way to recover this performance is by something like kmem_cache_create(SLAB_MERGE).)