Displaying 5 results from an estimated 5 matches for "try_mutex_lock".
Did you mean:
rb_mutex_lock
2019 Jul 24
2
[PATCH] mm/hmm: replace hmm_update with mmu_notifier_range
...e explicit.
We have *two* notifiers registered to the mm, A and B:
A invalidate_range_start: (has no blocking)
spin_lock()
counter++
spin_unlock()
A invalidate_range_end:
spin_lock()
counter--
spin_unlock()
And this one:
B invalidate_range_start: (has blocking)
if (!try_mutex_lock())
return -EAGAIN;
counter++
mutex_unlock()
B invalidate_range_end:
spin_lock()
counter--
spin_unlock()
So now the oom path does:
invalidate_range_start_non_blocking:
for each mn:
a->invalidate_range_start
b->invalidate_range_start
rc = EAGAIN
Now we...
2019 Jul 24
2
[PATCH] mm/hmm: replace hmm_update with mmu_notifier_range
...n_lock()
> > counter++
> > spin_unlock()
> >
> > A invalidate_range_end:
> > spin_lock()
> > counter--
> > spin_unlock()
> >
> > And this one:
> >
> > B invalidate_range_start: (has blocking)
> > if (!try_mutex_lock())
> > return -EAGAIN;
> > counter++
> > mutex_unlock()
> >
> > B invalidate_range_end:
> > spin_lock()
> > counter--
> > spin_unlock()
> >
> > So now the oom path does:
> >
> > invalidate_range_s...
2019 Jul 24
0
[PATCH] mm/hmm: replace hmm_update with mmu_notifier_range
...gt; A invalidate_range_start: (has no blocking)
> spin_lock()
> counter++
> spin_unlock()
>
> A invalidate_range_end:
> spin_lock()
> counter--
> spin_unlock()
>
> And this one:
>
> B invalidate_range_start: (has blocking)
> if (!try_mutex_lock())
> return -EAGAIN;
> counter++
> mutex_unlock()
>
> B invalidate_range_end:
> spin_lock()
> counter--
> spin_unlock()
>
> So now the oom path does:
>
> invalidate_range_start_non_blocking:
> for each mn:
> a->invalida...
2019 Jul 24
0
[PATCH] mm/hmm: replace hmm_update with mmu_notifier_range
...n_unlock()
> > >
> > > A invalidate_range_end:
> > > spin_lock()
> > > counter--
> > > spin_unlock()
> > >
> > > And this one:
> > >
> > > B invalidate_range_start: (has blocking)
> > > if (!try_mutex_lock())
> > > return -EAGAIN;
> > > counter++
> > > mutex_unlock()
> > >
> > > B invalidate_range_end:
> > > spin_lock()
> > > counter--
> > > spin_unlock()
> > >
> > > So now the oom...
2019 Jul 24
5
[PATCH] mm/hmm: replace hmm_update with mmu_notifier_range
On Wed, Jul 24, 2019 at 09:05:53AM +0200, Christoph Hellwig wrote:
> Looks good:
>
> Reviewed-by: Christoph Hellwig <hch at lst.de>
>
> One comment on a related cleanup:
>
> > list_for_each_entry(mirror, &hmm->mirrors, list) {
> > int rc;
> >
> > - rc = mirror->ops->sync_cpu_device_pagetables(mirror, &update);
> > +