Re: [PATCH][2.6-mm] Allow i386 to reenable interrupts on lock contention

Andrew Morton
2004-05-01T21:40:19Z

Zwane Mwaikambo <zwane@linuxpower.ca> wrote:
>
> + #define spin_lock_string_flags \
> + "\n1:\t" \
> + "lock ; decb %0\n\t" \
> + "jns 4f\n" \
> + "testl $0x200, %1\n\t" \
> + "jz 2f\n\t" \
> + "sti\n\t" \
> + "jmp 2f\n\t" \
> + LOCK_SECTION_START("") \
> + "2:\t" \
> + "rep;nop\n\t" \
> + "cmpb $0, %0\n\t" \
> + "jle 2b\n\t" \
> + "jmp 3f\n\t" \
> + LOCK_SECTION_END \
> + "3:\t" \
> + "cli\n\t" \
> + "jmp 1b\n" \
> + "4:\t"

Could we move all the irq-handling stuff into the out-of-line section, to
keep the fast-path cache footprint smaller?