do_munmap(): do TLB flush per address in remote_tlb_flush_cpu_mask()

This commit is contained in:
Balazs Gerofi
2016-08-17 15:08:30 +09:00
parent 9efd568e07
commit 01d2ea1605
2 changed files with 7 additions and 2 deletions

View File

@ -265,6 +265,13 @@ void remote_flush_tlb_cpumask(struct process_vm *vm,
unsigned long tsc;
tsc = rdtsc() + 12884901888; /* 1.2GHz =>10 sec */
#endif
if (flush_entry->addr) {
flush_tlb_single(flush_entry->addr & PAGE_MASK);
}
/* Zero address denotes full TLB flush */
else {
flush_tlb();
}
/* Wait for all cores */
while (ihk_atomic_read(&flush_entry->pending) != 0) {

View File

@ -917,8 +917,6 @@ static int do_munmap(void *addr, size_t len)
begin_free_pages_pending();
error = remove_process_memory_range(cpu_local_var(current)->vm,
(intptr_t)addr, (intptr_t)addr+len, &ro_freed);
// XXX: TLB flush
flush_tlb();
if (error || !ro_freed) {
clear_host_pte((uintptr_t)addr, len);
}