From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt0-f197.google.com (mail-qt0-f197.google.com [209.85.216.197]) by kanga.kvack.org (Postfix) with ESMTP id 6CC396B0313 for ; Mon, 29 May 2017 19:53:16 -0400 (EDT) Received: by mail-qt0-f197.google.com with SMTP id r58so25539420qtb.0 for ; Mon, 29 May 2017 16:53:16 -0700 (PDT) Received: from mx1.redhat.com (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTPS id q46si10972916qtb.158.2017.05.29.16.53.15 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 May 2017 16:53:15 -0700 (PDT) Message-ID: <1496101992.29205.77.camel@redhat.com> Subject: Re: [PATCH v4 3/8] x86/mm: Refactor flush_tlb_mm_range() to merge local and remote cases From: Rik van Riel Date: Mon, 29 May 2017 19:53:12 -0400 In-Reply-To: <1496101762.29205.75.camel@redhat.com> References: <1496101762.29205.75.camel@redhat.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: owner-linux-mm@kvack.org List-ID: To: Andy Lutomirski , X86 ML Cc: Borislav Petkov , Linus Torvalds , Andrew Morton , Mel Gorman , "linux-mm@kvack.org" , Nadav Amit , Dave Hansen , Nadav Amit , Michal Hocko , Arjan van de Ven On Mon, 2017-05-29 at 19:49 -0400, Rik van Riel wrote: > On Sun, 2017-05-28 at 10:00 -0700, Andy Lutomirski wrote: > > > + > > + if (mm == current->active_mm) > > + flush_tlb_func_local(&info, > > TLB_LOCAL_MM_SHOOTDOWN); > > + if (cpumask_any_but(mm_cpumask(mm), cpu) < nr_cpu_ids) > > A flush_tlb_others(mm_cpumask(mm), &info); > > What excludes "cpu" from the cpumask before calling > (native_)flush_tlb_others? > > Otherwise smp_call_function_many will simply call > flush_tbl_func_remote for the local CPU as well, and > you get local CPU TLB flushing overhead twice. > > What am I missing? Never mind, I just re-read smp_call_function_many for the third time, and spotted what I missed. That function will not execute flush_tlb_func_remote on the local cpu, and I should stop looking at code for the day. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org