Thread (41 messages) 41 messages, 9 authors, 2016-09-06

Re: [RFC 05/13] x86/mm: Add barriers and document switch_mm-vs-flush synchronization

From: Nadav Amit <hidden>
Date: 2016-06-09 19:46:00
Also in: lkml

Andy Lutomirski [off-list ref] wrote:
On Fri, Jun 3, 2016 at 10:42 AM, Nadav Amit [off-list ref] wrote:
quoted
Following this patch, if (current->active_mm != mm), flush_tlb_page() still
doesn’t call smp_mb() before checking mm_cpumask(mm).

In contrast, flush_tlb_mm_range() does call smp_mb().

Is there a reason for this discrepancy?
Not that I can remember.  Is the remote flush case likely to be racy?
You replied separately on another email that included a patch to fix
this case. It turns out smp_mb is not needed on flush_tlb_page, since
the PTE is always updated using an atomic operation. Yet, a compiler 
barrier is still needed, so I added smp_mb__after_atomic instead.

Nadav
--
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help