[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGXJAmxB1NSKMUz6Z-KQG5kf_aY4e1i19RpYyRSprG0fRoW6pQ@mail.gmail.com>
Date: Wed, 7 May 2025 11:45:16 -0700
From: John Ousterhout <ouster@...stanford.edu>
To: Paolo Abeni <pabeni@...hat.com>
Cc: netdev@...r.kernel.org, edumazet@...gle.com, horms@...nel.org,
kuba@...nel.org
Subject: Re: [PATCH net-next v8 07/15] net: homa: create homa_interest.h and homa_interest.
On Tue, May 6, 2025 at 6:53 AM Paolo Abeni <pabeni@...hat.com> wrote:
>
> On 5/3/25 1:37 AM, John Ousterhout wrote:
> > +/**
> > + * homa_interest_init_shared() - Initialize an interest and queue it up on a socket.
>
> What is an 'interest'? An event like input avail or unblocking output
> possible? If so, 'event' could be a possible/more idiomatic name.
I've revised the class header for struct homa_interest to be more
helpful (I hope). Here's the new version:
/**
* struct homa_interest - Holds info that allows applications to wait for
* incoming RPC messages. An interest can be either private, in which case
* the application is waiting for a single specific RPC response and the
* interest is referenced by an rpc->private_interest, or shared, in which
* case the application is waiting for any incoming message that isn't
* private and the interest is present on hsk->interests.
*/
> > + * @interest: Interest to initialize
> > + * @hsk: Socket on which the interests should be queued. Must be locked
> > + * by caller.
> > + */
> > +void homa_interest_init_shared(struct homa_interest *interest,
> > + struct homa_sock *hsk)
> > + __must_hold(&hsk->lock)
> > +{
> > + interest->rpc = NULL;
> > + atomic_set(&interest->ready, 0);
> > + interest->core = raw_smp_processor_id();
>
> I don't see this 'core' field used later on in this series. If so,
> please avoid introducing it until it's really used.
Yep, that field is not needed in this patch series (it will be needed
when additional Homa functionality is upstreamed). I've arranged for
it not to appear in future revisions of the patch. Do you know if
there are any tools available that can identify code and declarations
that are no longer relevant when functionality is removed from a
system? I've been doing this by hand, but as you have noticed it's a
pretty error-prone process.
-John-
Powered by blists - more mailing lists