Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp6142668rwp; Mon, 17 Jul 2023 16:01:23 -0700 (PDT) X-Google-Smtp-Source: APBJJlGMUFUF4MRo8imELsUPG1SHoijLsHs9zCq4IkHkOfpi2hMAT+amf8Segt7JTYdUfPejDpWX X-Received: by 2002:ac2:5a4c:0:b0:4f9:567b:c35d with SMTP id r12-20020ac25a4c000000b004f9567bc35dmr7292166lfn.55.1689634883153; Mon, 17 Jul 2023 16:01:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689634883; cv=none; d=google.com; s=arc-20160816; b=HSxQ0UawWjN4PrzhSUYK0dasBX00L5+3exlkMI+juHkblqJyqGwVtR0aRVUs2Xq5a2 Q2jfo9dQd1KVre5xYvCyshc/S1R8rtvT7GDZJQsLRDYhWOX3GYlgoXCX1DCLkj8KN53u EtOE3ZAH316VjmllojNQJ2FtmKnJrbjhCaazI7ALP3vCOMBECVJW4ihwLp9puR6s5G82 b+6828LcS2OCC1veVeQSQhfxKaBme08aeIzB3ms1fQCKYdV+hoSDIw45zVbCrtggahtu aKrrx9QuP5v7lbPrEhJMW1bcs/yuqpw2s1ZhITwlDOIsgPRvpcVHeSfgQMfn9Tu/k3ik OJuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=8wy84DSSq8n2YYiK0mWellsvoswCFp/2kMAmdZ+UHHc=; fh=CbW1QrROxvDNDdwueH5eu7Ai5pj/BgMoHpdPWNwBxEM=; b=Lb+J52TJ3j+JQG9oMmPS8uX4ETR+Xj5WGx2+yCajni3AsDW1XdgSkBH72ak9AT7jW7 gvKRthSC5mOM4+dfB+Yej3JEXYtQs2BbXSO9pA/sm3vNRiPgXBe1a5TkOpq4mMThWa0+ VSzWFAh/kgswm6JLFn1yk8a4xcY1wd+mJuLisc1cjX2NuiMv8Pw3ftOPDGsmPIeMvCN1 da9nNiA6zl5W1gR2xgarVZHx9ZM3hUxHWay25oJQn6rRMXU4LOwD3eZWEuA37/wdQsvX IHRXzntivl75OFx61nzFSK4AkcqQuMcFuIfPcqrZnZK3JFKG0Sq+hT7xeS8TwNIXKVFE ekIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=WSU35uqK; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x7-20020aa7d6c7000000b0051df74b43f1si266258edr.539.2023.07.17.16.00.59; Mon, 17 Jul 2023 16:01:23 -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=@redhat.com header.s=mimecast20190719 header.b=WSU35uqK; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230266AbjGQWwz (ORCPT + 99 others); Mon, 17 Jul 2023 18:52:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229585AbjGQWwy (ORCPT ); Mon, 17 Jul 2023 18:52:54 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BBFD2128 for ; Mon, 17 Jul 2023 15:52:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1689634329; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8wy84DSSq8n2YYiK0mWellsvoswCFp/2kMAmdZ+UHHc=; b=WSU35uqKWX5qXsL9Eqi4qqS9SCAvtRdUoP1pqlX2O/1cZK2gLwhVZqB5eExNH9bGJCaIvz BDObKB9Pjgy9nnNWI0Mg64rgQFu1m48ni/wL21sFRtdMbxZw6ZsGTbH7RccOeY6fV1KDLB hn5FNoggx6POG5Pi2hj0zNHisqxMXTQ= Received: from mail-io1-f69.google.com (mail-io1-f69.google.com [209.85.166.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-100-SRcjj7x4NJyNjIzHw-p1LA-1; Mon, 17 Jul 2023 18:52:07 -0400 X-MC-Unique: SRcjj7x4NJyNjIzHw-p1LA-1 Received: by mail-io1-f69.google.com with SMTP id ca18e2360f4ac-786596bc0a6so317826839f.3 for ; Mon, 17 Jul 2023 15:52:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689634327; x=1692226327; h=content-transfer-encoding:mime-version:organization:references :in-reply-to:message-id:subject:cc:to:from:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=8wy84DSSq8n2YYiK0mWellsvoswCFp/2kMAmdZ+UHHc=; b=QXqEBP1YVJE22WE8LOaNq789jZElqPOSl2VMo6/W+9ivFz3NV4ytbagiVZE8mngbXq KWiCnHfhBf2MaTUQJrDsBLj3KteAxHwfKfT9D6a8ccAxQamX73AApV2yqjhVL1l7E+iz sMSLKHcv54nRDfY99/wBhBZ6xhh27U4rsbwUUsNWmj85EYkrp8ZY89d+SBt11gk9taN5 eifdEr+XhrDhH5MN8lSyjgOxoNjahc2FYXHawz1FuEWJkVJr+xPxta1RF7hfyhhMh3DX OKnvfthZ/OxKDm2GOFis99ohsI9L2hHwWfGnx0FCxVdn5Rxqb2wqzEK7p1OOkrk7t19J XeaQ== X-Gm-Message-State: ABy/qLbRApyfBSo5WMDlbcHRNK71exrmyRB1ApGOw5Nr1X/MSiZ63lFn MjNSP3FqIpDQrHzB9lrwWkv8+kvLD+I1dGq+pwm6lJaleHga54RFzfxnv1TyaPCWnKc8qG7clsW jjlecrC/LJDF20yMRhhaGyg2I X-Received: by 2002:a92:c651:0:b0:347:693a:7300 with SMTP id 17-20020a92c651000000b00347693a7300mr1012026ill.26.1689634327046; Mon, 17 Jul 2023 15:52:07 -0700 (PDT) X-Received: by 2002:a92:c651:0:b0:347:693a:7300 with SMTP id 17-20020a92c651000000b00347693a7300mr1012015ill.26.1689634326829; Mon, 17 Jul 2023 15:52:06 -0700 (PDT) Received: from redhat.com ([38.15.36.239]) by smtp.gmail.com with ESMTPSA id d10-20020a92ddca000000b00341c0710169sm242627ilr.46.2023.07.17.15.52.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Jul 2023 15:52:06 -0700 (PDT) Date: Mon, 17 Jul 2023 16:52:03 -0600 From: Alex Williamson To: Jason Gunthorpe 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: <20230717165203.4ee6b1e6.alex.williamson@redhat.com> In-Reply-To: References: <20230630155936.3015595-1-jaz@semihalf.com> <20230714-gauner-unsolidarisch-fc51f96c61e8@brauner> <20230717130831.0f18381a.alex.williamson@redhat.com> Organization: Red Hat MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_NONE,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, 17 Jul 2023 19:12:16 -0300 Jason Gunthorpe wrote: > 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 Sure, userspace could poll on any fd and read a value from it, but at that point we're essentially duplicating a lot of what eventfd provides for a minor(?) semantic difference over how the counter value is interpreted. Using an actual eventfd allows the ACPI notification to work as just another interrupt index within the existing vfio IRQ uAPI. Thanks, Alex