From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5793EC433B4 for ; Tue, 6 Apr 2021 01:50:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2DA99613C4 for ; Tue, 6 Apr 2021 01:50:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242283AbhDFBug (ORCPT ); Mon, 5 Apr 2021 21:50:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:44244 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238926AbhDFBud (ORCPT ); Mon, 5 Apr 2021 21:50:33 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id CF54F61380; Tue, 6 Apr 2021 01:50:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1617673826; bh=n41zLqFSWMk5LVeXau5m8v+zEL6Zomzq3+NzTcVtBbY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=V0rbPNQlutiRtvp28JhOXlBIPWXwQ8EmKXMQEBpZbZMvFpC6QppYLwiRMe7kBe1N3 EqWLAbWFbPWLfAsqBFvXd+f1UD6f5KLjlvqXcD/PKNxlj5q8ZYW8sSa+ymVhXhXtYO GNv4k81O+rdpwqL+JTbuXJKRex1/sSCU0EbgbIE8= Date: Mon, 5 Apr 2021 18:50:18 -0700 From: Andrew Morton To: Davidlohr Bueso Cc: jbaron@akamai.com, rpenyaev@suse.de, viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Davidlohr Bueso Subject: Re: [PATCH 2/2] fs/epoll: restore waking from ep_done_scan() Message-Id: <20210405185018.40d437d392863f743131fcda@linux-foundation.org> In-Reply-To: <20210405231025.33829-3-dave@stgolabs.net> References: <20210405231025.33829-1-dave@stgolabs.net> <20210405231025.33829-3-dave@stgolabs.net> 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 5 Apr 2021 16:10:25 -0700 Davidlohr Bueso wrote: > 339ddb53d373 (fs/epoll: remove unnecessary wakeups of nested epoll) changed > the userspace visible behavior of exclusive waiters blocked on a common > epoll descriptor upon a single event becoming ready. Previously, all tasks > doing epoll_wait would awake, and now only one is awoken, potentially causing > missed wakeups on applications that rely on this behavior, such as Apache Qpid. > > While the aforementioned commit aims at having only a wakeup single path in > ep_poll_callback (with the exceptions of epoll_ctl cases), we need to restore > the wakeup in what was the old ep_scan_ready_list() such that the next thread > can be awoken, in a cascading style, after the waker's corresponding ep_send_events(). > Tricky. 339ddb53d373 was merged in December 2019. So do we backport this fix? Could any userspace code be depending upon the post-339ddb53d373 behaviour? Or do we just leave the post-339ddb53d373 code as-is? Presumably the issue is very rarely encountered, and changeing it back has its own risks.