Skip to content
This repository was archived by the owner on Dec 20, 2023. It is now read-only.

Commit a23421f

Browse files
hansendcH. Peter Anvin
authored andcommitted
x86/mm: Unify remote INVLPG code
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 <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Cc: Rik van Riel <[email protected]> Cc: Mel Gorman <[email protected]> Signed-off-by: H. Peter Anvin <[email protected]>
1 parent 9dfa6de commit a23421f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/x86/mm/tlb.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,13 @@ static void flush_tlb_func(void *info)
102102

103103
if (f->flush_mm != this_cpu_read(cpu_tlbstate.active_mm))
104104
return;
105+
if (!f->flush_end)
106+
f->flush_end = f->flush_start + PAGE_SIZE;
105107

106108
count_vm_tlb_event(NR_TLB_REMOTE_FLUSH_RECEIVED);
107109
if (this_cpu_read(cpu_tlbstate.state) == TLBSTATE_OK) {
108110
if (f->flush_end == TLB_FLUSH_ALL)
109111
local_flush_tlb();
110-
else if (!f->flush_end)
111-
__flush_tlb_single(f->flush_start);
112112
else {
113113
unsigned long addr;
114114
addr = f->flush_start;

0 commit comments

Comments
 (0)