Re: [PATCH v3] epoll: use refcount to reduce ep_mutex contention

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux