Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp1819265pxp; Thu, 17 Mar 2022 18:15:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxRKchwbLaiwUZ7JWpYM/ltQ5P04uTxdRc01KaasiDdDswezO0d+z/Og0XKSrgEdWsxhZEw X-Received: by 2002:a17:90b:46d3:b0:1c6:ac97:71d with SMTP id jx19-20020a17090b46d300b001c6ac97071dmr1280182pjb.104.1647566143382; Thu, 17 Mar 2022 18:15:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647566143; cv=none; d=google.com; s=arc-20160816; b=gZR2N8ORGv5PEueA7zwek0PbTFSlliuz2MG9qI5azLHZ461/OVfm2TP3f5FD0n39K0 bfOnonzeBQaV9rp7RJS4vHY/dMkhisgv1huLy217HLeb4zdxALQ4SmNDPmQRe6/eeKe6 LYe5SSA0/tWYSS2UKeZ0OvU3xvoE1b/8IsRMnu2IyF0b8tBYyG9mWcCil7huCiOKrnyp tMtdDVn2cTEuKeuszUHlemFok63g90dkfaAU+qc5C3UOnOu2UeEL0DEKE13E7gEtXhTI kU7S4IOTJ8AwPTrE98RaEckLv69hhWN/kxlWRIGfo4pZlgToDOlyqcb1ZnLqy84wIqEv TvrQ== 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:subject :from:references:cc:to:content-language:user-agent:mime-version:date :message-id:dkim-signature; bh=b+bHqhcTbHTa+2J3RR7QzpFf+LgiUUEm5osWtO/MfIA=; b=j1JTKYJWXoHOlRYWTra1k+x1D/P6zrq9TM8hvyw1N3vmm8zSthRsf0ArzSBdA84aBQ vjE6JYIamvq2CnD7k1Mgfsn3QghVQ51ZPuK5Ht2KS2ZVs6PwxkZ0AVrLsMJUeHlgzBzV Y+VCRA1iV4JWubDaGeqmp4q45Egb6Vv2zLkx4w0dcRUY3SeaxPuCC1QKXhBtvRkW+f0p 0LI5wkQbaN1YNJctbh8gwyrpJ1t2+G+duVw7h9CRXfLN66mm91AIfLQ52QN33GvXyJdv CFZXZtb++j70hja+79YCX7u2j/5yxWKxMH8bzXMZM47vuKKDHROf2vWAUlkK/RXnXm9j nQ8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Qy3XOGIB; 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=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u18-20020a170902a61200b00153b31d9817si676995plq.536.2022.03.17.18.15.29; Thu, 17 Mar 2022 18:15:43 -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=@intel.com header.s=Intel header.b=Qy3XOGIB; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230381AbiCRARr (ORCPT + 99 others); Thu, 17 Mar 2022 20:17:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229441AbiCRARp (ORCPT ); Thu, 17 Mar 2022 20:17:45 -0400 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 13FA52C2762 for ; Thu, 17 Mar 2022 17:16:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1647562588; x=1679098588; h=message-id:date:mime-version:to:cc:references:from: subject:in-reply-to:content-transfer-encoding; bh=na3iWmZQcNakvcNrOYfMY8FuR11b8l0YzV4or8bGtXo=; b=Qy3XOGIB5p+CokVPWlvjqmA7B8RGBJg0OWkjYs9MQsAS79ANQMcwTJ+a JkgKU8bu58XUTJiGqpg2HUk529DXbgFR4MGIBtinO1RyUX/FqFeDPR/xV pYd3lzy55j388RaraNyc+DFw8eJdqjXDl90xK3+NcfN+kbicrMoXREodQ LbUpFpG2POCHIgXSuOGCfAjFzfwDvLoY4a6hIafpn4+AhblwBFQw20d1T yCR19gA3mxKYsSCQpG3uxNgdQuosqu3YhFK//+U0gaMj+Y1Mvr67XB1Ho gyJ+/pfyz7GPJ0yEIyVp2bAM4CCavXQnHH90wgyQWuAdkReTo1yg9UcPk w==; X-IronPort-AV: E=McAfee;i="6200,9189,10289"; a="256740617" X-IronPort-AV: E=Sophos;i="5.90,190,1643702400"; d="scan'208";a="256740617" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Mar 2022 17:16:27 -0700 X-IronPort-AV: E=Sophos;i="5.90,190,1643702400"; d="scan'208";a="715242207" Received: from dstanfie-mobl2.amr.corp.intel.com (HELO [10.212.178.19]) ([10.212.178.19]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Mar 2022 17:16:27 -0700 Message-ID: Date: Thu, 17 Mar 2022 17:16:18 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Content-Language: en-US To: Nadav Amit Cc: kernel test robot , Ingo Molnar , Dave Hansen , LKML , "lkp@lists.01.org" , "lkp@intel.com" , "ying.huang@intel.com" , "feng.tang@intel.com" , "zhengjun.xing@linux.intel.com" , "fengwei.yin@intel.com" , Andy Lutomirski References: <20220317090415.GE735@xsang-OptiPlex-9020> <3B958B13-75F0-4B81-B8CF-99CD140436EB@vmware.com> <96f9b880-876f-bf4d-8eb0-9ae8bbc8df6d@intel.com> From: Dave Hansen Subject: Re: [x86/mm/tlb] 6035152d8e: will-it-scale.per_thread_ops -13.2% regression In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.3 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_LOW,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE 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 3/17/22 13:32, Nadav Amit wrote: > I’m not married to this patch, but before a revert it would be good > to know why it even matters. I wonder whether you can confirm that > reverting the patch (without the rest of the series) even helps. If > it does, I’ll try to run some tests to understand what the heck is > going on. I went back and tested on a "Intel(R) Core(TM) i7-8086K CPU @ 4.00GHz" which is evidently a 6-core "Coffee Lake". It needs retpolines: > /sys/devices/system/cpu/vulnerabilities/spectre_v2:Mitigation: Full generic retpoline, IBPB: conditional, IBRS_FW, STIBP: conditional, RSB filling I ran the will-it-scale test: ./malloc1_threads -s 30 -t 12 and took the 30-second average "ops/sec" at the two commits: 4c1ba3923e:197876 6035152d8e:199367 +0.75% Where bigger is better. So, a small win, but probably mostly in the noise. The number of IPIs definitely went up, probably 3-4% to get that win. IPI costs go up the more threads you throw at it. The retpolines do too, though because you do *more* of them. Systems with no retpolines get hit harder by the IPI costs and have no upsides from removing the retpoline. So, we've got a small (<1%, possibly zero) win on the bulk of systems (which have retpolines). Newer, retpoline-free systems see a double-digit regression. The bigger the system, the bigger the regression (probably). I tend to think the bigger regression wins and we should probably revert the patch, or at least back out its behavior. Nadav, do you have some different data or a different take?