Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp12077775rwd; Fri, 23 Jun 2023 00:42:25 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7Ii8z3U1b2MxRWk15tXERQYRfxsG33iAWAmofpRZmT2KbK1U8jqgvzHK2lxR7ebn0Lp0Dc X-Received: by 2002:a05:6a00:1881:b0:668:6eed:7c1e with SMTP id x1-20020a056a00188100b006686eed7c1emr13797209pfh.10.1687506145039; Fri, 23 Jun 2023 00:42:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687506145; cv=none; d=google.com; s=arc-20160816; b=xaZEMPqRrOhLDx2iv8X3/UCQ/rlHRciF7tWaMUWHLE5nxhgMUjvZJPqd1w7i/Ys5lO fV/070JMAyX1o9Em7mL4d6dHQuYPjzh7TCGkaCnTmj1bCWnzbGkwSoAGosVi+9DeRP4x yBfMsvCNTKAsBuduWfGY4NewqRrMW6Ro9XjpK/7LVZMs+ZYkFTFxf3Z0G2DCPGMX6oCf NBOVDE+CyLQTKt3UKwYF+pl9p6ZnOK9CuLNijLEBWNQM8S6pbZiB0/ZQmlF7doSx/ziB xCPtofqj9lgTE3OCPmu2r6YU9LG2zyJazJrOPV3YIzKBOEzT6FqBc4NzcL2joVQw+VAA 8etw== 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 :organization:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:dkim-signature; bh=bKhME4x6xiWH8kS9xyBkaY6hugmNKgepHlQQ2MHYY2c=; b=EpJ/rhf6or7kZ8ozZGYW5W9I1sx9ysyDWnZGwF/I4v/+1TcKmfBgLxc9cHCj44xZch ErIDfGRskGG/VP26NqKiAq8lafsNNXkyxFV/1NpMxXxEP0A48jbq/ZVyXXGpQ/p8ILjc sQygeRJT8kVPSUk6/WoBqaZz+kchihJxWS4OvLJO/cWd/ZTHquELJBtnHH/m8itJ5W+T UsBsp+Be1X8zgqf6ImtPz0zRLRS+I6v7TUBiJ6w/+tlxO1Eoyn8rTF9r+xoFLRLotWCU DNryt2WVS4O5cOGcQY3QK/ls2qvYFPJSVd9uzNScuhadvK7h7h7XBV7hKHDLQ35FQKL4 c6yQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=bkvTi4fD; 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=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l2-20020a63be02000000b0055390839e3dsi3769787pgf.528.2023.06.23.00.42.13; Fri, 23 Jun 2023 00:42: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=@canonical.com header.s=20210705 header.b=bkvTi4fD; 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=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231253AbjFWHfi (ORCPT + 99 others); Fri, 23 Jun 2023 03:35:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34352 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230009AbjFWHfh (ORCPT ); Fri, 23 Jun 2023 03:35:37 -0400 Received: from smtp-relay-canonical-0.canonical.com (smtp-relay-canonical-0.canonical.com [185.125.188.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 012C7195; Fri, 23 Jun 2023 00:35:35 -0700 (PDT) Received: from [192.168.192.83] (unknown [50.47.134.245]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by smtp-relay-canonical-0.canonical.com (Postfix) with ESMTPSA id 993973F038; Fri, 23 Jun 2023 07:35:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1687505734; bh=bKhME4x6xiWH8kS9xyBkaY6hugmNKgepHlQQ2MHYY2c=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=bkvTi4fDtVrzGxPgZhQoYFws4ul5LKb3XZvqKX2PjwzI2Yw4mCgf3X7vY04yQ+XdF 4yVkhJPvnhIHfsUoVT8QlCBZzXQb9LlvrVe+haC5T6DFZr+OJUbf+0MtCbXaxLf5Yl u6E+tOCyEMMTOLh1QjHmNCxE79tWyg5petDJ+/9Y40xl9NfTvT1AE2KEnBVPvrrTyw tNz4noVSc1tWilRFCjn3AO6DRCC4levw+WaSbGQm7xvtMN7joONSUtBmVTdmkJmba+ SmjfyZisipmXCBV44N+DPSk0h7/iM91lZnqBBepziIPt/10YR3fhNMpakg6y5xkWkF QA5pP8R6HT11Q== Message-ID: Date: Fri, 23 Jun 2023 00:35:29 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [tip: sched/core] sched: Fix performance regression introduced by mm_cid Content-Language: en-US To: Sebastian Andrzej Siewior Cc: Mathieu Desnoyers , Swapnil Sapkal , Peter Zijlstra , linux-kernel@vger.kernel.org, linux-tip-commits@vger.kernel.org, Aaron Lu , x86@kernel.org, Andrew Morton , Thomas Gleixner References: <168214940343.404.10896712987516429042.tip-bot2@tip-bot2> <09e0f469-a3f7-62ef-75a1-e64cec2dcfc5@amd.com> <20230620091139.GZ4253@hirez.programming.kicks-ass.net> <44428f1e-ca2c-466f-952f-d5ad33f12073@amd.com> <3e9eaed6-4708-9e58-c80d-143760d6b23a@efficios.com> <6c693e3b-b941-9acf-6821-179e7a7fe2b8@efficios.com> <20230623063726.ejuc6v9D@linutronix.de> From: John Johansen Organization: Canonical In-Reply-To: <20230623063726.ejuc6v9D@linutronix.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED 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 On 6/22/23 23:37, Sebastian Andrzej Siewior wrote: > On 2023-06-21 16:59:31 [-0700], John Johansen wrote: >>> Which turned a per-cpu cache into a global memory pool protected by a spinlock. It may benefit RT, but it does not appear to be so great at scaling. >>> >> it is not. And I have a patch that needs some more formal testing for some stats. >> Ubuntu pulled it in last cycle so it has gotten a fair bit of use and is looking good >> on that end. There are probably some tweaks that can be done to improve it. The >> backoff in particular is something that has mostly been adjusted in response to some >> basic benchmarking. >> >> anyways patch below >> >> commit e057e9b47f1749882ea0efb4427d6b9671c761ab > > I think I've been looking at this patch, or a former version of it, and > it looked good. > iirc the difference with the earlier version, is in the put case. Where in the earlier version, if there was lock contention the buffer would always get pushed onto the percpu list. With some debug patches on top we saw some degenerate cases where this would result in percpu lists that had excessive buffers on them. So this version added a condition to force putting the buffer back in to the global pool if the percpu list already has 2 buffers cached on it.