Re: [PATCH RFC 2/3] locking/percpu-rwsem: Extract __percpu_up_read_slowpath()
From: Steven Rostedt
Date: Thu Mar 05 2026 - 10:46:38 EST
On Wed, 4 Mar 2026 23:02:23 +0100
Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
> > diff --git a/include/linux/percpu-rwsem.h b/include/linux/percpu-rwsem.h
> > index c8cb010d655e..89506895365c 100644
> > --- a/include/linux/percpu-rwsem.h
> > +++ b/include/linux/percpu-rwsem.h
> > @@ -107,6 +107,8 @@ static inline bool percpu_down_read_trylock(struct percpu_rw_semaphore *sem)
> > return ret;
> > }
> >
> > +void __percpu_up_read_slowpath(struct percpu_rw_semaphore *sem);
> > +
>
> extern for consistency with all the other declarations in this header.
I wonder if a cleanup patch should be added to remove the "extern" from the
other functions, as that tends to be the way things are going (hch just
recommended it elsewhere).
>
> s/_slowpath//, the corresponding down function also doesn't have
> _slowpath on.
>
> > static inline void percpu_up_read(struct percpu_rw_semaphore *sem)
> > {
> > rwsem_release(&sem->dep_map, _RET_IP_);
And since "slowpath" is more descriptive (and used in the rtmutex code),
should that be added too?
-- Steve