David Daney 500c2e1fdb MIPS: Optimize spinlocks.
The current locking mechanism uses a ll/sc sequence to release a
spinlock.  This is slower than a wmb() followed by a store to unlock.

The branching forward to .subsection 2 on sc failure slows down the
contended case.  So we get rid of that part too.

Since we are now working on naturally aligned u16 values, we can get
rid of a masking operation as the LHU already does the right thing.
The ANDI are reversed for better scheduling on multi-issue CPUs

On a 12 CPU 750MHz Octeon cn5750 this patch improves ipv4 UDP packet
forwarding rates from 3.58*10^6 PPS to 3.99*10^6 PPS, or about 11%.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
To: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/937/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2010-02-27 12:53:42 +01:00
..
2010-02-27 12:53:30 +01:00
2009-09-17 20:07:42 +02:00
2010-02-27 12:53:16 +01:00
2010-02-27 12:53:14 +01:00
2010-02-27 12:53:14 +01:00
2009-07-03 15:45:26 +01:00
2008-12-12 18:12:23 +00:00
2010-02-27 12:53:06 +01:00
2010-02-27 12:53:42 +01:00
2010-02-27 12:53:06 +01:00
2009-12-05 09:10:12 -08:00
2010-02-27 12:53:06 +01:00
2009-12-17 01:57:30 +00:00
2010-02-27 12:53:27 +01:00
2010-02-27 12:53:14 +01:00
2009-07-03 15:45:29 +01:00
2009-06-07 05:01:00 -07:00
2009-12-17 11:03:24 -05:00
2009-12-17 01:57:32 +00:00
2009-05-14 13:50:29 +01:00
2010-02-27 12:53:12 +01:00
2009-06-17 11:06:28 +01:00
2008-10-20 08:52:41 -07:00
2010-02-27 12:53:14 +01:00
2010-02-27 12:53:14 +01:00
2010-02-27 12:53:27 +01:00
2009-09-09 13:29:18 -07:00
2009-07-03 15:45:27 +01:00
2010-02-27 12:53:27 +01:00
2009-11-02 12:00:01 +01:00
2010-02-27 12:53:14 +01:00
2010-02-27 12:53:42 +01:00
2010-02-27 12:53:42 +01:00
2009-06-17 11:06:31 +01:00
2010-02-27 12:53:06 +01:00
2010-02-27 12:53:25 +01:00
2010-02-27 12:53:27 +01:00
2009-12-01 16:15:49 -08:00