Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp6134911rwp; Mon, 17 Jul 2023 15:49:46 -0700 (PDT) X-Google-Smtp-Source: APBJJlGb4A7vlHFIrQt9i9ASQC4tUeazcWLsPSUKs9SuAD8abXRRlHwAljy4jkTSTrADDXOY8csA X-Received: by 2002:a17:90a:9f91:b0:262:fe45:860b with SMTP id o17-20020a17090a9f9100b00262fe45860bmr12477030pjp.0.1689634185900; Mon, 17 Jul 2023 15:49:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689634185; cv=none; d=google.com; s=arc-20160816; b=hBG9LAe2eT5ptsfMiBw4iVOSCDdddHncuIy0vr9zmAFsGzBPeOmDb2M1Zq+LiN0h/g xPAVebdFEUxmR5kVeGJt645zswt4iBfMJGci2ITktiGZNvu9S2vNzsoF8trMuMtzkVv2 86i+vQRILWrKE1Y+gUdcEkfsSEBUzePgsjSpYEcrw6/bM9JMAWPR71wx25eE+dBvy2it /1MPvfn9YcwHXkyv7U7lmQ1hppTJI6/MQqhzncvtiV+JoqbK/fiJTxrMmiNu3AxdwXTt dLgKBAleIBDbEHyJHUuIxZcphWHk7D3PzyW9WvzVpsKTyM7WBsu+XucnEfVL6cBEIJkd P11w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=nfZGdLayIsQ4EXLbarw1/OO0pNLBzQdwR1vEqsrzGII=; fh=4Lon+ilxlPy/J6nFIQB7H19XP3TYWf+oaeCX/q2NejM=; b=aAzJZFd1f7VhIu/+n84SpROiHSy8bk/2HW6u1DvlXAYWkQhyXfAARdSudogwixWDjc SuHeP/ZHSI1scXcw0IOYifGWTxipASWygRq7NgcIIDvwcN/R/VIYv3UcjV3J2KrwopNL JRL4PVk8AfLq9RpM2FVTr6GHTDYLiBGPaitjCFLAIxGvEWT117WWSr7bpo3gtVWRoaNA kDbu91R8PwJoxD/Yr+iA6U10+NSC0qQB2bEideI849vUaJJ5uvI9hXNfy+tz25snD/Dk rG7kkwjMWDt0srGvM8CRa/BS2zf0FSQO7s7dLqOLlUN+zNm4PYFZAE1IYVjbZeEMOtcs IbyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=Jk8Ffu+z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w12-20020a17090a8a0c00b002676bf94cc4si6422772pjn.134.2023.07.17.15.49.32; Mon, 17 Jul 2023 15:49:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=Jk8Ffu+z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229923AbjGQWMZ (ORCPT + 99 others); Mon, 17 Jul 2023 18:12:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36810 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230139AbjGQWMY (ORCPT ); Mon, 17 Jul 2023 18:12:24 -0400 Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C53AE2 for ; Mon, 17 Jul 2023 15:12:20 -0700 (PDT) Received: by mail-pf1-x42f.google.com with SMTP id d2e1a72fcca58-68336d06620so5110009b3a.1 for ; Mon, 17 Jul 2023 15:12:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1689631939; x=1692223939; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=nfZGdLayIsQ4EXLbarw1/OO0pNLBzQdwR1vEqsrzGII=; b=Jk8Ffu+zgnI1CsgL7PShvnMc/G0hm1hbh3TPz5Fbc34BI/VC6K+YvpO0Dtz1Q06LcE vf29m9vckcSQeAqUEVUy2hQg3wChzTMiZjPdUNSWsPB40TqlA/Z3Z90RDeI/5eGEIh5a oHIWxzri1XJMuhuB2UIvkNGwKQM8BtpRM8RbCOHyQCc7eetsY5S+VbcO2iAUIljyLIvn 7DgUtRFxxg3tnphZnCaerMskJ/OIgXT3e8pOBne6YWSI+yYb8YG43ww6ejPC+GReMaLK AQZU6DLVDF3nw8hq4CMA6FGa2JzmC2rObjfL+xz46TVHFpF838cUJw0/Qyn0hTY2P629 8fnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689631939; x=1692223939; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=nfZGdLayIsQ4EXLbarw1/OO0pNLBzQdwR1vEqsrzGII=; b=NavHHBz+hlz2w6owNkybMCe+0+qyW8oM53DQbMDbYtXeGxiqFlAaSa2y5QxXNo+dhw BqnduBbVRmlu6rXI/3R9Y62XLwje62u8gYKNKY0xf3ZaN8ZpAD7XEZxPw1wUeg4WqQmN /v5rgO4xw8OKVj+xWhTbKOmadHPdmMj9liQkappoABbyd+nukGPI+z3kgyECr3p6uhYw C0umKonkk7KOOFM5LvlMwwXtPom5bpCMWgQnPT/BPtXZJStsa5J4Ti0EDYV6SxNmJiqP 3I8XRJyV01tZgTZUD77d7aqhMyWmiX/DFcRYxYfvJ/ajdP8vU+MGXaskHQjHLRAAPpYF A1Ag== X-Gm-Message-State: ABy/qLb4X3hPK7Ouph7UJ3i0csPXeM5VWt4Jb6ovuIw0Nre3G2JMH21V ysg7prcs1sSPbo82MtSWsJ4eCg== X-Received: by 2002:a05:6a00:2307:b0:668:81c5:2f8a with SMTP id h7-20020a056a00230700b0066881c52f8amr19367164pfh.17.1689631939323; Mon, 17 Jul 2023 15:12:19 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-142-68-25-194.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.68.25.194]) by smtp.gmail.com with ESMTPSA id q185-20020a632ac2000000b0055fedbf1938sm278952pgq.31.2023.07.17.15.12.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Jul 2023 15:12:18 -0700 (PDT) Received: from jgg by wakko with local (Exim 4.95) (envelope-from ) id 1qLWS0-002PFZ-GX; Mon, 17 Jul 2023 19:12:16 -0300 Date: Mon, 17 Jul 2023 19:12:16 -0300 From: Jason Gunthorpe To: Alex Williamson Cc: Grzegorz Jaszczyk , Christian Brauner , linux-fsdevel@vger.kernel.org, linux-aio@kvack.org, linux-usb@vger.kernel.org, Matthew Rosato , Paul Durrant , Tom Rix , Jason Wang , dri-devel@lists.freedesktop.org, Michal Hocko , linux-mm@kvack.org, Kirti Wankhede , Paolo Bonzini , Jens Axboe , Vineeth Vijayan , Diana Craciun , Alexander Gordeev , Xuan Zhuo , Shakeel Butt , Vasily Gorbik , Leon Romanovsky , Harald Freudenberger , Fei Li , x86@kernel.org, Roman Gushchin , Halil Pasic , Ingo Molnar , intel-gfx@lists.freedesktop.org, Christian Borntraeger , linux-fpga@vger.kernel.org, Zhi Wang , Wu Hao , Jason Herne , Eric Farman , Dave Hansen , Andrew Donnellan , Arnd Bergmann , linux-s390@vger.kernel.org, Heiko Carstens , Johannes Weiner , linuxppc-dev@lists.ozlabs.org, Eric Auger , Borislav Petkov , kvm@vger.kernel.org, Rodrigo Vivi , cgroups@vger.kernel.org, Thomas Gleixner , virtualization@lists.linux-foundation.org, intel-gvt-dev@lists.freedesktop.org, io-uring@vger.kernel.org, netdev@vger.kernel.org, Tony Krowiak , Tvrtko Ursulin , Pavel Begunkov , Sean Christopherson , Oded Gabbay , Muchun Song , Peter Oberparleiter , linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, Benjamin LaHaise , "Michael S. Tsirkin" , Sven Schnelle , Greg Kroah-Hartman , Frederic Barrat , Moritz Fischer , Vitaly Kuznetsov , David Woodhouse , Xu Yilun , Dominik Behr , Marcin Wojtas Subject: Re: [PATCH 0/2] eventfd: simplify signal helpers Message-ID: References: <20230630155936.3015595-1-jaz@semihalf.com> <20230714-gauner-unsolidarisch-fc51f96c61e8@brauner> <20230717130831.0f18381a.alex.williamson@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230717130831.0f18381a.alex.williamson@redhat.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 17, 2023 at 01:08:31PM -0600, Alex Williamson wrote: > What would that mechanism be? We've been iterating on getting the > serialization and buffering correct, but I don't know of another means > that combines the notification with a value, so we'd likely end up with > an eventfd only for notification and a separate ring buffer for > notification values. All FDs do this. You just have to make a FD with custom file_operations that does what this wants. The uAPI shouldn't be able to tell if the FD is backing it with an eventfd or otherwise. Have the kernel return the FD instead of accepting it. Follow the basic design of eg mlx5vf_save_fops Jason