Subject: Re: PostgreSQL
To: None <,,>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-net
Date: 02/02/2006 09:42:38
[top-posting damage repaired manually -dM]

>>> You don't need locked bus cycles for atomic operations which
>>> actually are atomic on the bus.
>>> A write is a write is a write.  It can never be split.  It's
>>> atomic.  Can't be anything else.
>> What if it's doing a write across a page boundary, and the second
>> page isn't there?
> How could it do that?  A write is a write is a write.

Not quite.  First, on an architecture that does unaligned accesses, a
write at the machine-language level can turn into something
significantly more complicated at the bus level.  Second....

> One write is one bus cycle.  It's always aligned, and the full width
> of the bus. have a remarkably restricted view of how memory systems operate.

> Otherwise we're talking about the CPU doing a non-aligned write,
> which is a read-modify-write.

Which can be, depending on the CPU and in some cases the surrounding
electronics.  It could also be a bus write cycle with only certain byte
lanes enabled.  It could probably also be other things, if, for
examnple, the memory subsystem uses a narrower bus than the write width
(eg, a 68k or i386 doing a 32-bit write in a system with a 16-bit
memory bus).

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B