Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp4238083ybn; Fri, 27 Sep 2019 19:29:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqwqTVtwHtbE+zCmPFX4MRm+WYftYjEJf8lewLZ1ozrqjU3uzzfwK2j60zajZZ0Ha/z39RJ2 X-Received: by 2002:aa7:d789:: with SMTP id s9mr7968198edq.62.1569637797990; Fri, 27 Sep 2019 19:29:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569637797; cv=none; d=google.com; s=arc-20160816; b=s7GDqyV1wUbTQ7O9rmvP+ALS3Z17raN3OR7gHikL2r27Ics4dSVr98PoEna4JexGUL Vdk86+Mq/GiV+ONH0aXDuvamm5jTQoMIMq+l4h5PzT9Q7Kv6GDyGRcJgTK8QKmXg4cvs IBcNxeNgjlXFDzZDJUnVGlQqGkp7ZjDZRlHoHD5YsjHE+tLRZYJzloVKNZmTUGnvBb4J xQTobnTT6qaI0azbvnSc/KTLTmFPgogJHK+2EMurOJ8/5vahkhG/P98z8mhbxoJXTa7N hdJe9nph3TDcSbtqlfVGRSMKEGQhKDqld1JSzry8A9Wwm2jRIjuzIRvZ6X4hmnhAHwsA BEnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=an2WnonCSqteFjXJcNy5wrxPRiz++gTbhv8WLp6Ow2w=; b=vHgwfAsOBElkyS6PwQ/Vuh3nyA/yen6ZhGYxb07L3b0g6SzPd/aRfge1KaFwXTauAW BlGwpY15qU+l+EuS7U93aTjoMlgrK6rdneI9b/VtDy2KfD6QE/SGqGBeLL43L3/I+ulG mMlRFWY3PbNVo0o1m9HWy2/gf/yt7WyanAIkwueIL/xAHlJYJnvBghc+AMJl8LAzXXAy hJPmTyIqV52wQx1rkVOHDSQQ9j/oVhmJBWiyniFTsKt88s1OC8RjtP5QrZhnuVSDr1/n DJqQkbceMOkhhtpZOk0DKEnwQyIBH5zVpgbRdLia3c5t8qdEa5nl9nD47q3IzlO99IBJ tL0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tgaG0uOU; 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 c9si2877613eda.229.2019.09.27.19.29.33; Fri, 27 Sep 2019 19:29:57 -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; dkim=pass header.i=@kernel.org header.s=default header.b=tgaG0uOU; 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 S1728375AbfI1C3Q (ORCPT + 99 others); Fri, 27 Sep 2019 22:29:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:57542 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726033AbfI1C3Q (ORCPT ); Fri, 27 Sep 2019 22:29:16 -0400 Received: from localhost.localdomain (c-73-231-172-41.hsd1.ca.comcast.net [73.231.172.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 863B620869; Sat, 28 Sep 2019 02:29:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1569637756; bh=DjezQNrhL5RoYpTkbIb4gBWCVmhYLj92teI/9u5Sx3U=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=tgaG0uOUvZGie4JEzdqPnkHWldCPBPzN1WiFgCWvtYeuPwzs7AAiHzraa/bo9j7HB UNRFmnt2ARnJzxIo8UUpPRC9uDYR4Mn3/X1J6l2dgkYiQD/gTG0eJKA9J63W78LC6w GT8TqVKI6WFaHT6WEubvLFRYnNu9Xit4tu0dpOyY= Date: Fri, 27 Sep 2019 19:29:15 -0700 From: Andrew Morton To: hev Cc: linux-fsdevel@vger.kernel.org, Al Viro , Davide Libenzi , Davidlohr Bueso , Dominik Brodowski , Eric Wong , Jason Baron , Linus Torvalds , Roman Penyaev , Sridhar Samudrala , linux-kernel@vger.kernel.org Subject: Re: [PATCH RESEND v4] fs/epoll: Remove unnecessary wakeups of nested epoll that in ET mode Message-Id: <20190927192915.6ec24ad706258de99470a96e@linux-foundation.org> In-Reply-To: <20190925015603.10939-1-r@hev.cc> References: <20190925015603.10939-1-r@hev.cc> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 25 Sep 2019 09:56:03 +0800 hev wrote: > From: Heiher > > Take the case where we have: > > t0 > | (ew) > e0 > | (et) > e1 > | (lt) > s0 > > t0: thread 0 > e0: epoll fd 0 > e1: epoll fd 1 > s0: socket fd 0 > ew: epoll_wait > et: edge-trigger > lt: level-trigger > > We only need to wakeup nested epoll fds if something has been queued to the > overflow list, since the ep_poll() traverses the rdllist during recursive poll > and thus events on the overflow list may not be visible yet. > > Test code: Look sane to me. Do you have any performance testing results which show a benefit? epoll maintainership isn't exactly a hive of activity nowadays :( Roman, would you please have time to review this?