Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 28 Jun 2018 16:43:44 +0000 (09:43 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 28 Jun 2018 17:40:47 +0000 (10:40 -0700)
commita11e1d432b51f63ba698d044441284a661f01144
tree9f3c5a10bf0d7f9a342d5fb39c0c35ea14170124
parentf57494321cbf5b1e7769b6135407d2995a369e28
Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL

The poll() changes were not well thought out, and completely
unexplained.  They also caused a huge performance regression, because
"->poll()" was no longer a trivial file operation that just called down
to the underlying file operations, but instead did at least two indirect
calls.

Indirect calls are sadly slow now with the Spectre mitigation, but the
performance problem could at least be largely mitigated by changing the
"->get_poll_head()" operation to just have a per-file-descriptor pointer
to the poll head instead.  That gets rid of one of the new indirections.

But that doesn't fix the new complexity that is completely unwarranted
for the regular case.  The (undocumented) reason for the poll() changes
was some alleged AIO poll race fixing, but we don't make the common case
slower and more complex for some uncommon special case, so this all
really needs way more explanations and most likely a fundamental
redesign.

[ This revert is a revert of about 30 different commits, not reverted
  individually because that would just be unnecessarily messy  - Linus ]

Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
80 files changed:
Documentation/filesystems/Locking
Documentation/filesystems/vfs.txt
crypto/af_alg.c
crypto/algif_aead.c
crypto/algif_skcipher.c
drivers/char/random.c
drivers/isdn/mISDN/socket.c
drivers/net/ppp/pppoe.c
fs/aio.c
fs/eventfd.c
fs/eventpoll.c
fs/pipe.c
fs/select.c
fs/timerfd.c
include/crypto/if_alg.h
include/linux/fs.h
include/linux/net.h
include/linux/poll.h
include/linux/skbuff.h
include/net/bluetooth/bluetooth.h
include/net/iucv/af_iucv.h
include/net/sctp/sctp.h
include/net/tcp.h
include/net/tls.h
include/net/udp.h
include/uapi/linux/aio_abi.h
net/appletalk/ddp.c
net/atm/common.c
net/atm/common.h
net/atm/pvc.c
net/atm/svc.c
net/ax25/af_ax25.c
net/bluetooth/af_bluetooth.c
net/bluetooth/hci_sock.c
net/bluetooth/l2cap_sock.c
net/bluetooth/rfcomm/sock.c
net/bluetooth/sco.c
net/caif/caif_socket.c
net/can/bcm.c
net/can/raw.c
net/core/datagram.c
net/dccp/dccp.h
net/dccp/ipv4.c
net/dccp/ipv6.c
net/dccp/proto.c
net/decnet/af_decnet.c
net/ieee802154/socket.c
net/ipv4/af_inet.c
net/ipv4/tcp.c
net/ipv4/udp.c
net/ipv6/af_inet6.c
net/ipv6/raw.c
net/iucv/af_iucv.c
net/kcm/kcmsock.c
net/key/af_key.c
net/l2tp/l2tp_ip.c
net/l2tp/l2tp_ip6.c
net/l2tp/l2tp_ppp.c
net/llc/af_llc.c
net/netlink/af_netlink.c
net/netrom/af_netrom.c
net/nfc/llcp_sock.c
net/nfc/rawsock.c
net/packet/af_packet.c
net/phonet/socket.c
net/qrtr/qrtr.c
net/rose/af_rose.c
net/rxrpc/af_rxrpc.c
net/sctp/ipv6.c
net/sctp/protocol.c
net/sctp/socket.c
net/smc/af_smc.c
net/socket.c
net/tipc/socket.c
net/tls/tls_main.c
net/tls/tls_sw.c
net/unix/af_unix.c
net/vmw_vsock/af_vsock.c
net/x25/af_x25.c
net/xdp/xsk.c