From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753330AbdEGXp3 (ORCPT ); Sun, 7 May 2017 19:45:29 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:35270 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751059AbdEGXp2 (ORCPT ); Sun, 7 May 2017 19:45:28 -0400 Date: Sun, 7 May 2017 15:00:30 +0200 From: Ingo Molnar To: Andy Lutomirski Cc: X86 ML , "linux-kernel@vger.kernel.org" , Borislav Petkov , Linus Torvalds , Andrew Morton , Mel Gorman , "linux-mm@kvack.org" Subject: Re: [RFC 00/10] x86 TLB flush cleanups, moving toward PCID support Message-ID: <20170507130030.tmoke7zsiz2iomsk@gmail.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Andy Lutomirski wrote: > As I've been working on polishing my PCID code, a major problem I've > encountered is that there are too many x86 TLB flushing code paths and > that they have too many inconsequential differences. The result was > that earlier versions of the PCID code were a colossal mess and very > difficult to understand. > > This series goes a long way toward cleaning up the mess. With all the > patches applied, there is a single function that contains the meat of > the code to flush the TLB on a given CPU, and all the tlb flushing > APIs call it for both local and remote CPUs. > > This series should only adversely affect the kernel in a couple of > minor ways: > > - It makes smp_mb() unconditional when flushing TLBs. We used to > use the TLB flush itself to mostly avoid smp_mb() on the initiating > CPU. > > - On UP kernels, we lose the dubious optimization of inlining nerfed > variants of all the TLB flush APIs. This bloats the kernel a tiny > bit, although it should increase performance, since the SMP > versions were better. > > Patch 10 in here is a little bit off topic. It's a cleanup that's > also needed before PCID can go in, but it's not directly about > TLB flushing. > > Thoughts? Looks really nifty! The diffstat alone appears to be worth it: 18 files changed, 334 insertions(+), 408 deletions(-) Will have a closer look next week. Thanks, Ingo