Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp7077259rwp; Tue, 18 Jul 2023 09:41:04 -0700 (PDT) X-Google-Smtp-Source: APBJJlGZxTuLFG3hCjMG3e9KsWeZA4kVbhieg8y2bNJElZUKdpvvG113EW15MnPmLDsUaOmY46De X-Received: by 2002:a05:6402:518d:b0:521:66b4:13d6 with SMTP id q13-20020a056402518d00b0052166b413d6mr289754edd.4.1689698464285; Tue, 18 Jul 2023 09:41:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689698464; cv=none; d=google.com; s=arc-20160816; b=gZ78P2Eq8MuerU+lvznhRlteCr9qIke3uY4H7TvbPVTJEIDAk0UbImVqbSv3hL6BdV qIFZ87Gu6HtRLO5YFBZ/T+r649ALkscNv+rkNJIOTeZP4bi/P1JV4JjB5A6RsdLWNi5W SCVO7/25Xrxn+jOpdxrC7Vbn18AAcMbtRnpMwZ8CkyVmJIqtxjnjA94vt0t5aZqu1mTq 2rMHvlOXg3bJohxJZ6nloNGFLquKvR/0jgeFe8z+TkIPsXLgPA8+ZFIWyxGs6VOggb0P KxgMy3cnnL2WRvZv3vpqnOeJRT1PY8f/Nd7QdU9BQbkAKEqtBjzhVUyS2IOXAxjvZ/IA FfyA== 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=Tjh+qVHNBsaCt+fpZytXbv4JtN2Kf+QfiKBiC+OQp3c=; fh=4Lon+ilxlPy/J6nFIQB7H19XP3TYWf+oaeCX/q2NejM=; b=wYCx8ExNfJGfprngEeVqUOYmL9I7IsKK80jjVHJX6+CUbiEYJ0XsXZedP0Dz2oMB3v 4Jx04uWXTL8QzojzxzDQIdS3tQMMZXGcqmN5QCeyK5RhrL3pc0jqoUcm3FQyblPk8EJr WSVP4575CPCQGdrjLp297n3XPsGEN6OO2Th6pGFZ3ySORbFqtF1igS0FS/7muCTxkbWL jii3lS8cWBMmSmuLQd/1RqYv0yNpTln4j8fDDjFJQLHQUrAEY6VTqkg7J1g6t30eJaAZ FV8ZXVyZv/pCC+QITLReBtxVEXlfiDs/BzmVhH6+hEJL6Aljud0NbKLfcxGaNjfw1tSH 0iKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=bYsTsBY1; 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 e18-20020a056402089200b0051ddf3cc9e1si1481868edy.609.2023.07.18.09.40.40; Tue, 18 Jul 2023 09:41:04 -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=bYsTsBY1; 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 S233838AbjGRP4y (ORCPT + 99 others); Tue, 18 Jul 2023 11:56:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233797AbjGRP4q (ORCPT ); Tue, 18 Jul 2023 11:56:46 -0400 Received: from mail-qt1-x833.google.com (mail-qt1-x833.google.com [IPv6:2607:f8b0:4864:20::833]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 09ED619B1 for ; Tue, 18 Jul 2023 08:56:41 -0700 (PDT) Received: by mail-qt1-x833.google.com with SMTP id d75a77b69052e-403b6b7c0f7so42262651cf.0 for ; Tue, 18 Jul 2023 08:56:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1689695800; x=1692287800; 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=Tjh+qVHNBsaCt+fpZytXbv4JtN2Kf+QfiKBiC+OQp3c=; b=bYsTsBY1ioUL9k8drjTPCTw/fEJ0EAlGX5g4owJLPMPxN2CHLKUwbHRdsGU8yNpkgq tSJhCUQojCe7iZMsDT/aY34J1oz2QHRzCjLM+KqEBEo9M8BD2KOp45IRPvgTMkckJ6dq H9fFQEgiHBZaevHiGZSqEfXqcoEtLjezHUCteBqtpUndGthYRfcrzEkhL4CGHaIFAcmx 6wdKboUdDaPeOVdQT0aOEr8C1+gySsRWrc1UqrjcLLXuhZDet2FHUgbuPzKGfDMScL/V K78x7SFpD7MaWzPqAIp0HWYQyARw7uG7tneLlNjtBlR/Fv5UIeG6Vm/K9G6rR6HJEl7q 8oNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689695800; x=1692287800; 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=Tjh+qVHNBsaCt+fpZytXbv4JtN2Kf+QfiKBiC+OQp3c=; b=cDfIwAz+SswXn/adZAb1JjlAOUp8fTkAc3oorJHXqm5A/o+uAzJC8f9ULU8lv4jEgg gvsFjaZxpVQHhniM5GfmhTNlKo7FkTzJjXkyYAoyrYYpahaLoGxeNqyt9lNk28fJ4fQ+ reR92OjTiZ+L3697qf7ZzYrmdCx7mIceC5A0lrPu0yUqN4k9ZA05w430tYp0gd9WJvfH 78Ofc6/YwRVk61krD4KdMD8x2ECB74gKYuJA+6IcZlbgz6ibbqS/eE7zZ579lKKnn2sQ hrvP7Hz4BIp4qDi6vZL75dMmTKi8WQ6aL/zann5CkoRmJvhMJtUsJAq6yKiF+LzgYuGT qZng== X-Gm-Message-State: ABy/qLY7fRrMSP10MnNuepHMskfTmNcCZx1nvsHqO0Uhvz+cHDWLpULe npYGETwAUO4ulqqhdDJ5/1Zc4g== X-Received: by 2002:ac8:7dd0:0:b0:403:a814:ef4d with SMTP id c16-20020ac87dd0000000b00403a814ef4dmr21293071qte.49.1689695800050; Tue, 18 Jul 2023 08:56:40 -0700 (PDT) Received: from ziepe.ca ([206.223.160.26]) by smtp.gmail.com with ESMTPSA id s21-20020ac87595000000b003e635f80e72sm727847qtq.48.2023.07.18.08.56.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Jul 2023 08:56:39 -0700 (PDT) Received: from jgg by wakko with local (Exim 4.95) (envelope-from ) id 1qLn42-002YJT-5I; Tue, 18 Jul 2023 12:56:38 -0300 Date: Tue, 18 Jul 2023 12:56:38 -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> <20230717165203.4ee6b1e6.alex.williamson@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230717165203.4ee6b1e6.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_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 04:52:03PM -0600, Alex Williamson wrote: > 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. Yes, duplicated, sort of, whatever the "ack" is to allow pushing a new value can be revised to run as part of the read. But I don't really view it as a minor difference. eventfd is a counter. It should not be abused otherwise, even if it can be made to work. It really isn't an IRQ if it is pushing an async message w/data. Jason