[lkml]   [2003]   [Jul]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: TSCs are a no-no on i386
Willy Tarreau wrote:
> The other problem lies with the lock :
> When a 486 executes "LOCK ; CMPXCHG", it locks the bus during the whole cmpxchg
> instruction. If a 386 executes the same code, it will get an exception which
> will be caught by the emulator. I don't see how we can do such an atomic
> operation while holding a lock. At best, we would think about a global memory
> based shared lock during the operation (eg: int bus_lock;), but it's not
> implemented at the moment, and will only be compatible with processors sharing
> the same code. Add-on processors, such as co-processors, transputer cards, or
> DSPs, will know nothing about such a lock emulation. And it would result in
> even poorer performance of course !

Of course this is not a problem when "lock;cmpxchg" is used only for thread
synchronisation on uniprocessor 386s... The lock prefix is irrelevant then.

Perhaps the emulation should refuse to pretend to work on an SMP 386 :)

-- Jamie
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:47    [W:0.084 / U:2.896 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site