From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pd0-f170.google.com (mail-pd0-f170.google.com [209.85.192.170]) by kanga.kvack.org (Postfix) with ESMTP id 3DAE36B0038 for ; Tue, 1 Jul 2014 12:50:33 -0400 (EDT) Received: by mail-pd0-f170.google.com with SMTP id z10so10480786pdj.29 for ; Tue, 01 Jul 2014 09:50:32 -0700 (PDT) Received: from mga09.intel.com (mga09.intel.com. [134.134.136.24]) by mx.google.com with ESMTP id ln8si27511474pab.187.2014.07.01.09.50.31 for ; Tue, 01 Jul 2014 09:50:32 -0700 (PDT) Subject: [PATCH 4/7] x86: mm: unify remote invlpg code From: Dave Hansen Date: Tue, 01 Jul 2014 09:48:52 -0700 References: <20140701164845.8D1A5702@viggo.jf.intel.com> In-Reply-To: <20140701164845.8D1A5702@viggo.jf.intel.com> Message-Id: <20140701164852.F61ED607@viggo.jf.intel.com> Sender: owner-linux-mm@kvack.org List-ID: To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, hpa@zytor.com, mingo@redhat.com, tglx@linutronix.de, x86@kernel.org, Dave Hansen , dave.hansen@linux.intel.com, riel@redhat.com, mgorman@suse.de From: Dave Hansen There are currently three paths through the remote flush code: 1. full invalidation 2. single page invalidation using invlpg 3. ranged invalidation using invlpg This takes 2 and 3 and combines them in to a single path by making the single-page one just be the start and end be start plus a single page. This makes placement of our tracepoint easier. Signed-off-by: Dave Hansen Cc: Rik van Riel Cc: Mel Gorman --- b/arch/x86/mm/tlb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff -puN arch/x86/mm/tlb.c~x86-tlb-simplify-remote-flush-code arch/x86/mm/tlb.c --- a/arch/x86/mm/tlb.c~x86-tlb-simplify-remote-flush-code 2014-06-30 16:18:28.009559635 -0700 +++ b/arch/x86/mm/tlb.c 2014-06-30 16:18:28.013559817 -0700 @@ -102,13 +102,13 @@ static void flush_tlb_func(void *info) if (f->flush_mm != this_cpu_read(cpu_tlbstate.active_mm)) return; + if (!f->flush_end) + f->flush_end = f->flush_start + PAGE_SIZE; count_vm_tlb_event(NR_TLB_REMOTE_FLUSH_RECEIVED); if (this_cpu_read(cpu_tlbstate.state) == TLBSTATE_OK) { if (f->flush_end == TLB_FLUSH_ALL) local_flush_tlb(); - else if (!f->flush_end) - __flush_tlb_single(f->flush_start); else { unsigned long addr; addr = f->flush_start; _ -- 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