userfaultfd: optimize read() and poll() to be O(1)
userfaultfd: optimize read() and poll() to be O(1)

This makes read O(1) and poll that was already O(1) becomes lockless.

Signed-off-by: Andrea Arcangeli <6cb163d975a8c4c46420677e0054b55c39bdb339@redhat.com>
Acked-by: Pavel Emelyanov <c9a32589e048e044184536f7ac71ef92fe82df3e@parallels.com>
Cc: Sanidhya Kashyap <1129a7bb22ab524858df56c5de32e1bb522c656e@gmail.com>
Cc: 33bd0dbcb9a810d908d0e0b2c4e8da23001b38b9@huawei.com
Cc: "Kirill A. Shutemov" <9b153e80bc985b32d577460a8a24e398d4182978@shutemov.name>
Cc: Andres Lagar-Cavilla <638c603de74e018ea5916668afb49119aaa0939e@google.com>
Cc: Dave Hansen <71bcd3d88361b22cd828f9a350d19d8775f56d4e@intel.com>
Cc: Paolo Bonzini <69d3ebcf5ee4e7f05a50dc23cd96655b730804b4@redhat.com>
Cc: Rik van Riel <a21938f5d463ddf41aa718934c205ca2cce8ebbc@redhat.com>
Cc: Mel Gorman <39ea6a09710987173e32e37c86918024a0f441c1@suse.de>
Cc: Andy Lutomirski <2cc0d0d76de2e6f37b92deeb83c85cb306fc5dc1@amacapital.net>
Cc: Hugh Dickins <d3abdf3e2800e6cb849f11b81e6eb50b34d96431@google.com>
Cc: Peter Feiner <7e8d390d042265d58ed89d2fc045804913ae1bf5@google.com>
Cc: "Dr. David Alan Gilbert" <54dff2264884c355ed5584a3b7f1530b4b26921e@redhat.com>
Cc: Johannes Weiner <331be22c6b63ca3e0a03d408c2d906b1b02cd5f2@cmpxchg.org>
Cc: "Huangpeng (Peter)" <e431b8ea3a2f8d24b6edf880a7530e8907fffaea@huawei.com>
Signed-off-by: Andrew Morton <5c1e68b099950c134891f0b6e179498a8ebe9cf9@linux-foundation.org>
Signed-off-by: Linus Torvalds <69652caca27c8b940640ad396ab71f93cacec34f@linux-foundation.org>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs