do_munmap(): do TLB flush per address in remote_tlb_flush_cpu_mask()
This commit is contained in:
@ -265,6 +265,13 @@ void remote_flush_tlb_cpumask(struct process_vm *vm,
|
|||||||
unsigned long tsc;
|
unsigned long tsc;
|
||||||
tsc = rdtsc() + 12884901888; /* 1.2GHz =>10 sec */
|
tsc = rdtsc() + 12884901888; /* 1.2GHz =>10 sec */
|
||||||
#endif
|
#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 */
|
/* Wait for all cores */
|
||||||
while (ihk_atomic_read(&flush_entry->pending) != 0) {
|
while (ihk_atomic_read(&flush_entry->pending) != 0) {
|
||||||
|
|||||||
@ -917,8 +917,6 @@ static int do_munmap(void *addr, size_t len)
|
|||||||
begin_free_pages_pending();
|
begin_free_pages_pending();
|
||||||
error = remove_process_memory_range(cpu_local_var(current)->vm,
|
error = remove_process_memory_range(cpu_local_var(current)->vm,
|
||||||
(intptr_t)addr, (intptr_t)addr+len, &ro_freed);
|
(intptr_t)addr, (intptr_t)addr+len, &ro_freed);
|
||||||
// XXX: TLB flush
|
|
||||||
flush_tlb();
|
|
||||||
if (error || !ro_freed) {
|
if (error || !ro_freed) {
|
||||||
clear_host_pte((uintptr_t)addr, len);
|
clear_host_pte((uintptr_t)addr, len);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user