From: Sean Christopherson <seanjc@google.com>
To: Alex Williamson <alex.williamson@redhat.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
Jason Wang <jasowang@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
kvm@vger.kernel.org, virtualization@lists.linux.dev,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Oliver Upton <oliver.upton@linux.dev>,
David Matlack <dmatlack@google.com>,
Like Xu <like.xu.linux@gmail.com>,
Yong He <alexyonghe@tencent.com>
Subject: Re: [PATCH 3/7] irqbypass: Take ownership of producer/consumer token tracking
Date: Thu, 10 Apr 2025 15:04:35 -0700 [thread overview]
Message-ID: <Z_hAc3rfMhlyQ9zd@google.com> (raw)
In-Reply-To: <20250410152846.184e174f.alex.williamson@redhat.com>
On Thu, Apr 10, 2025, Alex Williamson wrote:
> On Fri, 4 Apr 2025 14:14:45 -0700
> Sean Christopherson <seanjc@google.com> wrote:
> > diff --git a/include/linux/irqbypass.h b/include/linux/irqbypass.h
> > index 9bdb2a781841..379725b9a003 100644
> > --- a/include/linux/irqbypass.h
> > +++ b/include/linux/irqbypass.h
> > @@ -10,6 +10,7 @@
> >
> > #include <linux/list.h>
> >
> > +struct eventfd_ctx;
> > struct irq_bypass_consumer;
> >
> > /*
> > @@ -18,20 +19,20 @@ struct irq_bypass_consumer;
> > * The IRQ bypass manager is a simple set of lists and callbacks that allows
> > * IRQ producers (ex. physical interrupt sources) to be matched to IRQ
> > * consumers (ex. virtualization hardware that allows IRQ bypass or offload)
> > - * via a shared token (ex. eventfd_ctx). Producers and consumers register
> > - * independently. When a token match is found, the optional @stop callback
> > - * will be called for each participant. The pair will then be connected via
> > - * the @add_* callbacks, and finally the optional @start callback will allow
> > - * any final coordination. When either participant is unregistered, the
> > - * process is repeated using the @del_* callbacks in place of the @add_*
> > - * callbacks. Match tokens must be unique per producer/consumer, 1:N pairings
> > - * are not supported.
> > + * via a shared eventfd_ctx). Producers and consumers register independently.
> > + * When a producer and consumer are paired, i.e. a token match is found, the
> > + * optional @stop callback will be called for each participant. The pair will
> > + * then be connected via the @add_* callbacks, and finally the optional @start
> > + * callback will allow any final coordination. When either participant is
> > + * unregistered, the process is repeated using the @del_* callbacks in place of
> > + * the @add_* callbacks. Match tokens must be unique per producer/consumer,
> > + * 1:N pairings are not supported.
> > */
> >
> > /**
> > * struct irq_bypass_producer - IRQ bypass producer definition
> > * @node: IRQ bypass manager private list management
> > - * @token: opaque token to match between producer and consumer (non-NULL)
> > + * @token: IRQ bypass manage private token to match producers and consumers
>
> The "token" terminology seems a little out of place after all is said
> and done in this series.
Ugh, yeah, good point. I don't know why I left it as "token".
> Should it just be an "index" in anticipation of the usage with xarray and
> changed to an unsigned long? Or at least s/token/eventfd/ and changed to an
> eventfd_ctx pointer?
My strong vote is for "struct eventfd_ctx *eventfd;"
next prev parent reply other threads:[~2025-04-10 22:04 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-04 21:14 [PATCH 0/7] irqbypass: Cleanups and a perf improvement Sean Christopherson
2025-04-04 21:14 ` [PATCH 1/7] irqbypass: Drop pointless and misleading THIS_MODULE get/put Sean Christopherson
2025-04-10 7:12 ` Tian, Kevin
2025-04-04 21:14 ` [PATCH 2/7] irqbypass: Drop superfluous might_sleep() annotations Sean Christopherson
2025-04-10 7:13 ` Tian, Kevin
2025-04-04 21:14 ` [PATCH 3/7] irqbypass: Take ownership of producer/consumer token tracking Sean Christopherson
2025-04-10 7:28 ` Tian, Kevin
2025-04-10 15:51 ` Sean Christopherson
2025-04-10 21:28 ` Alex Williamson
2025-04-10 22:04 ` Sean Christopherson [this message]
2025-04-10 22:25 ` Alex Williamson
2025-04-04 21:14 ` [PATCH 4/7] irqbypass: Explicitly track producer and consumer bindings Sean Christopherson
2025-04-10 7:32 ` Tian, Kevin
2025-04-04 21:14 ` [PATCH 5/7] irqbypass: Use paired consumer/producer to disconnect during unregister Sean Christopherson
2025-04-10 7:34 ` Tian, Kevin
2025-04-04 21:14 ` [PATCH 6/7] irqbypass: Use guard(mutex) in lieu of manual lock+unlock Sean Christopherson
2025-04-10 7:34 ` Tian, Kevin
2025-04-04 21:14 ` [PATCH 7/7] irqbypass: Use xarray to track producers and consumers Sean Christopherson
2025-04-07 3:37 ` Binbin Wu
2025-04-10 7:38 ` Tian, Kevin
2025-04-10 14:52 ` Sean Christopherson
2025-04-11 0:09 ` Tian, Kevin
2025-04-08 11:49 ` [PATCH 0/7] irqbypass: Cleanups and a perf improvement Michael S. Tsirkin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z_hAc3rfMhlyQ9zd@google.com \
--to=seanjc@google.com \
--cc=alex.williamson@redhat.com \
--cc=alexyonghe@tencent.com \
--cc=dmatlack@google.com \
--cc=jasowang@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=like.xu.linux@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=oliver.upton@linux.dev \
--cc=pbonzini@redhat.com \
--cc=virtualization@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.