Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1242013ybi; Thu, 30 May 2019 14:04:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqyZwZPi5ty0fD9ZHZfWXRUsoeigkMjONt97/F1IbSAOKSPTt7qOMWa1bHRMrAfGFf0ifFQN X-Received: by 2002:a17:902:24c7:: with SMTP id l7mr5609719plg.192.1559250290741; Thu, 30 May 2019 14:04:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559250290; cv=none; d=google.com; s=arc-20160816; b=tqVZ8kNw9shRNIL8h7JR1ciZ+XJ/61mEH7p32td0AFtB2KhtixiHuudXjE2F92MGqu OlwQO4Zo56KYa5JsvTqzHi62QVX0mEN/9gCxosH8Szyu62QU16NlPOtNbCUJ4ToVprbX 2oZPsOXsNkU/L1cO45LOaTAb3YQpoHM3/IJ7pF58bgEFVLBWoz/F65EcyJonB0mKo0hS e6AlFNN2dg4NjmshoP2L9RLHiGw72VnhrS04E9cnm+nPDkS8tkxZTsrPHe2++MbruOt9 PlfCy0SunG2+KfV6TObCaaxJHajtrYJrHcKtl4nxtjHMEK2gCnbFPfcFqqfyU3LG+ZRQ hn0Q== 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=NXMwf1iWqsOijO7Ojnh6YteeIHwNFqT30NUw2HZD52s=; b=qQJTq40c7HymUm/5FY+UMZHIdxR5psS+jXuraVXluOGX1Gpn4z7aO+dCsXcFny0WW/ wYuBpSK/REr0MBoIuSXwK1MkmRzyXT2vb/kMeAiyZSB43xFx7veS1tvug3pws+bGYoHb EKAZM3KQoHHf21ln7E46mg2RXL/lgu9IBQi2pYgfiExEsxqF87yae7plaqqf62MVPiIq JL8pKSB0cT1VK4jipsUzCjHr96p2wzOzpTkz+VC/GeqAk+iSnSjVv3Ae5wxoownCjjo6 Y9ntFqXF0a7MhYMhgQ3dGpDXaPP2J59Qn4ZW9DPQd84JCxHHA2eolkKx+YM5NbqT4mqr Iy/w== 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 f16si3728434plr.340.2019.05.30.14.04.34; Thu, 30 May 2019 14:04:50 -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 S1726579AbfE3VDU (ORCPT + 99 others); Thu, 30 May 2019 17:03:20 -0400 Received: from dcvr.yhbt.net ([64.71.152.64]:57428 "EHLO dcvr.yhbt.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726079AbfE3VDU (ORCPT ); Thu, 30 May 2019 17:03:20 -0400 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 1567A1F462; Thu, 30 May 2019 21:03:19 +0000 (UTC) Date: Thu, 30 May 2019 21:03:18 +0000 From: Eric Wong To: "Eric W. Biederman" Cc: Oleg Nesterov , Deepa Dinamani , Al Viro , Linus Torvalds , linux-kernel@vger.kernel.org, akpm@linux-foundation.org, arnd@arndb.de, dbueso@suse.de, axboe@kernel.dk, dave@stgolabs.net, jbaron@akamai.com, linux-fsdevel@vger.kernel.org, linux-aio@kvack.org, omar.kilani@gmail.com, tglx@linutronix.de, stable@vger.kernel.org Subject: Re: pselect/etc semantics Message-ID: <20190530210318.dbappo23kdcysraw@dcvr> References: <20190522032144.10995-1-deepa.kernel@gmail.com> <20190529161157.GA27659@redhat.com> <87woi8rt96.fsf@xmission.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <87woi8rt96.fsf@xmission.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org "Eric W. Biederman" wrote: > Frankly the only reason this appears to be worth touching is that we > have a userspace regression. Otherwise I would call the current > behavior more correct and desirable than ignoring the signal longer. > > If I am reading sitaution properly I suggest we go back to resoring the > sigmask by hand in epoll_pwait, and put in a big fat comment about a > silly userspace program depending on that behavior. > > That will be easier to backport and it will just fix the regression and > not overfix the problem for reasonable applications. Fwiw, the cmogstored (userspace program which regressed) only hit this regression in an obscure code path for tuning; that code path probably sees no use outside of the test suite. Add to that, cmogstored is an unofficial and optional component to the obscure, largely-forgotten MogileFS. Finally, the main users of cmogstored are on FreeBSD. They hit the kqueue+self-pipe code path instead of epoll_pwait. I only used epoll_pwait on Linux since I figured I could save a few bytes of memory by skipping eventfd/self-pipe... Anyways, I updated cmogstored a few weeks back to call `note_run' (the signal dispatcher) if epoll_pwait (wrapped by `mog_idleq_wait_intr') returns 0 instead of -1 (EINTR) to workaround this kernel change: https://bogomips.org/cmogstored-public/20190511075630.17811-1-e@80x24.org/ I could easily make a change to call `note_run' unconditionally when `mog_idleq_wait_intr' returns, too. But that said, there could be other users hitting the same problem I did. So maybe cmogstored's primary use on Linux these days is finding regressions :>