[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTimi9ZfO+8rGuBSKdSiXSZmQfvs8eceYRgdpdO6s@mail.gmail.com>
Date: Thu, 13 Jan 2011 07:43:55 -0800
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Gleb Natapov <gleb@...hat.com>
Cc: Rik van Riel <riel@...hat.com>, Avi Kivity <avi@...hat.com>,
Marcelo Tosatti <mtosatti@...hat.com>,
linux-kernel <linux-kernel@...r.kernel.org>,
KVM list <kvm@...r.kernel.org>
Subject: Re: [GIT PULL] KVM updates for the 2.6.38 merge window
On Thu, Jan 13, 2011 at 4:53 AM, Gleb Natapov <gleb@...hat.com> wrote:
>
> I implemented get_user_pages_nowait() on top of your patch. In my testing
> it works as expected when used inside KVM. Does this looks OK to you?
It looks reasonable, although I suspect the subtle behavior wrt the
mmap_sem means that you should not expose the magic bare
FAULT_FLAG_ALLOW_RETRY flag to the __get_user_pages() thing. It's just
too easy to introduce bugs, methinks.
So I'd suggest
- drop FOLL_RETRY
- make FOLL_NOWAIT set both (FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_NOWAIT)
and that way the get_user_pages() thing will never release the
mmap_sem, and you never have any subtle locking issues for that
particular interface.
But some other VM person should look at it too.
Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists