From: Eric Biggers <ebiggers@kernel.org>
To: Paolo Abeni <pabeni@redhat.com>
Cc: linux-fsdevel@vger.kernel.org,
Soheil Hassas Yeganeh <soheil@google.com>,
Al Viro <viro@zeniv.linux.org.uk>,
Davidlohr Bueso <dave@stgolabs.net>,
Jason Baron <jbaron@akamai.com>,
netdev@vger.kernel.org, Carlos Maiolino <cmaiolino@redhat.com>
Subject: Re: [PATCH v3] epoll: use refcount to reduce ep_mutex contention
Date: Tue, 13 Dec 2022 10:59:59 -0800 [thread overview]
Message-ID: <Y5jLr0/hikL9X6Fz@sol.localdomain> (raw)
In-Reply-To: <229be448e2979258a7c2c84d808360618f5095a9.camel@redhat.com>
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
prev parent reply other threads:[~2022-12-13 19:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-28 18:00 [PATCH v3] epoll: use refcount to reduce ep_mutex contention Paolo Abeni
2022-11-29 0:06 ` Jacob Keller
2022-11-29 9:05 ` Paolo Abeni
2022-11-29 18:25 ` Jacob Keller
2022-12-13 6:01 ` Eric Biggers
2022-12-13 18:21 ` Paolo Abeni
2022-12-13 18:59 ` Eric Biggers [this message]
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=Y5jLr0/hikL9X6Fz@sol.localdomain \
--to=ebiggers@kernel.org \
--cc=cmaiolino@redhat.com \
--cc=dave@stgolabs.net \
--cc=jbaron@akamai.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=soheil@google.com \
--cc=viro@zeniv.linux.org.uk \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox