Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp64411ybz; Fri, 24 Apr 2020 11:52:50 -0700 (PDT) X-Google-Smtp-Source: APiQypLMPs9CS+fdoDeUR9eJZ9lN6UERG/Hifz5jMYVWdxYXprqHvrHGsqArKQJiuNrL5fX2IXIv X-Received: by 2002:a17:906:7e19:: with SMTP id e25mr8836310ejr.358.1587754370199; Fri, 24 Apr 2020 11:52:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587754370; cv=none; d=google.com; s=arc-20160816; b=jnzlVTsXj6scMTcE4ahi0uK/K+XUxgqXLxPGcZEw8IYzZuOTdP/HWESmREo7YsvACm DWLxokiv8bvranV1V5p0y49BiUD+gzB97cKUDeggiQ4t1VuwXYxJfd6zsMeNdmAIAhHi JqvQHHQSFLaGU8yh66MZAE2g6Xi8OOBWHI2VZVPdEr+eWoRoiF2gygkvTVavkSXQ0+Z+ 5JMBXwVISvCRD9V9JMvyOJV5gRMp4Hkj4IGAaOQ/K9LFsjcDDBxA/Alp3tJDGPLm3UJN WAQOuyYP4rdGXdObXSFcxmG9kpdC9rSBxID+lbGPzQsuDgC7dENLrBhjpsHnAbobvdLS XHJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=wZeVoWeAa13Mlv1fZqgWwX7RoPxVMKOEPqsNKj2n4QA=; b=UoWMjSJBUsNs8Sl9rJJBKV8I8nhsAtKluqiTpLQSt5DDijMvAyQdkkhvkUwj2nDRCS wLw2GNLjMBmXzl0/XQb2HMk10ONGwxob9IGYAckfyLOF+vkpWiPQ05lrG6XqCwo8RNCC RCIGpqzw2KXrkzzm1kpZiUYiphdjExgX5t+qLB1V3WPENwRiq04eid5FYF3hEkVuzZZa vub7LMxUcqjoPWiL0TFS0tlTIWcgn5nzkqyJMkqFOVsjEi/J3ftiez/I7puzjmtq6f0q HC7HjaDFX4vIKPS0OXSl3DA3PsULwHUNDGoP/MWBSXoIyLmXPkEtYQ3xiGvNneacAppI aZDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=ulvI+bqI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d12si3892844edo.4.2020.04.24.11.52.26; Fri, 24 Apr 2020 11:52:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=ulvI+bqI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729237AbgDXSuP (ORCPT + 99 others); Fri, 24 Apr 2020 14:50:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1728908AbgDXSuO (ORCPT ); Fri, 24 Apr 2020 14:50:14 -0400 Received: from mail-qk1-x742.google.com (mail-qk1-x742.google.com [IPv6:2607:f8b0:4864:20::742]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 38AB7C09B049 for ; Fri, 24 Apr 2020 11:50:14 -0700 (PDT) Received: by mail-qk1-x742.google.com with SMTP id l25so11281870qkk.3 for ; Fri, 24 Apr 2020 11:50:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=wZeVoWeAa13Mlv1fZqgWwX7RoPxVMKOEPqsNKj2n4QA=; b=ulvI+bqIsv3jNXhZVs5570lEwEvk8XXuDgvkVXBaK3+2Ul4LdU6lsQzxAbtpo+LBbD 0st/5AVcLUWskQR63N2l90uLef6OczevDH5fe6Abc9Fqe01mEL+CY0c+QcmwCgipnH7U +xyCbvki6p4UrHciyrr8zcjZOvw3WFMjRumOlJ9Pq6BE+/rI1neJ/n/Fbk92CamdVjdC DOJLW8BJv0iTCuJ8j4DpifRCVlWoCfpAdAijMdTPJ7imXzvHGoVkThWMH6sFHgJdnzeE JD/CAa/Bz3L3x1G2No9GQPZxgKmpIXp38MGKH+/+gBJqI7TDI/TKHQf2ODSB7Yx+woLb vmeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=wZeVoWeAa13Mlv1fZqgWwX7RoPxVMKOEPqsNKj2n4QA=; b=ttHNk2JPrnpUExL6niBVe9DmJ8EDmhMZT8KrMkEwqjz+9+bQh4f3/lOvZx/xLiKdAZ w+E0hPVz5fXLqY6TWSWX7ddSbN/e7omXKIG6iVJG2E1g+LmP8ABVZAx7MmnUTpXhTx/I 2Rv+pCtNsK1d/0cWhhq12z4Io+KOtvuwAC+2exEqgMXhX0ganC73VgNFcCdSPzxtmjsG FtbNnU8X0CXTn1NQUcnaUs6hAU3j5wp8u/2NBho+5TPP28vu3ZEPtFi2FFkJ4XCJnKP8 ASHfm/MgxiiL0UPr9oje/z29zfD+uWwfcUgzUFka6Njg3TkUbvTqeWeZZBaQFQMEz5Af ikoQ== X-Gm-Message-State: AGi0PuZLUNgFURz6fc/u5n0JhXGUyldWY98A10jiCtddImbp34TfGi0U yhVoQhlva4uzPzsD7S0yzfVF92gjLOobjcj1wUySBA== X-Received: by 2002:a05:620a:41a:: with SMTP id 26mr10065764qkp.421.1587754212911; Fri, 24 Apr 2020 11:50:12 -0700 (PDT) MIME-Version: 1.0 References: <20200424025057.118641-1-khazhy@google.com> <2bd5fcb37337dd7248a5cb245bf8dde9@suse.de> In-Reply-To: <2bd5fcb37337dd7248a5cb245bf8dde9@suse.de> From: Khazhismel Kumykov Date: Fri, 24 Apr 2020 11:50:01 -0700 Message-ID: Subject: Re: [PATCH] eventpoll: fix missing wakeup for ovflist in ep_poll_callback To: Roman Penyaev Cc: Al Viro , Andrew Morton , r@hev.cc, linux-fsdevel , Linux Kernel Mailing List Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="000000000000e4118805a40dd5b1" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --000000000000e4118805a40dd5b1 Content-Type: text/plain; charset="UTF-8" On Fri, Apr 24, 2020 at 3:11 AM Roman Penyaev wrote: > > Hi Khazhismel, > > That seems to be correct. The patch you refer 339ddb53d373 > relies on callback path, which *should* wake up, not the path > which harvests events (thus unnecessary wakeups). When we add > a new event to the ->ovflist nobody wakes up the waiters, > thus missing wakeup. You are right. > > May I suggest a small change in order to avoid one new goto? > We can add a new event in either ->ovflist or ->rdllist and > then wakeup should happen. So simple 'else if' branch should > do things right, something like the following: > Thanks for the review! I agree, I'll send a v2 without new goto --000000000000e4118805a40dd5b1 Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIIPBgYJKoZIhvcNAQcCoIIO9zCCDvMCAQExDzANBglghkgBZQMEAgEFADALBgkqhkiG9w0BBwGg ggxpMIIEkjCCA3qgAwIBAgINAewckktV4F6Q7sAtGDANBgkqhkiG9w0BAQsFADBMMSAwHgYDVQQL ExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMzETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMK R2xvYm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