Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp676543pxu; Thu, 3 Dec 2020 09:52:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJx6m38+L8BhecZ4q+4szU5TkppglE/VlurMUgcXAgdkyk/D/VHcVB2aHrNrIHWiQJPNUvhH X-Received: by 2002:a50:e846:: with SMTP id k6mr3987439edn.245.1607017956534; Thu, 03 Dec 2020 09:52:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607017956; cv=none; d=google.com; s=arc-20160816; b=wqY1ntQB6b807QEXCEk1SxU4RvMXOl5UUss3+3SDXNKMTikOYWzE2UHGT8kJZaYA3t CogW/jDX4vRRB0CMEqzCBEraeNeSomN0PegTtHB/JIc8KlvqlBNw0R2pnfgVoZ/eCYJK cuoY7CUKuUFJNgoMWQLqODmu3efKFEq5q1CwGcSrWo4/HsekZEqtCS6bvs5gSZ6WxKqo 4BgswWwZfi5TbQizGrkdiFmgu8NPnHH2HNCT2jrcgypUb1Yjp7tF0zlEngOBouvj3U7a sEuNSDdfK4xKSniIhRIVqz9d27UXoozGRlpJN8dKtVgT4JJPfbBsL1CEPWPK43ccahL6 /gaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=+/34BW6LzHF6hZqDfON22QZfOwULMcJz5mgoFc2n/kU=; b=rg+vpiFnq13CeVBHTuObabflc8c4LVhFLcvK7C8DAR0NOWL8Px4gwHB8b+J44F83rC tF8TmfVQtu8SI+IL56dXvyVe6kgr9kCQWqhooUR+V6FhdDqten5AyxFtjoWjNsdtqpHz Iy8of5kqg1GjfPLdIWcK0Z9ruD5LrM5WgUfMK+jFoofC8SFYvwWwxpIyUK99feA5wInb Sd3g1Pa0HWvCW+XOSQx2euFFYnOg55zVa5o2hJxXv4wi2+4ZLPo0a3lBIcfzwD30LwbB 7N8aaKOx28N/CQDrjV1NLNXCH6QyyLTqUWl1kTdz8VSNMTZObZL2vVFK7XSLUcUeOhlM P39A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=MsWsYuKN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id de20si1390636edb.171.2020.12.03.09.52.13; Thu, 03 Dec 2020 09:52:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=MsWsYuKN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731186AbgLCRsG (ORCPT + 99 others); Thu, 3 Dec 2020 12:48:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729117AbgLCRsF (ORCPT ); Thu, 3 Dec 2020 12:48:05 -0500 Received: from mail-lf1-x141.google.com (mail-lf1-x141.google.com [IPv6:2a00:1450:4864:20::141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ACAE7C061A51 for ; Thu, 3 Dec 2020 09:47:24 -0800 (PST) Received: by mail-lf1-x141.google.com with SMTP id q13so3954503lfr.10 for ; Thu, 03 Dec 2020 09:47:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=+/34BW6LzHF6hZqDfON22QZfOwULMcJz5mgoFc2n/kU=; b=MsWsYuKNvKACORS8E1s6T8larMX8mUsiP9GStx4+PH4R/8GKanJ7dmyxFt2sOejpvg lJYFBzL5o8xNmk+X0wFulbuSDXgwNrOaXIagjg37+KIoGO9/xwvWN9Ycq3yYVYbgnQ/Z 53K8yeK7Vith5UFq1DQvSKASmjvGeDSn3t91g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=+/34BW6LzHF6hZqDfON22QZfOwULMcJz5mgoFc2n/kU=; b=SkDCRf4xIDHHJXJD1VnVfYjZ+RW9Vxm/NMg9tYUQ3pVaUwF+Mh1brVgs69lMWNb4nB NIGLS7fRMaJlz/hCFa813dqeB6wguJdigd+d2fYil6e847VT7v5r5i2wlGXYanEeYTvE od18Dw/XCgDv/7gSPZKvsJzOkHOTTFA6K4x/q354QL+TI2MR/eF01c4WzSMJz7JWks7d NsIAymBvKudx2M4BcuoXzh3FGSPz6S1W+rBEYfVTSc+au1SvDPsGKxN+3ow9O4iWB9Ac Skwz1INnz+HIyz+lxgNQjMIxdvrfcYzbqVFr710nxL42gfrs2LqaFSw10LRx27ABPrwC nx4A== X-Gm-Message-State: AOAM53145SW5vfvop9cUrOrUvNH6n1TtDbiv44eAu/uMBwNtJ52+KvL4 gC8Xrwm4HQ851EqxO4gz3MC944h7o2B+vg== X-Received: by 2002:a19:2489:: with SMTP id k131mr1714115lfk.459.1607017642616; Thu, 03 Dec 2020 09:47:22 -0800 (PST) Received: from mail-lf1-f52.google.com (mail-lf1-f52.google.com. [209.85.167.52]) by smtp.gmail.com with ESMTPSA id d28sm748020lfm.201.2020.12.03.09.47.20 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 03 Dec 2020 09:47:21 -0800 (PST) Received: by mail-lf1-f52.google.com with SMTP id s27so3970119lfp.5 for ; Thu, 03 Dec 2020 09:47:20 -0800 (PST) X-Received: by 2002:a19:f243:: with SMTP id d3mr1702463lfk.534.1607017640414; Thu, 03 Dec 2020 09:47:20 -0800 (PST) MIME-Version: 1.0 References: <160596801020.154728.15935034745159191564.stgit@warthog.procyon.org.uk> <20201203064536.GE27350@xsang-OptiPlex-9020> In-Reply-To: <20201203064536.GE27350@xsang-OptiPlex-9020> From: Linus Torvalds Date: Thu, 3 Dec 2020 09:47:04 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [iov_iter] 9bd0e337c6: will-it-scale.per_process_ops -4.8% regression To: kernel test robot Cc: David Howells , lkp@lists.01.org, kernel test robot , "Huang, Ying" , Feng Tang , zhengjun.xing@intel.com, Pavel Begunkov , Matthew Wilcox , Jens Axboe , Alexander Viro , linux-fsdevel , linux-block , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 2, 2020 at 10:31 PM kernel test robot w= rote: > > FYI, we noticed a -4.8% regression of will-it-scale.per_process_ops due t= o commit: Ok, I guess that's bigger than expected, but the profile data does show how bad the indirect branches are. There's both a "direct" cost of them: > 0.55 =C4=85 14% +0.3 0.87 =C4=85 15% perf-profile.chil= dren.cycles-pp.__x86_retpoline_rax > 0.12 =C4=85 14% +0.1 0.19 =C4=85 14% perf-profile.self= .cycles-pp.__x86_indirect_thunk_rax > 0.43 =C4=85 14% +0.3 0.68 =C4=85 15% perf-profile.self= .cycles-pp.__x86_retpoline_rax The actual retpoline profile costs themselves do not add up to 4%, but I think that's because the indirect costs are higher, because the branch mis-predicts will basically make everything run slower for a while as the OoO engine needs to restart. So the global cost then shows up in CPU and branch miss stats, where the IPC goes down (which is the same thing as saying that CPI goes up): > 1.741e+08 +42.3% 2.476e+08 perf-stat.i.branch-misses > 0.74 -3.9% 0.71 perf-stat.overall.ipc > 1.35 +4.1% 1.41 perf-stat.overall.cpi which is why it ends up being so costly even if the retpoline overhead itself is "only" just under 1%. Linus