Re: [PATCH v2 3/4] sparc64: remove mm_cpumask clearing to fix kthread_use_mm race

2020-09-15 Thread David Miller
From: Nicholas Piggin Date: Tue, 15 Sep 2020 13:24:07 +1000 > Excerpts from David Miller's message of September 15, 2020 5:59 am: >> From: Nicholas Piggin >> Date: Mon, 14 Sep 2020 14:52:18 +1000 >> >> ... >>> The basic fix for sparc64 is to remove its mm_cpumask clearing code. The >>>

Re: [PATCH v2 3/4] sparc64: remove mm_cpumask clearing to fix kthread_use_mm race

2020-09-14 Thread Nicholas Piggin
Excerpts from David Miller's message of September 15, 2020 5:59 am: > From: Nicholas Piggin > Date: Mon, 14 Sep 2020 14:52:18 +1000 > > ... >> The basic fix for sparc64 is to remove its mm_cpumask clearing code. The >> optimisation could be effectively restored by sending IPIs to mm_cpumask >>

Re: [PATCH v2 3/4] sparc64: remove mm_cpumask clearing to fix kthread_use_mm race

2020-09-14 Thread Nicholas Piggin
Excerpts from Anatoly Pugachev's message of September 14, 2020 8:23 pm: > On Mon, Sep 14, 2020 at 10:00 AM Nicholas Piggin wrote: >> >> Excerpts from Nicholas Piggin's message of September 14, 2020 2:52 pm: >> >> [...] >> >> > The basic fix for sparc64 is to remove its mm_cpumask clearing code.

Re: [PATCH v2 3/4] sparc64: remove mm_cpumask clearing to fix kthread_use_mm race

2020-09-14 Thread David Miller
From: Nicholas Piggin Date: Mon, 14 Sep 2020 14:52:18 +1000 ... > The basic fix for sparc64 is to remove its mm_cpumask clearing code. The > optimisation could be effectively restored by sending IPIs to mm_cpumask > members and having them remove themselves from mm_cpumask. This is more >

Re: [PATCH v2 3/4] sparc64: remove mm_cpumask clearing to fix kthread_use_mm race

2020-09-14 Thread Anatoly Pugachev
On Mon, Sep 14, 2020 at 10:00 AM Nicholas Piggin wrote: > > Excerpts from Nicholas Piggin's message of September 14, 2020 2:52 pm: > > [...] > > > The basic fix for sparc64 is to remove its mm_cpumask clearing code. The > > optimisation could be effectively restored by sending IPIs to mm_cpumask

Re: [PATCH v2 3/4] sparc64: remove mm_cpumask clearing to fix kthread_use_mm race

2020-09-14 Thread Nicholas Piggin
Excerpts from Nicholas Piggin's message of September 14, 2020 2:52 pm: [...] > The basic fix for sparc64 is to remove its mm_cpumask clearing code. The > optimisation could be effectively restored by sending IPIs to mm_cpumask > members and having them remove themselves from mm_cpumask. This is

[PATCH v2 3/4] sparc64: remove mm_cpumask clearing to fix kthread_use_mm race

2020-09-13 Thread Nicholas Piggin
The de facto (and apparently uncommented) standard for using an mm had, thanks to this code in sparc if nothing else, been that you must have a reference on mm_users *and that reference must have been obtained with mmget()*, i.e., from a thread with a reference to mm_users that had used the mm.