Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752931AbdLEXFA (ORCPT ); Tue, 5 Dec 2017 18:05:00 -0500 Received: from g2t2353.austin.hpe.com ([15.233.44.26]:30469 "EHLO g2t2353.austin.hpe.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752387AbdLEXEy (ORCPT ); Tue, 5 Dec 2017 18:04:54 -0500 X-Greylist: delayed 6892 seconds by postgrey-1.27 at vger.kernel.org; Tue, 05 Dec 2017 18:04:54 EST Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=abanman@hpe.com; Subject: Re: [PATCH 5/9] x86/uv: Use the right tlbflush API To: Peter Zijlstra CC: , , Linus Torvalds , Andy Lutomirsky , Dave Hansen , Borislav Petkov , Greg KH , , , Brian Gerst , Josh Poimboeuf , Denys Vlasenko , Rik van Riel , Boris Ostrovsky , Juergen Gross , David Laight , Eduardo Valentin , , Will Deacon , , Dave Hansen , Ingo Molnar , , , Borislav Petkov , , , Mike Travis References: <20171205123444.990868007@infradead.org> <20171205123820.134563117@infradead.org> <5aed7d7f-b093-b65c-403e-46bdbcf9bc5a@hpe.com> <20171205212727.GU3165@worktop.lehotels.local> From: Andrew Banman Message-ID: Date: Tue, 5 Dec 2017 17:04:44 -0600 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20171205212727.GU3165@worktop.lehotels.local> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [71.220.37.79] X-ClientProxiedBy: BN6PR03CA0093.namprd03.prod.outlook.com (2603:10b6:405:6f::31) To TU4PR8401MB0366.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:7709::16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: ebd8e5e3-a233-444f-6e55-08d53c3496ed X-Microsoft-Antispam: UriScan:(222181515654134);BCL:0;PCL:0;RULEID:(4534020)(4602075)(4627115)(8989060)(201703031133081)(201702281549075)(8990040)(48565401081)(5600026)(4604075)(2017052603286);SRVR:TU4PR8401MB0366; X-Microsoft-Exchange-Diagnostics: 1;TU4PR8401MB0366;3:WdYiHriomwg18LGMevb3he5u2+ItFFkjEhDXYC97Sisg/ZZyX9FD0FtXHtd7fl7/xmQvQBcj3+8tTw/GKEXOdaenw7RqmboR52j3nSIDsGN+bzVv0LAacUURpG/9OuCQIur2JJBh3nDeL3Jgmxu6aJY63Pv5YMxju9kxQTa14HG429q8Oco03ZPQpC5PMIVib/XQV3/lYGvvekk6ROR7/Bd9smaWqG2vGAadaabUGn/8AYzR7G4O4LXu2PEAYYCUETZJWz0yP681sYkLhc1QaxPJVajJc2Hb4xumWE30EjU=;25:9C/OcDALydz3QdiVxnlmOO/gGKjWVns4qtm707+Izn+DPAslQuMJXGPD9VN38S5uvBSiKvdeMJme0RRRU5UfQotdZg5TiudRXvPdV7YxtFQQucRq4MTX86c21Am7Pzv+ApFUkf4h/ZMtSNbSN8Qf/44KV8xgQniHYTY8t4CrddGCwl2MxV2Ud5DbKNVbpfAnBLyA+P+Byf2TwjB4QfKJYZ0syDVJCt/I2AiNVQ/F8bulVG414TI9VAd//axkxw9xXgcc3/4r59k3wE/gdhlIY5h9iTMQ88BwOxkoodHj8oZFTRfD7MGlOLlyO9fU9HyhtEmMv6tTFRf8E+3MZi0FBA==;31:QLcqzjMDdLRlTrt83pBBxXGvp3+E96F/tcBTaaI+Kk5icYEcI1Lg+ecBeqX6utZR5p4DgCzp9c8rrl2AAdx5TDEPVKv8Xbla/Twu/pdzFfaP5iZw8FlfJ7hCJ7MYzcs4P5kXUfFMW9TmSLCgTABOcm63VwFVDndBdGD+eqCXujVfw+vUvYYuBnmGfjJsP9mQc9WmL63LvNnsANmFxazCUm8W2asQEeV8Unkz2FfOeCU= X-MS-TrafficTypeDiagnostic: TU4PR8401MB0366: X-LD-Processed: 105b2061-b669-4b31-92ac-24d304d195dc,ExtAddr X-Microsoft-Exchange-Diagnostics: 1;TU4PR8401MB0366;20:Cf+eNz/zYex32wvQlG8Bk8YWcq3T4pBA0ueReGvkTpqdUlfRU9HX/KSAmcLCLTSXldTv0H39UqNEA2oXsJ+ee+J+Zg7V5eHZunVzK5xKjY8JaX9B+yIlWveuEZSR91ChgRGDrAwMm/RmHqbUct2etJmhtoDWirfHQehFZyX9lXtTDO4x1fhyeBPw2eYXgA/NB4DCOI+XkF4Kb/lKhxGgAPCN+XYjXwPk6u1TAGinZWmBwBsxp3nRF6VQYtJlmu/L4yAwC046wz4ZnrPHL8yXQYrmWlkJoCt0JX5XKftKfPeENktbNuUmI9881GicNzggDXbGYM6PR2JPJPneWa3KSR9aqT/YVoV2XhWYKrd1tb7/gn5GDQrYH0aIipUjZUIvJz7i1MFJB0Tk5ttHpxhnj2/uZoPkd6PDHxvacEUkFel8NkjweNDGTwEN09lLJwhya2SqiY5XlldC7Hh6eBTopGGrFCpYRouJrHiJdx7NdYufh3s0QC03qX4/ogvJ8x7S;4:PEEX0v+j5INiqU6Tw/y0b9x7h3lhQsWqDU0awFmVDaVfwG/kXAAG+yjCUcDaU2MnL2Zq5T7Eb+/3ELkgGhxRtUbFY7wjMgqH0W759C4KU6tUy+CZIRT9PrNJXDpeJj8bxc9SYhM7ZNvywbb7wHqAGBdBM9SrO2N+zbxQTv+bV1AyMxRGimhdjHQBXog5WwFrXzMQDU9rvZi9DWA17ejIw/CzA5XcS62ForyJax1sOjdtBqOc4RgVxDAKufv0rUaMCyVwzBL9/pQNhMEjB8eupibHAlCzP54lX3t5SXjT5bw18GteCoT4tO1nrDR+d7fGJCHOKeeysRhGLgXNEe5RhphgfNGeDoM9ONzzSLyV0f8= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(227479698468861)(222181515654134); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040450)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3002001)(3231022)(6055026)(6041248)(20161123562025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123560025)(20161123555025)(6072148)(201708071742011);SRVR:TU4PR8401MB0366;BCL:0;PCL:0;RULEID:(100000803101)(100110400095);SRVR:TU4PR8401MB0366; X-Forefront-PRVS: 0512CC5201 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(376002)(346002)(39860400002)(366004)(24454002)(199004)(189003)(6116002)(47776003)(67846002)(83506002)(53546010)(8676002)(81156014)(81166006)(8936002)(101416001)(31686004)(6246003)(105586002)(230700001)(53936002)(6512007)(3846002)(478600001)(4326008)(36756003)(25786009)(2906002)(106356001)(68736007)(6916009)(39060400002)(2950100002)(16526018)(7416002)(52116002)(6666003)(65826007)(23676004)(33646002)(2486003)(50466002)(5660300001)(229853002)(93886005)(52146003)(31696002)(7736002)(66066001)(58126008)(6506006)(97736004)(86362001)(316002)(65956001)(64126003)(305945005)(65806001)(54906003)(6486002)(76176011);DIR:OUT;SFP:1102;SCL:1;SRVR:TU4PR8401MB0366;H:Andrews-MacBook-Pro.local;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtUVTRQUjg0MDFNQjAzNjY7MjM6dDNlMCtQaXB3S3ZGbzBhN2E0aE9DeDl3?= =?utf-8?B?VVl1WnJPUzFKTVhldUZyZmM1dHo0T1dTS2lVUVVpNVZJNG8wRFJnZGVYUTF6?= =?utf-8?B?SDFDNWN5S3JXTER2SjE3VThJSjUyUVBweUJBd2YyUSt6Tm9VVWNOZGZwQmt5?= =?utf-8?B?ZHNMeXpOUkdWUkxrVTY5OVhUam9qZG51c3lCZ1pVR3JLK0dBZG1EOWhaN09B?= =?utf-8?B?L08vQnRvS1MxT2lLT1ROOFdHQ09KeUpIRkJWaEZSZzhXNTRyTkpyRVpDaHla?= =?utf-8?B?UGZ4b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zxDxsyR5FWXOAv+5yjBD9p09NDpjFgQSxr72uye6t1Vb31WD9MIjDeINGGPod3dlMah4LX83IvVQcAww2jHQhebaKZcsRL+QL2e6Q7izFKET/VKaS2wdx2iUNg4x4lZFOkWlZFlm0Q/su9kf1emrGKWJ8pSx54QTzh5gvrHtg1jJ/qT1DHTl1hkTqhcrgmjCFLaZu/axA+SpG569z/QT73EPMaOVs0MbpsyWO2MW+6fgv71ht4KZ7PUMeZjSk=;5:HfFUwrIx7lc0lEcK6ollGABH4otTkpjUb4mRdbrxK5l6Oo/3+bPrFIWnJXRoBvpdoLABp8EkfvzccNiVl8BCz6JJbTtZqDGRyqoNUGAYM+A1yYV4HVrbnG32T2iwu3hzgPuSP+5OFXcTcTVMmE5YDlZZDMdxz2k2HOGAPcdmqKk=;24:5KCT4UQ+Ea+qDJandKCCSZdadibh4UsUjPTqMIYIGnzT+zstSpJzpRz6n1TElKf/utxUYoQU1X5fMGWabM66vBPd98k5l1xYPnEf0mTvGzU=;7:ZIOv7KeQTiA2syfrAvxcoxqyotTVg6PG1gKeUaFPgojhGcYK/VaQm9iT6guQK3gjksZ5yl5RmgSO39uJLNggLwjEQvv4jZYCAs5yGYP20nUeak0r2qqDZL3aom5aukLwOzuTbmU6zoVo6dJd6flELEzA8z/hS0t+lp79VDm+pSGnHAs0o0zLi+1teAicpyoV3JjpH0TyciQFgtBq9QhOAjp1CSARZByg2lZnosJ74HMPxW9gqzNgf8ohJxoH/FmE SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Dec 2017 23:04:48.1682 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ebd8e5e3-a233-444f-6e55-08d53c3496ed X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 105b2061-b669-4b31-92ac-24d304d195dc X-MS-Exchange-Transport-CrossTenantHeadersStamped: TU4PR8401MB0366 X-OriginatorOrg: hpe.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1566 Lines: 44 On 12/5/17 3:27 PM, Peter Zijlstra wrote: > On Tue, Dec 05, 2017 at 03:09:48PM -0600, Andrew Banman wrote: >> On 12/5/17 6:34 AM, Peter Zijlstra wrote: >>> Since uv_flush_tlb_others() implements flush_tlb_others() which is >>> about flushing user mappings, we should use __flush_tlb_single(), >>> which too is about flushing user mappings. >>> >>> Cc: Andrew Banman >>> Cc: Mike Travis >>> Signed-off-by: Peter Zijlstra (Intel) >>> --- >>> arch/x86/platform/uv/tlb_uv.c | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> --- a/arch/x86/platform/uv/tlb_uv.c >>> +++ b/arch/x86/platform/uv/tlb_uv.c >>> @@ -299,7 +299,7 @@ static void bau_process_message(struct m >>> local_flush_tlb(); >>> stat->d_alltlb++; >>> } else { >>> - __flush_tlb_one(msg->address); >>> + __flush_tlb_single(msg->address); >>> stat->d_onetlb++; >>> } >>> stat->d_requestee++; >> >> This looks like the right thing to do. We'll be testing it and complain later if >> we find any problems, but I'm not expecting any since this patch looks to >> maintain our status quo. > > Well, with KPTI (the-patch-set-formerly-known-as-kaiser), there will be > a distinct difference between the two. > > With KPTI __flush_tlb_one() would end up invalidating all kernel > mappings while __flush_tlb_single() will end up only invalidating the > user mappings of the current mm. > Right! Now the KPTI __flush_tlb_single() equals the old __flush_tlb_one(), less the call to count_vm_tlb_event(). ACK