Messages in this thread | | | Date | Fri, 21 Feb 2014 20:39:24 -0500 | From | Waiman Long <> | Subject | Re: [PATCH v4 3/3] qspinlock, x86: Add x86 specific optimization for 2 contending tasks |
| |
On 02/21/2014 12:28 PM, Peter Zijlstra wrote: > On Mon, Feb 17, 2014 at 03:41:24PM -0500, Waiman Long wrote: >> + struct { >> + u8 lock; /* Lock bit */ >> + u8 wait; /* Waiting bit */ >> + u16 qcode; /* Queue code */ >> + }; > 16 bit code would result in 14 bits for the CPU number, that's only 16k, > I think SGI actually had a machine with that many CPUs in. >
If NR_CPUS >= 16k, the 2-task optimized code path will be disabled. However, with that many CPUs, it is high spinlock contention behavior that is more important than a bit better performance at low contention level.
-Longman
| |