Received: by 10.223.148.5 with SMTP id 5csp7814341wrq; Thu, 18 Jan 2018 09:51:55 -0800 (PST) X-Google-Smtp-Source: ACJfBovz460RV1F4eNZm9tTmu1FfgABQ4hTfhg1c28vpEKKAzHkTjZJ5Dqtbra4VfGp78q4UcwAb X-Received: by 10.98.198.139 with SMTP id x11mr2784679pfk.127.1516297915430; Thu, 18 Jan 2018 09:51:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516297915; cv=none; d=google.com; s=arc-20160816; b=yEYrM1uCwAdON6EQhtrTi1Dua/D9psaLabaFpbes4TNKaJRmcoX5nvDRBeRefP2PYd T2pJyORW8nmMZsppZ3I5+u5N7DkizKBzJk4TbXGQU+TJ+7mxmoMOgY+N87tWFfGheAt2 1k3wln2pgcCWdAxTHeyM7yWFOw6SvFtoFiWyT5/Ak4L8Q+xuVe89wjwWDA2EqsZOW4eP JDKex2sO8xdZlAx0Nt3TosS4/+h55lmekfYu/zIuXDAJAE+esxxbwMBL6oKwk+0Q5Z/E CusFm2kLb+Kc+5Zgd3tStZMRG1PUEGx++wYMXZ5b/WJF0FRzPsR6EIylaW0xQXnfyq+R OAow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=dxtgPpXtbr4zINZPw8gwUUrS0+8n9OFynfIWMcFlzd0=; b=bcMOfs9Sopa8yW0/gtPjUcbJ0nuufqO74DhdRLSj1vJDPspD/p2bNiYQq+vHqngRqf WyWkX2dB53b8YJzbM+wUavbPYLqZhTi7mhrcYzhylqK5YGy/A2sVFyFcMkWbAAcljKvU OqOVSog3BUih17Zl2y+1lErM1vyBoDxR2sp601BUH7WSRw/+LiBl6wmxYi6TZ7p02Lib OptdR9Ckmv47/OXk7zA+FSlqWP/WeU2HrhLlWHg7xU7hACRIYxngPk9GVcbL5IfHbCtZ JY9qkkugpYiit7I4lqRt81b58JydnV8orQsQSjj7sLphlA06kZEL1RnLHLqiqGZVwEa1 PY0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@scylladb-com.20150623.gappssmtp.com header.s=20150623 header.b=HlT/QvM4; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y6si6611622pgs.458.2018.01.18.09.51.40; Thu, 18 Jan 2018 09:51:55 -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; dkim=pass header.i=@scylladb-com.20150623.gappssmtp.com header.s=20150623 header.b=HlT/QvM4; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755504AbeARRvR (ORCPT + 99 others); Thu, 18 Jan 2018 12:51:17 -0500 Received: from mail-wm0-f42.google.com ([74.125.82.42]:39434 "EHLO mail-wm0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755084AbeARRvO (ORCPT ); Thu, 18 Jan 2018 12:51:14 -0500 Received: by mail-wm0-f42.google.com with SMTP id i11so24479247wmf.4 for ; Thu, 18 Jan 2018 09:51:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=scylladb-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=dxtgPpXtbr4zINZPw8gwUUrS0+8n9OFynfIWMcFlzd0=; b=HlT/QvM4QqasXw/690qACpCk77t8Hx7s7exCnGlzGJc1W7gyONy28AsM1tZesc7u6n ONECBiiY/01pjn+TKqLjs/WO9Hc3wwyj+dh672yx7sihuo2BN2/3sJjNYYg2y3e8Kn1x KwdBdxHljHVhfcIfGlYqqD0NbFBuMW/qxudWo7fOXkh301kUUKyLvGCLomcNCitiuwGZ 6AHasN2UrZXa3YDqghvq8KdCMlYlGVtJ1pdA1xH3a09kcUHB0jhCrEisfiMWtbBjUM/P 9cQdLNU9CPf2TkZMhE+w6MMvCuq2QPzCN0ie7QkIIewXecmSidHBNGv+TB4NjafwE6/y Wodg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=dxtgPpXtbr4zINZPw8gwUUrS0+8n9OFynfIWMcFlzd0=; b=OJ1HkpF7HYjzLIzed4VhqKU1doTeK+4KihZjp177lGmtO/gnPkiLIZBH5DLc6gt2Az 9+j/SxXRB35webYQoTAc0iPq6vVFJCZGnEcJ+cCikHZIpSs4I3Ul3VV/aVbmoe6eiWkz ASnS+qtdGfqmnLgJfwIhcy7r4iC9XgXAQuFaWKEAUUyZRrzd2l6O/8cdq1v2BylWz+R8 ng1YQyWJJPsZV7OWaCJrzX0MD9ySfaiFrXpqqplfKOJPcWbwjK/7ryFc+PoDGAOGOHN7 YfEqNYJa9+XHRaVZYi4PYpuFAiPlrvDIAQbdLLlYnj/3/1tF4C25zOksvl/TxPkNZKSB 1g2A== X-Gm-Message-State: AKwxytc8Gqi6rIVzvgzfvVYnhta16SRwjdonVrhBnercG7/k9X0Z4eaw ACrdZvCGbHco6I9TZdgX17uTtA== X-Received: by 10.28.157.206 with SMTP id g197mr5620288wme.96.1516297873161; Thu, 18 Jan 2018 09:51:13 -0800 (PST) Received: from [10.0.0.3] (bzq-109-65-107-243.red.bezeqint.net. [109.65.107.243]) by smtp.googlemail.com with ESMTPSA id y204sm5488885wmg.44.2018.01.18.09.51.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Jan 2018 09:51:12 -0800 (PST) Subject: Re: aio poll, io_pgetevents and a new in-kernel poll API V3 To: Jeff Moyer , Christoph Hellwig Cc: viro@zeniv.linux.org.uk, linux-aio@kvack.org, linux-fsdevel@vger.kernel.org, netdev@vger.kernel.org, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org References: <20180117192742.710-1-hch@lst.de> From: Avi Kivity Message-ID: <7f66bc5a-e9dd-fe4f-c07a-f3de3882365b@scylladb.com> Date: Thu, 18 Jan 2018 19:51:09 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/18/2018 05:46 PM, Jeff Moyer wrote: > 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. FWIW, I'm running an older version of this patchset on my desktop with no problems so far. > -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