[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Y5jLr0/hikL9X6Fz@sol.localdomain>
Date: Tue, 13 Dec 2022 10:59:59 -0800
From: Eric Biggers <ebiggers@...nel.org>
To: Paolo Abeni <pabeni@...hat.com>
Cc: linux-fsdevel@...r.kernel.org,
Soheil Hassas Yeganeh <soheil@...gle.com>,
Al Viro <viro@...iv.linux.org.uk>,
Davidlohr Bueso <dave@...olabs.net>,
Jason Baron <jbaron@...mai.com>, netdev@...r.kernel.org,
Carlos Maiolino <cmaiolino@...hat.com>
Subject: Re: [PATCH v3] epoll: use refcount to reduce ep_mutex contention
On Tue, Dec 13, 2022 at 07:21:14PM +0100, Paolo Abeni wrote:
> Hi,
>
> On Mon, 2022-12-12 at 22:01 -0800, Eric Biggers wrote:
> > I am trying to understand whether this patch is correct.
> >
> > One thing that would help would be to use more standard naming:
> >
> > ep_put => ep_refcount_dec_and_test (or ep_put_and_test)
> > ep_dispose => ep_free
> > ep_free => ep_clear_and_put
>
> Thank you for the feedback.
>
> I must admit I'm not good at all at selecting good names, so I
> definitelly will apply the above. I additionally still have to cover
> the feedback from Jacob - switching the reference count to a kref - as
> I've been diverted to other tasks.
>
> I hope to be able to share a new revision of this patch next week.
Using 'refcount_t' directly is another option.
I think a plain 'unsigned int' would be fine here, if all reads and writes of
the refcount really happen under a mutex. Using refcount_t (or kref) would add
some extra sanity checks, though.
- Eric
Powered by blists - more mailing lists