Re: direct-to-BIO for O_DIRECT

From: Ingo Oeser (ingo.oeser@informatik.tu-chemnitz.de)
Date: Thu Jul 11 2002 - 12:28:48 EST


On Mon, Jul 08, 2002 at 09:26:48PM -0700, Andrew Morton wrote:
> Ben had lightweight sg structures called `kvecs' and `kveclets'. And
> library functions to map pages into them. And code to attach them
> to BIOs. So we'll be looking at getting that happening.

Ok, I've looked at them and they don't help me at all.

A user, who splits its IO into single pages, wants to do DMA and
needs bus addresses for that. So he needs "struct scatterlist".

If one doesn't need to DMA, one can do copy_{from,to}_user
directly with an immediate buffer, so the splitup isn't needed.

For this I conclude, that using the EXISTING 'struct scatterlist'
will be enough for both. Attaching a vector of these to the BIOs
is no problem. Neither it is for CHARACTER device IOs (CIOs).

So by using this simple abstraction we MIGHT waste only 4-8 bytes
per page submitted, but by page-splitting the IO only for devices,
that need DMA (e.g. make the request that explicitly) we don't
really waste it and support BIOs and CIOs the same way.

I will refine that code for my own uses anyway, so if nobody with
more clues about IO than me implements it, I will submit it
later.

Regards

Ingo Oeser

-- 
Science is what we can tell a computer. Art is everything else. --- D.E.Knuth
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Jul 15 2002 - 22:00:20 EST