From: Linus Torvalds <torvalds@linux-foundation.org> To: kernel test robot <oliver.sang@intel.com> Cc: David Howells <dhowells@redhat.com>, lkp@lists.01.org, kernel test robot <lkp@intel.com>, "Huang, Ying" <ying.huang@intel.com>, Feng Tang <feng.tang@intel.com>, zhengjun.xing@intel.com, Pavel Begunkov <asml.silence@gmail.com>, Matthew Wilcox <willy@infradead.org>, Jens Axboe <axboe@kernel.dk>, Alexander Viro <viro@zeniv.linux.org.uk>, linux-fsdevel <linux-fsdevel@vger.kernel.org>, linux-block <linux-block@vger.kernel.org>, Linux Kernel Mailing List <linux-kernel@vger.kernel.org> Subject: Re: [iov_iter] 9bd0e337c6: will-it-scale.per_process_ops -4.8% regression Date: Thu, 3 Dec 2020 09:47:04 -0800 [thread overview] Message-ID: <CAHk-=wif1iGLiqcsx1YdLS4tN01JuH-MV_oem0duHqskhDTY9A@mail.gmail.com> (raw) In-Reply-To: <20201203064536.GE27350@xsang-OptiPlex-9020> On Wed, Dec 2, 2020 at 10:31 PM kernel test robot <oliver.sang@intel.com> wrote: > > FYI, we noticed a -4.8% regression of will-it-scale.per_process_ops due to 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 ą 14% +0.3 0.87 ą 15% perf-profile.children.cycles-pp.__x86_retpoline_rax > 0.12 ą 14% +0.1 0.19 ą 14% perf-profile.self.cycles-pp.__x86_indirect_thunk_rax > 0.43 ą 14% +0.3 0.68 ą 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
WARNING: multiple messages have this Message-ID (diff)
From: Linus Torvalds <torvalds@linux-foundation.org> To: lkp@lists.01.org Subject: Re: [iov_iter] 9bd0e337c6: will-it-scale.per_process_ops -4.8% regression Date: Thu, 03 Dec 2020 09:47:04 -0800 [thread overview] Message-ID: <CAHk-=wif1iGLiqcsx1YdLS4tN01JuH-MV_oem0duHqskhDTY9A@mail.gmail.com> (raw) In-Reply-To: <20201203064536.GE27350@xsang-OptiPlex-9020> [-- Attachment #1: Type: text/plain, Size: 1374 bytes --] On Wed, Dec 2, 2020 at 10:31 PM kernel test robot <oliver.sang@intel.com> wrote: > > FYI, we noticed a -4.8% regression of will-it-scale.per_process_ops due to 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 ą 14% +0.3 0.87 ą 15% perf-profile.children.cycles-pp.__x86_retpoline_rax > 0.12 ą 14% +0.1 0.19 ą 14% perf-profile.self.cycles-pp.__x86_indirect_thunk_rax > 0.43 ą 14% +0.3 0.68 ą 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
next prev parent reply other threads:[~2020-12-03 17:48 UTC|newest] Thread overview: 63+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-11-21 14:13 [PATCH 00/29] RFC: iov_iter: Switch to using an ops table David Howells 2020-11-21 14:13 ` [PATCH 01/29] iov_iter: Switch to using a table of operations David Howells 2020-11-21 14:31 ` Pavel Begunkov 2020-11-23 23:21 ` Pavel Begunkov 2020-11-21 18:21 ` Linus Torvalds 2020-12-11 1:30 ` Al Viro 2020-11-22 13:33 ` David Howells 2020-11-22 13:58 ` David Laight 2020-11-22 19:22 ` Linus Torvalds 2020-11-22 22:34 ` David Laight 2020-11-22 22:46 ` David Laight 2020-11-23 8:05 ` Christoph Hellwig 2020-11-23 10:31 ` David Howells 2020-11-23 23:42 ` Pavel Begunkov 2020-11-24 12:50 ` David Howells 2020-11-24 15:30 ` Jens Axboe 2020-11-27 17:14 ` David Howells 2020-11-23 11:14 ` David Howells 2020-12-03 6:45 ` [iov_iter] 9bd0e337c6: will-it-scale.per_process_ops -4.8% regression kernel test robot 2020-12-03 6:45 ` kernel test robot 2020-12-03 17:47 ` Linus Torvalds [this message] 2020-12-03 17:47 ` Linus Torvalds 2020-12-03 17:50 ` Jens Axboe 2020-12-03 17:50 ` Jens Axboe 2020-12-04 11:50 ` David Howells 2020-12-04 11:50 ` David Howells 2020-12-04 11:51 ` David Howells 2020-12-04 11:51 ` David Howells 2020-12-07 13:10 ` Oliver Sang 2020-12-07 13:10 ` Oliver Sang 2020-12-07 13:20 ` David Howells 2020-12-07 13:20 ` David Howells 2020-11-21 14:13 ` [PATCH 02/29] iov_iter: Split copy_page_to_iter() David Howells 2020-11-21 14:13 ` [PATCH 03/29] iov_iter: Split iov_iter_fault_in_readable David Howells 2020-11-21 14:13 ` [PATCH 04/29] iov_iter: Split the iterate_and_advance() macro David Howells 2020-11-21 14:14 ` [PATCH 05/29] iov_iter: Split copy_to_iter() David Howells 2020-11-21 14:14 ` [PATCH 06/29] iov_iter: Split copy_mc_to_iter() David Howells 2020-11-21 14:14 ` [PATCH 07/29] iov_iter: Split copy_from_iter() David Howells 2020-11-21 14:14 ` [PATCH 08/29] iov_iter: Split the iterate_all_kinds() macro David Howells 2020-11-21 14:14 ` [PATCH 09/29] iov_iter: Split copy_from_iter_full() David Howells 2020-11-21 14:14 ` [PATCH 10/29] iov_iter: Split copy_from_iter_nocache() David Howells 2020-11-21 14:14 ` [PATCH 11/29] iov_iter: Split copy_from_iter_flushcache() David Howells 2020-11-21 14:14 ` [PATCH 12/29] iov_iter: Split copy_from_iter_full_nocache() David Howells 2020-11-21 14:15 ` [PATCH 13/29] iov_iter: Split copy_page_from_iter() David Howells 2020-11-21 14:15 ` [PATCH 14/29] iov_iter: Split iov_iter_zero() David Howells 2020-11-21 14:15 ` [PATCH 15/29] iov_iter: Split copy_from_user_atomic() David Howells 2020-11-21 14:15 ` [PATCH 16/29] iov_iter: Split iov_iter_advance() David Howells 2020-11-21 14:15 ` [PATCH 17/29] iov_iter: Split iov_iter_revert() David Howells 2020-11-21 14:15 ` [PATCH 18/29] iov_iter: Split iov_iter_single_seg_count() David Howells 2020-11-21 14:15 ` [PATCH 19/29] iov_iter: Split iov_iter_alignment() David Howells 2020-11-21 14:15 ` [PATCH 20/29] iov_iter: Split iov_iter_gap_alignment() David Howells 2020-11-21 14:16 ` [PATCH 21/29] iov_iter: Split iov_iter_get_pages() David Howells 2020-11-21 14:16 ` [PATCH 22/29] iov_iter: Split iov_iter_get_pages_alloc() David Howells 2020-11-21 14:16 ` [PATCH 23/29] iov_iter: Split csum_and_copy_from_iter() David Howells 2020-11-21 14:16 ` [PATCH 24/29] iov_iter: Split csum_and_copy_from_iter_full() David Howells 2020-11-21 14:16 ` [PATCH 25/29] iov_iter: Split csum_and_copy_to_iter() David Howells 2020-11-21 14:16 ` [PATCH 26/29] iov_iter: Split iov_iter_npages() David Howells 2020-11-21 14:16 ` [PATCH 27/29] iov_iter: Split dup_iter() David Howells 2020-11-21 14:17 ` [PATCH 28/29] iov_iter: Split iov_iter_for_each_range() David Howells 2020-11-21 14:17 ` [PATCH 29/29] iov_iter: Remove iterate_all_kinds() and iterate_and_advance() David Howells 2020-11-21 14:34 ` [PATCH 00/29] RFC: iov_iter: Switch to using an ops table Pavel Begunkov 2020-11-21 18:23 ` Linus Torvalds 2020-12-11 3:24 ` Matthew Wilcox
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to='CAHk-=wif1iGLiqcsx1YdLS4tN01JuH-MV_oem0duHqskhDTY9A@mail.gmail.com' \ --to=torvalds@linux-foundation.org \ --cc=asml.silence@gmail.com \ --cc=axboe@kernel.dk \ --cc=dhowells@redhat.com \ --cc=feng.tang@intel.com \ --cc=linux-block@vger.kernel.org \ --cc=linux-fsdevel@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=lkp@intel.com \ --cc=lkp@lists.01.org \ --cc=oliver.sang@intel.com \ --cc=viro@zeniv.linux.org.uk \ --cc=willy@infradead.org \ --cc=ying.huang@intel.com \ --cc=zhengjun.xing@intel.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.