Re: Using DMA in read/write, setting block size for I/O
From: Arjan van de Ven
Date: Tue Oct 04 2005 - 09:33:53 EST
> Will the underlying block device read a single 256KB block from the hdd
> into pcBuffer
> or will it read 256KB as a set of smaller blocks?
that depends, not all pieces of hardware can do transfers that big (or
at least advertise to the kernel that they can); if that's the case the
kernel will chop it up. Note:t he kernel will not *guarantee* that it'll
be one io either way. So don't depend on it for correctness!
Yet of course the kernel will try to optimize as good as possible
> Since the buffer is memory aligned will it enable DMA?
doesn't matter; DMA will always happen if the HW is capable of it. Since
you use O_DIRECT there will also not be a copy (which would happen if
you didn't use O_DIRECT)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/