Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753995AbdFWNfl (ORCPT ); Fri, 23 Jun 2017 09:35:41 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:25376 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751287AbdFWNfj (ORCPT ); Fri, 23 Jun 2017 09:35:39 -0400 Subject: Re: [PATCH v3 06/11] x86/mm: Rework lazy TLB mode and TLB freshness tracking To: Andy Lutomirski , x86@kernel.org Cc: linux-kernel@vger.kernel.org, Borislav Petkov , Linus Torvalds , Andrew Morton , Mel Gorman , "linux-mm@kvack.org" , Nadav Amit , Rik van Riel , Dave Hansen , Arjan van de Ven , Peter Zijlstra , Andrew Banman , Mike Travis , Dimitri Sivanich , Juergen Gross References: <70f3a61658aa7c1c89f4db6a4f81d8df9e396ade.1498022414.git.luto@kernel.org> From: Boris Ostrovsky Message-ID: Date: Fri, 23 Jun 2017 09:34:42 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <70f3a61658aa7c1c89f4db6a4f81d8df9e396ade.1498022414.git.luto@kernel.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Source-IP: aserv0021.oracle.com [141.146.126.233] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 753 Lines: 23 > diff --git a/arch/x86/xen/mmu_pv.c b/arch/x86/xen/mmu_pv.c > index 1d7a7213a310..f5df56fb8b5c 100644 > --- a/arch/x86/xen/mmu_pv.c > +++ b/arch/x86/xen/mmu_pv.c > @@ -1005,8 +1005,7 @@ static void xen_drop_mm_ref(struct mm_struct *mm) > /* Get the "official" set of cpus referring to our pagetable. */ > if (!alloc_cpumask_var(&mask, GFP_ATOMIC)) { > for_each_online_cpu(cpu) { > - if (!cpumask_test_cpu(cpu, mm_cpumask(mm)) > - && per_cpu(xen_current_cr3, cpu) != __pa(mm->pgd)) > + if (per_cpu(xen_current_cr3, cpu) != __pa(mm->pgd)) > continue; > smp_call_function_single(cpu, drop_mm_ref_this_cpu, mm, 1); > } > I wonder then whether cpumask_copy(mask, mm_cpumask(mm)); immediately below is needed. -boris