Received: by 10.223.148.5 with SMTP id 5csp7699337wrq; Thu, 18 Jan 2018 08:30:10 -0800 (PST) X-Google-Smtp-Source: ACJfBosz1nfyllljY3zhDKT7dDeoTMd6qCeUqywEUbbO+DQ1Y/FG83TSTOqGswNeR4hsS+51WpKe X-Received: by 10.98.189.8 with SMTP id a8mr5282193pff.125.1516293010217; Thu, 18 Jan 2018 08:30:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516293010; cv=none; d=google.com; s=arc-20160816; b=KJJvFvgl63GExu82yrVsy5ZfnGALdx6BbKTp6GEgCy4gx4h6bEquxw60JMDSPKXeIj G27cFusfA5kaPsYMGTlW/QsaNZT+9MwvXLE8woWMTbf/BXfYBBkczfXTzFXcixb4aZWZ 02gLiZSrhCa0OK0GX56KQvL/QUmCNqNBlwKkrEMJL+iS3c9B5UKjexqhWPV+jqWoYu3b ++XUu/eimRto/nTlYScPhsMAFYpSulU/ja29otSoq8urRsODSuAb4pJxB8DDjM0p0BoZ T1n9/XzdaBc3Gswr5JbRcwLuL0WYtodrFDDr+tW/ScQOpXPH29qXjFvQhuo9PIcZScWe xQVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from :arc-authentication-results; bh=NIbLVH0aDIcxD23Z2pwA7gbZ6Nk9X1kjVbQkVUe0iqM=; b=L2b3Ms+f3b7obG45BMQxB/WYCBQ4qE8doP1rCquAbzmujjgl6HD2zevudsuFVdVmZ8 UFDHFY6xkw9v8dowg6edWVCjd/s7lmYOS1p459SPIfqmHzMORm9WE+jX5Xm7tq2duyR/ akgr03WX/kA0ZaPBsqLFFtDpFWdLLeJ6jWeCp8nYYiMXmpVdKNVfNuPhvIvSJP+axKDF b2s4kmAdCFD9cTpwjVbFJ0PANcE7t5NJZPCbl191kPhR8sBEfTx9yziqvr8iOVixBJYI lVocobub4+N6x8O1scyQoPpGvgJDskffPgkqTGoGJvavDtEYrR03ZQn9P5Ndeh05ww79 J/VQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n10-v6si10583plp.158.2018.01.18.08.29.56; Thu, 18 Jan 2018 08:30:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933083AbeARPz4 (ORCPT + 99 others); Thu, 18 Jan 2018 10:55:56 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56572 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932668AbeARPzj (ORCPT ); Thu, 18 Jan 2018 10:55:39 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5396496CA; Thu, 18 Jan 2018 15:46:41 +0000 (UTC) Received: from segfault.boston.devel.redhat.com (segfault.boston.devel.redhat.com [10.19.60.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 57E2C5DD6C; Thu, 18 Jan 2018 15:46:40 +0000 (UTC) From: Jeff Moyer To: Christoph Hellwig Cc: 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: aio poll, io_pgetevents and a new in-kernel poll API V3 References: <20180117192742.710-1-hch@lst.de> X-PGP-KeyID: 1F78E1B4 X-PGP-CertKey: F6FE 280D 8293 F72C 65FD 5A58 1FF8 A7CA 1F78 E1B4 X-PCLoadLetter: What the f**k does that mean? Date: Thu, 18 Jan 2018 10:46:39 -0500 In-Reply-To: <20180117192742.710-1-hch@lst.de> (Christoph Hellwig's message of "Wed, 17 Jan 2018 20:27:06 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Thu, 18 Jan 2018 15:46:41 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org FYI, this kernel has issues. It will boot up, but I don't have networking, and even rebooting doesn't succeed. I'm looking into it. -Jeff Christoph Hellwig writes: > Hi all, > > this series adds support for the IOCB_CMD_POLL operation to poll for the > readyness of file descriptors using the aio subsystem. The API is based > on patches that existed in RHAS2.1 and RHEL3, which means it already is > supported by libaio. To implement the poll support efficiently new > methods to poll are introduced in struct file_operations: get_poll_head > and poll_mask. The first one returns a wait_queue_head to wait on > (lifetime is bound by the file), and the second does a non-blocking > check for the POLL* events. This allows aio poll to work without > any additional context switches, unlike epoll. > > To make the interface fully useful a new io_pgetevents system call is > added, which atomically saves and restores the signal mask over the > io_pgetevents system call. It it the logical equivalent to pselect and > ppoll for io_pgetevents. > > The corresponding libaio changes for io_pgetevents support and > documentation, as well as a test case will be posted in a separate > series. > > The changes were sponsored by Scylladb, and improve performance > of the seastar framework up to 10%, while also removing the need > for a privileged SCHED_FIFO epoll listener thread. > > The patches are on top of Als __poll_t annoations, so I've also > prepared a git branch on top of those here: > > git://git.infradead.org/users/hch/vfs.git aio-poll.3 > > Gitweb: > > http://git.infradead.org/users/hch/vfs.git/shortlog/refs/heads/aio-poll.3 > > Libaio changes: > > https://pagure.io/libaio.git io-poll > > Seastar changes (not updated for the new io_pgetevens ABI yet): > > https://github.com/avikivity/seastar/commits/aio > > Changes since V2: > - removed a double initialization > - new vfs_get_poll_head helper > - document that ->get_poll_head can return NULL > - call ->poll_mask before sleeping > - various ACKs > - add conversion of random to ->poll_mask > - add conversion of af_alg to ->poll_mask > - lacking ->poll_mask support now returns -EINVAL for IOCB_CMD_POLL > - reshuffled the series so that prep patches and everything not > requiring the new in-kernel poll API is in the beginning > > Changes since V1: > - handle the NULL ->poll case in vfs_poll > - dropped the file argument to the ->poll_mask socket operation > - replace the ->pre_poll socket operation with ->get_poll_head as > in the file operations > > -- > To unsubscribe, send a message with 'unsubscribe linux-aio' in > the body to majordomo@kvack.org. For more info on Linux AIO, > see: http://www.kvack.org/aio/ > Don't email: aart@kvack.org