x86: spin_unlock(), spin_unlock_irq() & others are out of line ?

Eric Dumazet
2005-03-15T10:48:46Z

Hi all

I noticed that in current linux kernel versions (2.6.11), some basic
functions are out of line (not inlined)

Example of a call to spin_unlock(&somelock)
c01069fa: b8 e8 7b 35 c0 mov $0xc0357be8,%eax
c01069ff: e8 3c e4 1f 00 call c0304e40 <_spin_unlock>

c0304e40 <_spin_unlock>:
c0304e40: c6 00 01 movb $0x1,(%eax)
c0304e43: c3 ret

Same problem for _write_unlock(), _read_unlock(), _spin_unlock_irq(), ...

That seems odd, and I fail to see the reason for that. (It's OK for
complex functions, but not for very short ones...)

Is it a regression, or is it needed ?

configuration :
- SMP
- Processor family (Pentium-4/Celeron(P4-based)/Pentium-4 M/Xeon)
- No "Generic x86 support"

Thank you
Eric Dumazet