Hi,

On Wed, 28 Jul 1999 23:07:17 +0200 (MET DST), [EMAIL PROTECTED] (Wim
Ten Have) said:

>    I like to make a small comment or perhaps suggestions to the
>    raw IO changes which I hope make it into the Linux stable
>    (production) kernels a.s.a.p.

>    Your kernel API does only allow 512 byte memory aligned user space
>    buffers ... this for technical reasons.  Performing in kernel memory
>    copies are left out by you because of performance I guess. 

As far as I know that is also standard practice on other Unix raw
devices.  Do existing applications using raw IO on other Unixen really
use unaligned buffers?  I know that Oracle was able to run with the
Linux raw devices without problems.
   
>    I.e. now you return an EINVAL (errno 22) whenever the user buffer
>    address is *not* 512 bytes aligned.  Such cripples for example a
>    simple 'dd if=/dev/raw1 of=....'

dd on Linux is at fault, I believe: on Solaris at least, dd uses aligned
buffers.  On Linux, you can use "lmdd" from lmbench which aligns buffers
correctly. 

>    Since you already perform a check to detect the misalignment to
>    return EINVAL you may decide to invoke a kernel internal memcopy
>    instead.  This to a kernel private buffer and correcting the
>    alignment.   

But then the IO isn't strictly raw!

--Stephen

Reply via email to