Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp12134756rwd; Fri, 23 Jun 2023 01:41:51 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6gvqwzFnBIratsZh1gJz618n8ye8csqUX4qxmBeB/T9rs4ssfTsXGxw5ZlBf+EZjVTWgsU X-Received: by 2002:a05:6a20:3d02:b0:121:f863:67f9 with SMTP id y2-20020a056a203d0200b00121f86367f9mr16791372pzi.18.1687509710898; Fri, 23 Jun 2023 01:41:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687509710; cv=none; d=google.com; s=arc-20160816; b=DGj4dgE2xsT06CaqiJe0K1WZUYkTj0orbWuRpEciuMyyolTl8i7YM6+QFw7UNMugFJ l3ilEZcolIqzbbTZjBPaOjPkdsyhPqx0gmpDB7m/QwFCAZaFbhQt0UmLNvAkTcbYz6BT 81Rzvr/fYZ54QhHxJWxleCoP2OOxWefAo782No42cQ9dbSYV7RGl4BmLxDCBajIEM3BC N0rLmcQEqZxtkhQ7pYF+jTUqrm4M0h2rZuK8S2mKtWgXz94Xy4MpWgXK32Z5CEccd4d0 c00lU1MPFBmt5MXOgIqjGxEAmmqvYiCzkNkHhYmVq9TWUMvxB4Rsd86cx2yPX+oRjUwn kOHQ== 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:dkim-signature :dkim-signature:date; bh=6HIEiQwq/tiP0YESCXeQonSoeZwDOLqCYGYuM4G0DQI=; b=NNYQr9UUlOjZ9ruGm/ZwMXo+SwIAbn+KKGrY8QfRfoWFars5watjNe7oEMobEqZwD4 fLpjYs1I62z++/7ST3gXnlQl4oLDkjitwmOz7Dg7/KgXnBJ3jro3PzwGPewA/oNAKt1w GqZ+IHsFgVaV92zpXwMeuoweCs+WTuJ/nmtqwLRyKSLEHsr67v64woOZeCM1E/A99hn6 P4KDribA5WmUWm8oLzA88yZrTd0yCNExIOsQgNu3TY3xKjduNC1x4GK0Bm7AAAIexvTJ XSlGys0LbuZQIc5wpDKy/W5GsIXVUi3TzaGm0RcCr2IA2pnYXXgSZXzf85xavLZaPVjb NI5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=3ekUUU7Z; dkim=neutral (no key) header.i=@linutronix.de; 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=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x7-20020aa79567000000b006569793597esi3695714pfq.316.2023.06.23.01.41.38; Fri, 23 Jun 2023 01:41:50 -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=@linutronix.de header.s=2020 header.b=3ekUUU7Z; dkim=neutral (no key) header.i=@linutronix.de; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231816AbjFWISC (ORCPT + 99 others); Fri, 23 Jun 2023 04:18:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55844 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230387AbjFWISB (ORCPT ); Fri, 23 Jun 2023 04:18:01 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E432DC; Fri, 23 Jun 2023 01:18:00 -0700 (PDT) Date: Fri, 23 Jun 2023 10:17:56 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1687508278; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=6HIEiQwq/tiP0YESCXeQonSoeZwDOLqCYGYuM4G0DQI=; b=3ekUUU7ZpkEtF97la18Ks6zNbqeqemw8Tw0ZA3E3KPFcxuSCXKMoIk29oTtaolRW+F764p qag5av8B5AGlBiAUKGsAGfrxAa1hZW66CyqbhytsYZwPwYmHNmZ9idYm8N1ZHo/EHAxw1b LF8yd/sl1WgcXBAI6DEtYssf0zhpT78GOTnupvIUytINDLWcIQKg4hVgO3d/ALr3iaxlaZ O+VyOiV4lVdByTlci/xbRSQMJlkpgYlDwRIWZCqarUTkZrFG+rX8Jsy8Z3HO7ZxgY5cJma q34oN4QlOTE633IP09/NSvB97QJGGWLFoWKplvFZaoC3123NGgj7RPaet/HFSQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1687508278; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=6HIEiQwq/tiP0YESCXeQonSoeZwDOLqCYGYuM4G0DQI=; b=RohMQUn73P2BpROh8L3N42/8g/wWP/dCmMA4QWkIOHlozfQSzucJjudWNjXDzP1hP58Z5m rL/His4MHkbGupDg== From: Sebastian Andrzej Siewior To: John Johansen 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 Subject: Re: [tip: sched/core] sched: Fix performance regression introduced by mm_cid Message-ID: <20230623081756.vVHIjkC9@linutronix.de> References: <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> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 2023-06-23 00:35:29 [-0700], John Johansen wrote: > > > 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. So none of the versions perform memory allocation/ deallocation in a preempt disabled section so it is fine from PREEMPT_RT point of view. Sebastian