Skip to contentSkip to conversation

performance of O_DIRECT on md/lvm

DISCUSSION Andi Kleen 1 participant 1 message Jan 20, 2002 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Andi Kleen

author
#1 lore raw
Quoted 7 lines · [email protected] writes:
Quoted 1 line · In article <[email protected]> you wrote:

I think an optional readahead mode for O_DIRECT would be useful.

I disagree. O_DIRECT says "do not cache. period. I know what I'm doing" and the kernel should respect that imho. After all we have sys_readahead for the other part...

Problem with sys_readahead is that it doesn't work for big IO sizes. e.g. you read in big blocks. You have to do readahead(next block); read(directfd, ..., big-block);
The readahead comes to early in this case; it would be better if it is done in the middle of read of big-block based on the request size. Otherwise you risk additional seeks when you overflow the 'read window', which is all to easy this way.

-Andi