Re: Should raw I/O be added to the kernel?

Linus Torvalds (torvalds@transmeta.com)
Fri, 18 Dec 1998 11:00:13 -0800 (PST)


On Fri, 18 Dec 1998, Chris Evans wrote:
>
> Raw IO isn't direct access to hardware, it's direct access to the hardware
> _driver_. A user program with permission to access a raw device won't be
> able to cause system instability any more than a user program with
> permission to access a file. Indeed, the file access case has many more
> layers of code to go through.

It's a classic mistake to think that this means that direct drievr access
is faster.

The thing is, that raw IO not only means avoiding the filesystem overhead,
or _also_ means that the kernel no longer has any control over the
requests. And that in turn means that suddenly the driver has to take
cases into account that could never happen before.

Basically, raw disk IO is _not_ necessarily noticeably faster at all. The
filesystem layer is fairly lightweight and optimized.

The only argument for raw disk IO is the caching policy issue, and I very
strongly agre with Ingo that we should consider it as such, and not get
dragged into the rathole of thinking that raw devices are somehow worth it
for some other reason.

Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/