From: Nadav Amit <namit@vmware.com>
To: Dave Hansen <dave.hansen@linux.intel.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
kernel test robot <oliver.sang@intel.com>,
Ingo Molnar <mingo@kernel.org>, Andy Lutomirski <luto@kernel.org>,
Peter Zijlstra <peterz@infradead.org>, X86 ML <x86@kernel.org>
Subject: Re: [PATCH] x86/mm/tlb: Revert retpoline avoidance approach
Date: Sat, 19 Mar 2022 07:28:54 +0000 [thread overview]
Message-ID: <C0EED8ED-3F11-48E0-A7E7-5EC016563E43@vmware.com> (raw)
In-Reply-To: <D2017D89-2DE1-4DEB-BF5C-9A124D5C7905@vmware.com>
> On Mar 19, 2022, at 12:20 AM, Nadav Amit <namit@vmware.com> wrote:
>
>
>> On Mar 18, 2022, at 9:33 AM, Dave Hansen <dave.hansen@linux.intel.com> wrote:
>>
>> ⚠ External Email: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender.
>>
>> 0day reported a regression on a microbenchmark which is intended to
>> stress the TLB flushing path:
>>
>> https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.kernel.org%2Fall%2F20220317090415.GE735%40xsang-OptiPlex-9020%2F&data=04%7C01%7Cnamit%40vmware.com%7C4a2c382b5ef44105474308da08fd0c7f%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C637832180178751497%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=TA0iATQCnfDjIZ1lG3YdhjMZjelXrVatBjBE8Hz3AfE%3D&reserved=0
>>
>> It pointed at a commit from Nadav which intended to remove retpoline
>> overhead in the TLB flushing path by taking the 'cond'-ition in
>> on_each_cpu_cond_mask(), pre-calculating it, and incorporating it into
>> 'cpumask'. That allowed the code to use a bunch of earlier direct
>> calls instead of later indirect calls that need a retpoline.
>>
>> But, in practice, threads can go idle (and into lazy TLB mode where
>> they don't need to flush their TLB) between the early and late calls.
>> It works in this direction and not in the other because TLB-flushing
>> threads tend to hold mmap_lock for write. Contention on that lock
>> causes threads to _go_ idle right in this early/late window.
>>
>
> Acked-by: Nadav Amit <namit@vmware.com>
>
Dave,
Note that your SOB has a wrong email address (intel.cm).
I noticed only because my mail server complained about wrong email
address in the recipient list…
prev parent reply other threads:[~2022-03-19 7:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-18 16:33 Dave Hansen
2022-03-19 7:20 ` Nadav Amit
2022-03-19 7:28 ` Nadav Amit [this message]
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=C0EED8ED-3F11-48E0-A7E7-5EC016563E43@vmware.com \
--to=namit@vmware.com \
--cc=dave.hansen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@kernel.org \
--cc=oliver.sang@intel.com \
--cc=peterz@infradead.org \
--cc=x86@kernel.org \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®