From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from verein.lst.de ([213.95.11.211]:37798 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751628AbeCTPjC (ORCPT ); Tue, 20 Mar 2018 11:39:02 -0400 Date: Tue, 20 Mar 2018 16:39:00 +0100 From: Christoph Hellwig To: "Darrick J. Wong" Cc: Christoph Hellwig , viro@zeniv.linux.org.uk, Avi Kivity , linux-aio@kvack.org, linux-fsdevel@vger.kernel.org, netdev@vger.kernel.org, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 13/36] fs: introduce new ->get_poll_head and ->poll_mask methods Message-ID: <20180320153900.GA24355@lst.de> References: <20180305212743.16664-1-hch@lst.de> <20180305212743.16664-14-hch@lst.de> <20180320032938.GK7282@magnolia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180320032938.GK7282@magnolia> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Mon, Mar 19, 2018 at 08:29:38PM -0700, Darrick J. Wong wrote: > On Mon, Mar 05, 2018 at 01:27:20PM -0800, Christoph Hellwig wrote: > > ->get_poll_head returns the waitqueue that the poll operation is going > > to sleep on. Note that this means we can only use a single waitqueue > > for the poll, unlike some current drivers that use two waitqueues for > > different events. But now that we have keyed wakeups and heavily use > > those for poll there aren't that many good reason left to keep the > > multiple waitqueues, and if there are any ->poll is still around, the > > driver just won't support aio poll. > > > > Signed-off-by: Christoph Hellwig > > I've been wondering, how does a regular filesystem connect with this? In general, it doesn't. In Unix regular files aren't pollable. > Also, does anything implement get_poll_head? It looks to me like an aio > poll provider has to provide both... Yes. Everyone who implements ->poll_mask also needs to implement get_poll_head. For sockets we just happen to be able to use a generic implementation in net/socket.c for most of them.