Re: [PATCH 0/4] per anon_vma lock and turn anon_vma rwsem lock to rwlock_t

From: Linus Torvalds
Date: Fri Nov 01 2013 - 14:55:12 EST

On Fri, Nov 1, 2013 at 11:47 AM, Michel Lespinasse <walken@xxxxxxxxxx> wrote:
> Should copy Andrea on this. I talked with him during KS, and there are
> no current in-tree users who are doing such sleeping; however there
> are prospective users for networking (RDMA) or GPU stuff who want to
> use this to let hardware directly copy data into user mappings.


I spoke up the first time this came up and I'll say the same thing
again: we're not screwing over the VM subsystem because some crazy
user might want to do crazy and stupid things that nobody sane cares

The whole "somebody might want to .." argument is just irrelevant.
Some people want to sleep in interrupt handlers too, or while holding
random spinlocks. Too bad. They don't get to, because doing that
results in problems for the rest of the system.

Our job in the kernel is to do the best job technically that we can.
And sometimes that very much involves saying "No, you can't do that".

We have limitations in the kernel. The stack is of limited size. You
can't allocate arbitrarily sized memory. You must follow some very
strict rules.

If people can't handle that, then they can go cry to mommy, and go
back to writing user mode code. In the kernel, you have to live with
certain constraints that makes the kernel better.

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