Re: [patch v2 1/2] mm, mmu_notifier: annotate mmu notifiers with blockable invalidate callbacks

2017-12-16 Thread Tetsuo Handa
Michal Hocko wrote: > On Sat 16-12-17 16:14:07, Tetsuo Handa wrote: > > rwsem_is_locked() test isn't equivalent with __mutex_owner() == current > > test, is it? > > If rwsem_is_locked() returns true because somebody else has locked it, > > there is > > no guarantee that current thread has locked

Re: [patch v2 1/2] mm, mmu_notifier: annotate mmu notifiers with blockable invalidate callbacks

2017-12-16 Thread Tetsuo Handa
Michal Hocko wrote: > On Sat 16-12-17 16:14:07, Tetsuo Handa wrote: > > rwsem_is_locked() test isn't equivalent with __mutex_owner() == current > > test, is it? > > If rwsem_is_locked() returns true because somebody else has locked it, > > there is > > no guarantee that current thread has locked

Re: [patch v2 1/2] mm, mmu_notifier: annotate mmu notifiers with blockable invalidate callbacks

2017-12-16 Thread Michal Hocko
On Sat 16-12-17 16:14:07, Tetsuo Handa wrote: > On 2017/12/16 8:04, Andrew Morton wrote: > >> The implementation is steered toward an expensive slowpath, such as after > >> the oom reaper has grabbed mm->mmap_sem of a still alive oom victim. > > > > some tweakage, please review. > > > > From:

Re: [patch v2 1/2] mm, mmu_notifier: annotate mmu notifiers with blockable invalidate callbacks

2017-12-16 Thread Michal Hocko
On Sat 16-12-17 16:14:07, Tetsuo Handa wrote: > On 2017/12/16 8:04, Andrew Morton wrote: > >> The implementation is steered toward an expensive slowpath, such as after > >> the oom reaper has grabbed mm->mmap_sem of a still alive oom victim. > > > > some tweakage, please review. > > > > From:

Re: [patch v2 1/2] mm, mmu_notifier: annotate mmu notifiers with blockable invalidate callbacks

