From: Jason Low <jason.low2@hpe.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: jason.low2@hp.com, Ingo Molnar <mingo@kernel.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Ingo Molnar <mingo@redhat.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Richard Henderson <rth@twiddle.net>,
Ivan Kokshaysky <ink@jurassic.park.msu.ru>,
Matt Turner <mattst88@gmail.com>, Tony Luck <tony.luck@intel.com>,
Fenghua Yu <fenghua.yu@intel.com>,
Martin Schwidefsky <schwidefsky@de.ibm.com>,
Terry Rudd <terry.rudd@hpe.com>,
Heiko Carstens <heiko.carstens@de.ibm.com>,
Thomas Gleixner <tglx@linutronix.de>,
Arnd Bergmann <arnd@arndb.de>, Christoph Lameter <cl@linux.com>,
Davidlohr Bueso <dave@stgolabs.net>,
Waiman Long <Waiman.Long@hpe.com>,
Tim Chen <tim.c.chen@linux.intel.com>,
Peter Hurley <peter@hurleysoftware.com>
Subject: Re: [RFC][PATCH 0/7] locking/rwsem: Convert rwsem count to atomic_long_t
Date: Fri, 03 Jun 2016 16:04:49 -0700 [thread overview]
Message-ID: <1464995089.2367.7.camel@j-VirtualBox> (raw)
In-Reply-To: <20160603223620.GB3727@twins.programming.kicks-ass.net>
On Sat, 2016-06-04 at 00:36 +0200, Peter Zijlstra wrote:
> On Fri, Jun 03, 2016 at 11:09:54AM -0700, Jason Low wrote:
> > --- a/arch/alpha/include/asm/rwsem.h
> > +++ b/arch/alpha/include/asm/rwsem.h
> > @@ -25,8 +25,8 @@ static inline void __down_read(struct rw_semaphore *sem)
> > {
> > long oldcount;
> > #ifndef CONFIG_SMP
> > - oldcount = sem->count;
> > - sem->count += RWSEM_ACTIVE_READ_BIAS;
> > + oldcount = atomic_long_read(&sem->count);
> > + atomic_long_add(RWSEM_ACTIVE_READ_BIAS, &sem->count);
> > #else
>
> That _completely_ misses the point of the whole !SMP code.
Oh right, this defeats the purpose of the additional code path. Might as
well have removed the code entirely :\
I can send out a new patch assuming we're still keeping all the arch/*/
rwsem.h?
prev parent reply other threads:[~2016-06-03 23:05 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-17 0:37 [RFC][PATCH 0/7] locking/rwsem: Convert rwsem count to atomic_long_t Jason Low
2016-05-17 0:38 ` [RFC][PATCH 1/7] locking/rwsem: Optimize write lock by reducing operations in slowpath Jason Low
2016-06-03 10:55 ` [tip:locking/core] " tip-bot for Jason Low
2016-05-17 0:38 ` [RFC][PATCH 2/7] locking/rwsem: Convert sem->count to atomic_long_t Jason Low
2016-05-17 0:38 ` [RFC][PATCH 3/7] locking,x86: Remove x86 rwsem add and rwsem update Jason Low
2016-05-17 0:38 ` [RFC][PATCH 4/7] locking,alpha: Remove Alpha " Jason Low
2016-05-17 0:38 ` [RFC][PATCH 5/7] locking,ia64: Remove ia64 " Jason Low
2016-05-17 0:38 ` [RFC][PATCH 6/7] locking,s390: Remove s390 " Jason Low
2016-05-17 0:38 ` [RFC][PATCH 7/7] locking,asm-generic: Remove generic rwsem add and rwsem update definitions Jason Low
2016-05-17 1:12 ` [RFC][PATCH 0/7] locking/rwsem: Convert rwsem count to atomic_long_t Linus Torvalds
2016-05-17 11:09 ` Peter Zijlstra
2016-05-17 17:06 ` Jason Low
2016-05-20 6:18 ` Davidlohr Bueso
2016-06-03 8:04 ` Ingo Molnar
2016-06-03 12:00 ` Peter Zijlstra
2016-06-03 12:12 ` Peter Zijlstra
2016-06-03 23:31 ` Linus Torvalds
2016-06-03 18:09 ` Jason Low
2016-06-03 18:48 ` Peter Zijlstra
2016-06-03 22:36 ` Peter Zijlstra
2016-06-03 23:04 ` Jason Low [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=1464995089.2367.7.camel@j-VirtualBox \
--to=jason.low2@hpe.com \
--cc=Waiman.Long@hpe.com \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=cl@linux.com \
--cc=dave@stgolabs.net \
--cc=fenghua.yu@intel.com \
--cc=heiko.carstens@de.ibm.com \
--cc=ink@jurassic.park.msu.ru \
--cc=jason.low2@hp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mattst88@gmail.com \
--cc=mingo@kernel.org \
--cc=mingo@redhat.com \
--cc=peter@hurleysoftware.com \
--cc=peterz@infradead.org \
--cc=rth@twiddle.net \
--cc=schwidefsky@de.ibm.com \
--cc=terry.rudd@hpe.com \
--cc=tglx@linutronix.de \
--cc=tim.c.chen@linux.intel.com \
--cc=tony.luck@intel.com \
--cc=torvalds@linux-foundation.org \
/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