Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754583AbdFWPXX (ORCPT ); Fri, 23 Jun 2017 11:23:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:49252 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754480AbdFWPXW (ORCPT ); Fri, 23 Jun 2017 11:23:22 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 33CF022B6F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=luto@kernel.org MIME-Version: 1.0 In-Reply-To: References: <70f3a61658aa7c1c89f4db6a4f81d8df9e396ade.1498022414.git.luto@kernel.org> From: Andy Lutomirski Date: Fri, 23 Jun 2017 08:22:54 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3 06/11] x86/mm: Rework lazy TLB mode and TLB freshness tracking To: Boris Ostrovsky Cc: Andy Lutomirski , X86 ML , "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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1122 Lines: 32 On Fri, Jun 23, 2017 at 6:34 AM, Boris Ostrovsky wrote: > >> 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. Probably not. I'll change it to cpumask_clear(). Then the two cases in that function match better. > > -boris