2017-12-16 Thread Michal Hocko
On Sat 16-12-17 15:21:51, Tetsuo Handa wrote: > On 2017/12/16 1:25, Michal Hocko wrote: > >> struct mmu_notifier_ops { > >> + /* > >> + * Flags to specify behavior of callbacks for this MMU notifier. > >> + * Used to determine which context an operation may be called. > >> + * > >> + *

Re: [patch v2 1/2] mm, mmu_notifier: annotate mmu notifiers with blockable invalidate callbacks

2017-12-16 Thread Michal Hocko
On Sat 16-12-17 15:21:51, Tetsuo Handa wrote: > On 2017/12/16 1:25, Michal Hocko wrote: > >> struct mmu_notifier_ops { > >> + /* > >> + * Flags to specify behavior of callbacks for this MMU notifier. > >> + * Used to determine which context an operation may be called. > >> + * > >> + *

Re: [patch v2 1/2] mm, mmu_notifier: annotate mmu notifiers with blockable invalidate callbacks

2017-12-16 Thread Michal Hocko
On Fri 15-12-17 15:04:29, Andrew Morton wrote: > On Thu, 14 Dec 2017 13:30:56 -0800 (PST) David Rientjes > wrote: > > > Commit 4d4bbd8526a8 ("mm, oom_reaper: skip mm structs with mmu notifiers") > > prevented the oom reaper from unmapping private anonymous memory with the >

Re: [patch v2 1/2] mm, mmu_notifier: annotate mmu notifiers with blockable invalidate callbacks

2017-12-16 Thread Michal Hocko
On Fri 15-12-17 15:04:29, Andrew Morton wrote: > On Thu, 14 Dec 2017 13:30:56 -0800 (PST) David Rientjes > wrote: > > > Commit 4d4bbd8526a8 ("mm, oom_reaper: skip mm structs with mmu notifiers") > > prevented the oom reaper from unmapping private anonymous memory with the > > oom reaper when

Re: [patch v2 1/2] mm, mmu_notifier: annotate mmu notifiers with blockable invalidate callbacks

2017-12-15 Thread Tetsuo Handa
On 2017/12/16 8:04, Andrew Morton wrote: >> The implementation is steered toward an expensive slowpath, such as after >> the oom reaper has grabbed mm->mmap_sem of a still alive oom victim. > > some tweakage, please review. > > From: Andrew Morton > Subject: >

Re: [patch v2 1/2] mm, mmu_notifier: annotate mmu notifiers with blockable invalidate callbacks

2017-12-15 Thread Tetsuo Handa
On 2017/12/16 8:04, Andrew Morton wrote: >> The implementation is steered toward an expensive slowpath, such as after >> the oom reaper has grabbed mm->mmap_sem of a still alive oom victim. > > some tweakage, please review. > > From: Andrew Morton > Subject: >

Re: [patch v2 1/2] mm, mmu_notifier: annotate mmu notifiers with blockable invalidate callbacks

2017-12-15 Thread Tetsuo Handa
On 2017/12/16 1:25, Michal Hocko wrote: >> struct mmu_notifier_ops { >> +/* >> + * Flags to specify behavior of callbacks for this MMU notifier. >> + * Used to determine which context an operation may be called. >> + * >> + * MMU_INVALIDATE_DOES_NOT_BLOCK:

Re: [patch v2 1/2] mm, mmu_notifier: annotate mmu notifiers with blockable invalidate callbacks

2017-12-15 Thread Tetsuo Handa
On 2017/12/16 1:25, Michal Hocko wrote: >> struct mmu_notifier_ops { >> +/* >> + * Flags to specify behavior of callbacks for this MMU notifier. >> + * Used to determine which context an operation may be called. >> + * >> + * MMU_INVALIDATE_DOES_NOT_BLOCK:

Re: [patch v2 1/2] mm, mmu_notifier: annotate mmu notifiers with blockable invalidate callbacks

2017-12-15 Thread Andrew Morton
On Thu, 14 Dec 2017 13:30:56 -0800 (PST) David Rientjes wrote: > Commit 4d4bbd8526a8 ("mm, oom_reaper: skip mm structs with mmu notifiers") > prevented the oom reaper from unmapping private anonymous memory with the > oom reaper when the oom victim mm had mmu notifiers

Re: [patch v2 1/2] mm, mmu_notifier: annotate mmu notifiers with blockable invalidate callbacks

2017-12-15 Thread Andrew Morton
On Thu, 14 Dec 2017 13:30:56 -0800 (PST) David Rientjes wrote: > Commit 4d4bbd8526a8 ("mm, oom_reaper: skip mm structs with mmu notifiers") > prevented the oom reaper from unmapping private anonymous memory with the > oom reaper when the oom victim mm had mmu notifiers registered. > > The

Re: [patch v2 1/2] mm, mmu_notifier: annotate mmu notifiers with blockable invalidate callbacks

2017-12-15 Thread Michal Hocko
On Thu 14-12-17 13:30:56, David Rientjes wrote: > Commit 4d4bbd8526a8 ("mm, oom_reaper: skip mm structs with mmu notifiers") > prevented the oom reaper from unmapping private anonymous memory with the > oom reaper when the oom victim mm had mmu notifiers registered. > > The rationale is that

Re: [patch v2 1/2] mm, mmu_notifier: annotate mmu notifiers with blockable invalidate callbacks

2017-12-15 Thread Michal Hocko
On Thu 14-12-17 13:30:56, David Rientjes wrote: > Commit 4d4bbd8526a8 ("mm, oom_reaper: skip mm structs with mmu notifiers") > prevented the oom reaper from unmapping private anonymous memory with the > oom reaper when the oom victim mm had mmu notifiers registered. > > The rationale is that

Re: [patch v2 1/2] mm, mmu_notifier: annotate mmu notifiers with blockable invalidate callbacks

2017-12-15 Thread Dimitri Sivanich
On Thu, Dec 14, 2017 at 01:30:56PM -0800, David Rientjes wrote: > Commit 4d4bbd8526a8 ("mm, oom_reaper: skip mm structs with mmu notifiers") > prevented the oom reaper from unmapping private anonymous memory with the > oom reaper when the oom victim mm had mmu notifiers registered. > > The

Re: [patch v2 1/2] mm, mmu_notifier: annotate mmu notifiers with blockable invalidate callbacks

2017-12-15 Thread Dimitri Sivanich
On Thu, Dec 14, 2017 at 01:30:56PM -0800, David Rientjes wrote: > Commit 4d4bbd8526a8 ("mm, oom_reaper: skip mm structs with mmu notifiers") > prevented the oom reaper from unmapping private anonymous memory with the > oom reaper when the oom victim mm had mmu notifiers registered. > > The

Re: [patch v2 1/2] mm, mmu_notifier: annotate mmu notifiers with blockable invalidate callbacks

2017-12-15 Thread Christian König
Am 14.12.2017 um 22:30 schrieb David Rientjes: Commit 4d4bbd8526a8 ("mm, oom_reaper: skip mm structs with mmu notifiers") prevented the oom reaper from unmapping private anonymous memory with the oom reaper when the oom victim mm had mmu notifiers registered. The rationale is that doing

Re: [patch v2 1/2] mm, mmu_notifier: annotate mmu notifiers with blockable invalidate callbacks

2017-12-15 Thread Christian König
Am 14.12.2017 um 22:30 schrieb David Rientjes: Commit 4d4bbd8526a8 ("mm, oom_reaper: skip mm structs with mmu notifiers") prevented the oom reaper from unmapping private anonymous memory with the oom reaper when the oom victim mm had mmu notifiers registered. The rationale is that doing

Re: [patch v2 1/2] mm, mmu_notifier: annotate mmu notifiers with blockable invalidate callbacks

2017-12-15 Thread Paolo Bonzini
On 14/12/2017 22:30, David Rientjes wrote: > Commit 4d4bbd8526a8 ("mm, oom_reaper: skip mm structs with mmu notifiers") > prevented the oom reaper from unmapping private anonymous memory with the > oom reaper when the oom victim mm had mmu notifiers registered. > > The rationale is that doing

Re: [patch v2 1/2] mm, mmu_notifier: annotate mmu notifiers with blockable invalidate callbacks

2017-12-15 Thread Paolo Bonzini
On 14/12/2017 22:30, David Rientjes wrote: > Commit 4d4bbd8526a8 ("mm, oom_reaper: skip mm structs with mmu notifiers") > prevented the oom reaper from unmapping private anonymous memory with the > oom reaper when the oom victim mm had mmu notifiers registered. > > The rationale is that doing

[patch v2 1/2] mm, mmu_notifier: annotate mmu notifiers with blockable invalidate callbacks

2017-12-14 Thread David Rientjes
Commit 4d4bbd8526a8 ("mm, oom_reaper: skip mm structs with mmu notifiers") prevented the oom reaper from unmapping private anonymous memory with the oom reaper when the oom victim mm had mmu notifiers registered. The rationale is that doing mmu_notifier_invalidate_range_{start,end}() around the

[patch v2 1/2] mm, mmu_notifier: annotate mmu notifiers with blockable invalidate callbacks

2017-12-14 Thread David Rientjes
Commit 4d4bbd8526a8 ("mm, oom_reaper: skip mm structs with mmu notifiers") prevented the oom reaper from unmapping private anonymous memory with the oom reaper when the oom victim mm had mmu notifiers registered. The rationale is that doing mmu_notifier_invalidate_range_{start,end}() around the