Re: [PATCH] anon_vmas: Convert the rwsem to an rwlock_t

From: Andrea Arcangeli
Date: Mon Sep 30 2013 - 15:17:01 EST

On Mon, Sep 30, 2013 at 09:26:21AM -0700, Linus Torvalds wrote:
> On Mon, Sep 30, 2013 at 1:52 AM, Andrea Arcangeli <aarcange@xxxxxxxxxx> wrote:
> >
> > Sorry having to break the party but the sleepable locks for anon_vma
> > and i_mmap_mutex are now requirement for the "pageable RDMA" effort
> > recently achieved upstream by mellanox with the MMU notifier.
> I'll happily break that.

Unless a solution is found that could allow to invalidate secondary
MMUs with a spinlock/rwlock for anon_vma->lock/i_mmap_lock, would it
be acceptable to switch between spinlock/rwlock mutex/rwsem through a
config option? option CONFIG_SLEEPABLE_RMAP, implicitly selected by
CONFIG_SLEEPABLE_MMU_NOTIFIER, in turn selected by the RDMA and nvidia
drivers if they're built (ideally nvidia drivers will figure out how
to avoid scheduling).

I mean it only requires a wrapping header file, aside from the header
file it wouldn't be a much bigger patch than the one posted already.

It would be much easier to switch between spinning and sleeping locks
to keep benchmarking different scenarios too.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at