[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191030142110.GA17800@redhat.com>
Date: Wed, 30 Oct 2019 15:21:10 +0100
From: Oleg Nesterov <oleg@...hat.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Will Deacon <will.deacon@...nel.org>,
Ingo Molnar <mingo@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
linux-kernel@...r.kernel.org, bigeasy@...utronix.de,
juri.lelli@...hat.com, williams@...hat.com, bristot@...hat.com,
longman@...hat.com, dave@...olabs.net, jack@...e.com
Subject: Re: [PATCH] locking/percpu_rwsem: Rewrite to not use rwsem
On 10/29, Peter Zijlstra wrote:
>
> I like that symmetry, but see below ...
...
> > void __percpu_up_read(struct percpu_rw_semaphore *sem)
> > {
> > smp_mb();
> >
> > __this_cpu_dec(*sem->read_count);
> >
> preempt_enable();
> > wake_up(&sem->waiters);
> preempt_disable()
>
> and this (sadly) means there's a bunch of back-to-back
> preempt_disable()+preempt_enable() calls.
Hmm. Where did these enable+disable come from?
void __percpu_up_read(struct percpu_rw_semaphore *sem)
{
smp_mb();
__this_cpu_dec(*sem->read_count);
wake_up(&sem->waiters);
}
should work just fine?
Oleg.
Powered by blists - more mailing lists