login
Header Space

 
 

Re: spinlocks -- why are releases inlined and acquires are not?

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Jiri Kosina <jkosina@...>
Cc: Ingo Molnar <mingo@...>, <linux-kernel@...>
Date: Tuesday, April 1, 2008 - 7:12 am

Jiri Kosina <jkosina@suse.cz> writes:

At some point -- but that was before queued locks -- I noticed that
for i386 spin unlocks the call sequence for the sub function is
actually larger in code than the actual spin unlock operation and for
x86-64 it was about the same. That was not even counting any negative
register allocation effects the call has on the caller. Spinlocks
don't clobber a lot of registers, but the compiler doesn't know that
when calling the function so it has to assume all ABI callee clobbered
are gone.

I didn't do anything back then because at this point Ingo was
reorganizing the spinlock code hourly[1] for his lockdep etc. merge and
wanted to wait for it to settle down and then it dropped from 
the radar.

Anyways without queued spinlocks that has probably changed again,
might be still worth rechecking.

-Andi

[1] ok I'm exaggerating...
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: spinlocks -- why are releases inlined and acquires are n..., Andi Kleen, (Tue Apr 1, 7:12 am)
speck-geostationary