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=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 81B0AC28CC0 for ; Thu, 30 May 2019 21:03:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 62E85261A7 for ; Thu, 30 May 2019 21:03:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726308AbfE3VDU (ORCPT ); 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-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@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 :>