tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: write alignment matters?

On 06/27/11 21:02, Dennis Ferguson wrote:

On 27 Jun 2011, at 10:27 , der Mouse wrote:

That "what it is reasonable for a disk to do" consensus *is* the
interface spec I was talking about, not the de-jure non-spec of "you
get whatever the device (via its driver) feels like giving you".

That's sort of the point.  If you want "what it is reasonable for a
disk to do" you should be using the block device [...].

The raw device is supposed to be just that: a raw interface to the
device.  It gives you access to all the mis-behavior of the device
with all its gory niggling little details.

That's a nice theory.  But it's not the historical practice.

Typically raw device drivers do a nontrivial amount of cleaning up of
the hardware's interface, such as dealing with bounce buffers and
poking device registers.

I suspect bounce buffers don't have that long a history.  When we began to
run V7 on LSI-11's I distinctly remember having to chuck out third-party
DMA controllers which only did 16-bit addressing on the Qbus because we
needed to run with 18 bits worth of memory and there was no way to deal
with DMA controllers which couldn't reach it all (I think you could use
controllers that lacked address bits in a Vax, but only because there
was a memory mapping unit between the bus and the memory.  Software didn't
try to fix this).


Well, that was for Unix in that case. DECs OSes used (use) bounce buffers for devices incapable of DMA to all addresses on the PDP-11, and have been since the late 70s.

(Not sure if you meant bounce buffers in general, or bounce buffers for Unix...)


Home | Main Index | Thread Index | Old Index