i'm interested in knowing how much time is spent by CPUs in an SMP system
spinning in specific spin locks. the spin lock implementation for SMP is
tightly coded, all in assembler. would it be appropriate to code a C
version of "spin_lock()" which counts the number of iterations and stores
it in a new field in the spinlock_t struct? something like:
typedef struct {
volatile unsigned int lock;
volatile unsigned long count;
} spinlock_t;
#define spin_lock(x) \
while (!spin_trylock(x)) (x)->count++;
would i need to mask local interrupts when i'm doing this?
naturally, this is only for experimentation.
- Chuck Lever
--
corporate: <[EMAIL PROTECTED]>
personal: <[EMAIL PROTECTED]> or <[EMAIL PROTECTED]>
The Linux Scalability project:
http://www.citi.umich.edu/projects/linux-scalability/
-
Linux SMP list: FIRST see FAQ at http://www.irisa.fr/prive/mentre/smp-faq/
To Unsubscribe: send "unsubscribe linux-smp" to [EMAIL PROTECTED]