Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp3180170ybd; Mon, 24 Jun 2019 21:07:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqzwxA13OpXkkZoDWDPcL+ESKdWfRGv1bRaksLIuav7Q1RvUWfTD5PARZp+KNkMGzMt23ec0 X-Received: by 2002:a17:90a:cb8e:: with SMTP id a14mr28607388pju.124.1561435623077; Mon, 24 Jun 2019 21:07:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561435623; cv=none; d=google.com; s=arc-20160816; b=u8Tq8NG2zDBu203ZbvL5yGPEVMTM+YwC+XH/42vSV+aIGKAYr/80LhhljP78wENQcC KflfSFTj6S27BdEOejI1i6Agls8ph0CVcfKT5QXSEaloZWcSIxEDzC5zK1O1pczFlv0W Dzna5gg2a88eRN9O9y8JXDBWpafvINrpE1oaGNsYn3PXbKq5jr2+dgG7Y45RzeCcR63Q fGVoMYw+VkDpv3/rjBU+44H5KcCuzLTpKB1RTVniCpupbOBojwqHxFRJQPEui0NoMvSJ JLCWE2nPp0POc8jdk/Xji/A0mvPnIpj8kqsxfKgv9fscMpIQcKKrY10k+7Z9znJRkUSe DYcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=CrUq/zWhObXHk5fYUoNI8z6Z8H3pxW04424s5zW5lE8=; b=r2km8WxrIwxguYvM2m9mKXH+rhB7JojJuFiV1Z/AFONH32Rekqku9fl0vr0zcFLF/f w5qdPRDQVvzP0O8f6bLU+0c5UJKsY2/aNvcWAxcrD7Grb24O+Ar5BdIE5mhKL14tSDBP U/8Ar15nKJPLooTVEQVUw68JaLEHLF9kK1SsB6Tl69ov9fPIEnFPQ0npkhD6jVtc4Kcv NTwNmffRuUIS8GQKtjpCXaRyzwD6q8SiedAFpkbrzM+JIKcomNTqESK2j/0TCqWmh28P Oz8dHibKy/poLBcDfpvoWL59yx8jl8WTmRR1qhbyYVHdfTA0TV5AMdAiAqPXmezDo0lR rGSQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h15si12215958pfn.96.2019.06.24.21.06.47; Mon, 24 Jun 2019 21:07:02 -0700 (PDT) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728881AbfFYAY5 (ORCPT + 99 others); Mon, 24 Jun 2019 20:24:57 -0400 Received: from dcvr.yhbt.net ([64.71.152.64]:39668 "EHLO dcvr.yhbt.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727174AbfFYAY5 (ORCPT ); Mon, 24 Jun 2019 20:24:57 -0400 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 9C87D1F461; Tue, 25 Jun 2019 00:24:56 +0000 (UTC) Date: Tue, 25 Jun 2019 00:24:56 +0000 From: Eric Wong To: Roman Penyaev Cc: Jason Baron , Andrew Morton , Al Viro , Linus Torvalds , Peter Zijlstra , Azat Khuzhin , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 00/14] epoll: support pollable epoll from userspace Message-ID: <20190625002456.unhdqihvs5lqcjn6@dcvr> References: <20190624144151.22688-1-rpenyaev@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190624144151.22688-1-rpenyaev@suse.de> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Roman Penyaev wrote: > Hi all, +cc Jason Baron > ** Limitations > 4. No support for EPOLLEXCLUSIVE > If device does not pass pollflags to wake_up() there is no way to > call poll() from the context under spinlock, thus special work is > scheduled to offload polling. In this specific case we can't > support exclusive wakeups, because we do not know actual result > of scheduled work and have to wake up every waiter. Lacking EPOLLEXCLUSIVE support is probably a showstopper for common applications using per-task epoll combined with non-blocking accept4() (e.g. nginx). Fwiw, I'm still a weirdo who prefers a dedicated thread doing blocking accept4 for distribution between tasks (so epoll never sees a listen socket). But, depending on what runtime/language I'm using, I can't always dedicate a blocking thread, so I recently started using EPOLLEXCLUSIVE from Perl5 where I couldn't rely on threads being available. If I could dedicate time to improving epoll; I'd probably add writev() support for batching epoll_ctl modifications to reduce syscall traffic, or pick-up the kevent()-like interface started long ago: https://lore.kernel.org/lkml/1393206162-18151-1-git-send-email-n1ght.4nd.d4y@gmail.com/ (but I'm not sure I want to increase the size of the syscall table).