Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp677343rwl; Wed, 12 Apr 2023 02:26:20 -0700 (PDT) X-Google-Smtp-Source: AKy350ZbUHdlvL5LaVQ7//PSiruzb27ikTVygt9Jlmun3eEN9RJ2BGjtNHbO6Jwzb6+MpLpdBuOt X-Received: by 2002:a05:6a20:1452:b0:bf:58d1:ce94 with SMTP id a18-20020a056a20145200b000bf58d1ce94mr2408954pzi.19.1681291580648; Wed, 12 Apr 2023 02:26:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681291580; cv=none; d=google.com; s=arc-20160816; b=VQXQyRlX+WVbI7LwekxWzMiZrZVs3WpCZyzn9rq6VUFlTujuy03KLH0rNTB6EDe4Jz omiLr0ydDXXF7epYiVW7SJ5f1B8y8WWmoibFer3cVnMgM3YS4LO97o3dMvJzCaCRoR5q v4BJ2nuQKHX8jIa+fF0Vhq2ZDz/gn5PUZJsx5ftcQz7VQGSAFNW6FMrXzvDyPzFOGd6C 2WiYLl/JcqM3ECCv71snfLHsJQQqT18sI0ueIy0NYb0semm3p0d21k5I6n9Ie5nhRHGD GbUJVwpZDugI0BuRf+uvLYsb0v5dpVvZfA1tT2JAZqcSJgr1ywYX4IJZVkWSy9vpmV47 NSOw== 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:date:dkim-signature; bh=kKoJwXlhArXuG3T+T6H/sNM7MQOlvhRBun0jHnQGmmU=; b=td+2lJb9SdkKhSeJuF071hpu6FnQB5wBoWZP21n3tRgDQEMhN+wEV6M5v48olnoWzy rTZdK6wZW5GXgabazd2VhFs171AuWc7py7RKNbn4VYqq6RQwAuPAtJE4CZep3oEZDfj7 PyVHpPwWjoZfPe+yNTqUgCNz98ZfvztgqP15IawbBXdF3QJDNK18MgI1mp6F0txHksdE aBxWYuMfK6Z+bXlDTLmNxWrBOclYGvno2KBSuIygL/WgshEfzdhFyQpvkfEnNn5umlgv zbS8OC6VBF8twtVTdJ+PkwhuRshMt6Iio/TRlYIfNhWUNZy5UPCYavfDdwqiEpadgHmj rmGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=adOZUmuE; 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 v202-20020a6361d3000000b00518c9f4263fsi10372290pgb.468.2023.04.12.02.26.06; Wed, 12 Apr 2023 02:26:20 -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=@infradead.org header.s=casper.20170209 header.b=adOZUmuE; 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 S229699AbjDLJLE (ORCPT + 99 others); Wed, 12 Apr 2023 05:11:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229735AbjDLJLC (ORCPT ); Wed, 12 Apr 2023 05:11:02 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2733DA9 for ; Wed, 12 Apr 2023 02:10:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=kKoJwXlhArXuG3T+T6H/sNM7MQOlvhRBun0jHnQGmmU=; b=adOZUmuEHIzETlCIOJpQxYwllc NMPWxvoAG2vBKJynoqdApqtwzzgnq+ReqliBNCbe9ASskRoodp69ilogD2P+CnK4btFxWBmVjKkaM 88lDrFqekqa1Vd8ks5SLnA8CJmFjqN/PqMw/Fw0bDBm2zygv6ostJoAqn+joEoBx/merYc0LPJiDo IZZojhruFjoGkQOQ7naXIZo3+gJgL7oF1oNfcCTnoQ3xhAIohCG2h9AyexmUK/uF22NHUuH7H3jge lPy+EYqWkS1Ta6LxLt/aLY0E1pNfqvZuTfdqUouKwmUMGx+gdKYTztuvSrFQenKQNgIVcc+pjH2Lb +Lb64LxA==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1pmWV3-006j2J-2V; Wed, 12 Apr 2023 09:10:45 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 52120300274; Wed, 12 Apr 2023 11:10:43 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 0B6B025E5A392; Wed, 12 Apr 2023 11:10:43 +0200 (CEST) Date: Wed, 12 Apr 2023 11:10:43 +0200 From: Peter Zijlstra To: Aaron Lu Cc: Mathieu Desnoyers , linux-kernel@vger.kernel.org, Olivier Dion , michael.christie@oracle.com Subject: Re: [RFC PATCH v4] sched: Fix performance regression introduced by mm_cid Message-ID: <20230412091043.GC4253@hirez.programming.kicks-ass.net> References: <20230410150150.2179062-1-mathieu.desnoyers@efficios.com> <20230411045225.GA3509@ziqianlu-desk2> <20230411131221.GA7356@ziqianlu-desk2> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230411131221.GA7356@ziqianlu-desk2> 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_NONE,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 Tue, Apr 11, 2023 at 09:12:21PM +0800, Aaron Lu wrote: > Forget about this "v4 is better than v2 and v3" part, my later test > showed the contention can also rise to around 18% for v4. So while I can reproduce the initial regression on a HSW-EX system (4*18*2) and get lovely things like: 34.47%--schedule_hrtimeout_range_clock schedule | --34.42%--__schedule | |--31.86%--_raw_spin_lock | | | --31.65%--native_queued_spin_lock_slowpath | --0.72%--dequeue_task_fair | --0.60%--dequeue_entity On a --threads=144 run; it is completely gone when I use v4: 6.92%--__schedule | |--2.16%--dequeue_task_fair | | | --1.69%--dequeue_entity | | | |--0.61%--update_load_avg | | | --0.54%--update_curr | |--1.30%--pick_next_task_fair | | | --0.54%--set_next_entity | |--0.77%--psi_task_switch | --0.69%--switch_mm_irqs_off :-(