Re: [PATCH v3] mm: Fix kthread_use_mm() vs TLB invalidate

2020-08-27 Thread Nicholas Piggin
Excerpts from Nicholas Piggin's message of August 28, 2020 1:26 pm: > Excerpts from pet...@infradead.org's message of August 21, 2020 11:04 pm: >> On Fri, Aug 21, 2020 at 11:09:51AM +0530, Aneesh Kumar K.V wrote: >>> Peter Zijlstra writes: >>> >>> > For SMP systems using IPI based TLB invalidatio

Re: [PATCH v3] mm: Fix kthread_use_mm() vs TLB invalidate

2020-08-27 Thread Nicholas Piggin
Excerpts from pet...@infradead.org's message of August 21, 2020 11:04 pm: > On Fri, Aug 21, 2020 at 11:09:51AM +0530, Aneesh Kumar K.V wrote: >> Peter Zijlstra writes: >> >> > For SMP systems using IPI based TLB invalidation, looking at >> > current->active_mm is entirely reasonable. This then pr

Re: [PATCH v3] mm: Fix kthread_use_mm() vs TLB invalidate

2020-08-21 Thread peterz
On Fri, Aug 21, 2020 at 11:09:51AM +0530, Aneesh Kumar K.V wrote: > Peter Zijlstra writes: > > > For SMP systems using IPI based TLB invalidation, looking at > > current->active_mm is entirely reasonable. This then presents the > > following race condition: > > > > > > CPU0

Re: [PATCH v3] mm: Fix kthread_use_mm() vs TLB invalidate

2020-08-20 Thread Aneesh Kumar K.V
Peter Zijlstra writes: > For SMP systems using IPI based TLB invalidation, looking at > current->active_mm is entirely reasonable. This then presents the > following race condition: > > > CPU0CPU1 > > flush_tlb_mm(mm)use_mm(mm) > > tsk-

Re: [PATCH v3] mm: Fix kthread_use_mm() vs TLB invalidate

2020-07-23 Thread Nicholas Piggin
Excerpts from Peter Zijlstra's message of July 22, 2020 6:35 pm: > On Tue, Jul 21, 2020 at 02:06:23PM -0700, Andrew Morton wrote: >> On Tue, 21 Jul 2020 17:41:06 +0200 Peter Zijlstra >> wrote: >> >> > >> > For SMP systems using IPI based TLB invalidation, looking at >> > current->active_mm is e

Re: [PATCH v3] mm: Fix kthread_use_mm() vs TLB invalidate

2020-07-22 Thread Peter Zijlstra
On Tue, Jul 21, 2020 at 02:06:23PM -0700, Andrew Morton wrote: > On Tue, 21 Jul 2020 17:41:06 +0200 Peter Zijlstra > wrote: > > > > > For SMP systems using IPI based TLB invalidation, looking at > > current->active_mm is entirely reasonable. This then presents the > > following race condition:

Re: [PATCH v3] mm: Fix kthread_use_mm() vs TLB invalidate

2020-07-21 Thread Andrew Morton
On Tue, 21 Jul 2020 17:41:06 +0200 Peter Zijlstra wrote: > > For SMP systems using IPI based TLB invalidation, looking at > current->active_mm is entirely reasonable. This then presents the > following race condition: > > > CPU0CPU1 > > flush_tlb_mm(mm)use_mm(m

[PATCH v3] mm: Fix kthread_use_mm() vs TLB invalidate

2020-07-21 Thread Peter Zijlstra
For SMP systems using IPI based TLB invalidation, looking at current->active_mm is entirely reasonable. This then presents the following race condition: CPU0 CPU1 flush_tlb_mm(mm) use_mm(mm) tsk->active_mm = mm;