Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2578145rwl; Thu, 13 Apr 2023 08:13:15 -0700 (PDT) X-Google-Smtp-Source: AKy350YxDk4xSLOlJ0wDIFWLehpfODRO20IZnTWWR7/HQew8kUIvlMFLY+gf84BxyMBKsoOYYRb+ X-Received: by 2002:a05:6870:8287:b0:184:442a:96d2 with SMTP id q7-20020a056870828700b00184442a96d2mr1961757oae.54.1681398795204; Thu, 13 Apr 2023 08:13:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681398795; cv=none; d=google.com; s=arc-20160816; b=pUS4jBLo7qcNwmVMdFWGpr22Uyc1mop5+bjB6I1SUtcgMuT4UMCUR0Uc2rOdhpWn6+ s6dVgM1L0Q6htZtQfgQXF73B9b5gWWp6Gvr1MHd5g2qyWo5lLsR8mUW4QlDaUeY4lAyW afZTWuOkZMVYKRkRhLx7LDuunBn2LsEeF0hh2IIA3DK2PE298d8hlLrVQtUXKwumg9Ek WDHbRXeblP8/qHSEbs6mRaBatZ2HQoPsWyLfCa4KI8VdVE0Ss2Po3Ezsa6GX3yge8/fd eVSPo8jbfVrCDq0LzydPiw0WOwe2uUA/Fv0m9DhCZQWcA4nZLewKskVtjejc8QVGQ7Zq wSww== 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; bh=FifNccdD/Nc0TvA9u87JWJTps00upFTeYRYfBB+JR1c=; b=mxYF12G6/eO1mscHVdVBSccQX50ExYivxUkgXnv2VRv9Wrhgzwt6g7h0Ei8YAmZTGE gYHO3LJkHb8RIXWcpWrjOR8sKbXrRZFI5+Ok9PSqWcgzWuV+UBf8gZ2HJrubT2PPn+Dx bnJIx/EtwIflzpJxmLt8GZUVMTgswT06M4B2gkKoISpKqPOjE+N7hv00FhERoN3WPGer RItHKn6590bXaGpt1pz55DbbWlYdWJ+Ib67g4xsVcyRhmfYNEktFpESFIpg4te4859o2 h+Kq3jHrI4Puc2Rjb83Ir7G2TE19n0SZ79lBYMfjgQw56UG3WS/Rxb1TQz+vK1zzRI9O /oHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@efficios.com header.s=smtpout1 header.b="O/14wAR0"; 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=efficios.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z36-20020a056870d6a400b0017f7ed66926si1686620oap.272.2023.04.13.08.13.01; Thu, 13 Apr 2023 08:13:15 -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=@efficios.com header.s=smtpout1 header.b="O/14wAR0"; 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=efficios.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231475AbjDMPLV (ORCPT + 99 others); Thu, 13 Apr 2023 11:11:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60846 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231322AbjDMPLS (ORCPT ); Thu, 13 Apr 2023 11:11:18 -0400 Received: from smtpout.efficios.com (smtpout.efficios.com [167.114.26.122]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 99DD1A5E4 for ; Thu, 13 Apr 2023 08:11:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=efficios.com; s=smtpout1; t=1681398674; bh=gIeGr2QK7yXqx9+zy8LtKL96LEIhGVJJ5hb6SnKOjKQ=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=O/14wAR0ZBjZcbTKna+aedBTgS3To67poqnd/fxXJf7k/xIja9IIx+NVyubyY4oe+ /sIiMGlocweGuXMuuoJyIYXYAzLOHdmSMu5MxUrJNtUxpiWZvcWt3H2FItJI6OL8t0 IBISqRUkJzYqhLzbUwWUBakg/iwo0LrIRzQJcWBT1kR+fMRCAHUtj+hyY4u7aABur/ WFBqbFm4BNJhuhc53dbSYnGHZaMC3n5hDH2Z9Ew16ceu9nobjSS3VWG1c3eybYzYAZ rGdWSKYab7NaZpArjDLP92FWGmwSmCWCTbWX0JbqiBYO7UZoQyHiIYKbGSRxGiyojg 1Y4+0TQl60y7A== Received: from [172.16.0.188] (192-222-143-198.qc.cable.ebox.net [192.222.143.198]) by smtpout.efficios.com (Postfix) with ESMTPSA id 4Py31t1nwqzvRq; Thu, 13 Apr 2023 11:11:14 -0400 (EDT) Message-ID: <7c8e5b5c-2039-8477-1d79-61cd450da00c@efficios.com> Date: Thu, 13 Apr 2023 11:11:14 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [RFC PATCH v5] sched: Fix performance regression introduced by mm_cid To: Aaron Lu Cc: Peter Zijlstra , linux-kernel@vger.kernel.org, Olivier Dion , michael.christie@oracle.com References: <20230413140248.230479-1-mathieu.desnoyers@efficios.com> <20230413143744.GA221757@ziqianlu-desk2> Content-Language: en-US From: Mathieu Desnoyers In-Reply-To: <20230413143744.GA221757@ziqianlu-desk2> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,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-04-13 10:37, Aaron Lu wrote: > On Thu, Apr 13, 2023 at 10:02:48AM -0400, Mathieu Desnoyers wrote: >> Introduce per-mm/cpu current concurrency id (mm_cid) to fix a PostgreSQL >> sysbench regression reported by Aaron Lu. > > Initial test using postgres_sysbench showed the lock contention is gone :-) > Will check how it affects hackbench tomorrow. That's good news! Not unexpected though. One thing to look closely at is whether it's just that the qspinlocks are gone from the profiles but replaced by time spent in __mm_cid_get() due to cache-line bouncing of find-first-zero/test-and-set on the per-mm cid bitmap. But if both are really gone from the profiles, then it's really good news. Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. https://www.efficios.com