RE: Linux 2.6.32-rc1

Yuhong Bao
2009-10-01T00:47:58Z

<20090930173102.2d54534c@infradead.org>
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0

----------------------------------------
> Date: Wed=2C 30 Sep 2009 17:31:02 +0200
> From: arjan@infradead.org
> To: eric.dumazet@gmail.com
> CC: torvalds@linux-foundation.org=3B schwidefsky@de.ibm.com=3B tglx@linut=
ronix.de=3B johnstul@us.ibm.com=3B linux-kernel@vger.kernel.org=3B a.p.zijl=
stra@c
> Subject: Re: Linux 2.6.32-rc1
>
> On Wed=2C 30 Sep 2009 17:27:05 +0200
> Eric Dumazet wrote:
>>
>>> + pop %edi
>> Why do you pop flags in edi=2C to later re-push them ?
>>
>>> + cli
>
> because here I disable interrupts
But popping the flags to edi to later repush them should not be necessary u=
nless you are switching esp.

Getting rid of this will allow the push/pop edi at the beginning/end to
be eliminated=2C reducing code size as well as increasing the speed.
> (basically this is local_irq_save() )
>>
>>
>>> + xchg (%esi)=2C %ebx
>>> + xchg 4(%esi)=2C %ecx
>> How this sequence is guaranteed to be atomic with other cpus ?
>
> it is not. this is the 486 implementation which is !SMP
> (just like the current cmpxchg64() fallback)

BTW=2C NT4 had a SMP version of this emulation that used a simple spinlock:
http://www.geoffchappell.com/viewer.htm?doc=3Dstudies/windows/km/cpu/cx8.ht=
m

Yuhong Bao
=0A=
_________________________________________________________________=0A=
Insert movie times and more without leaving Hotmail=AE.=0A=
http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=3DTXT_TAGLM_WL_HM_Tut=
orial_QuickAdd_062009=