Rami,

While I can pass the O_DIRECT flag to the flip_open, it seems that flip-
>read and flip->write requires me to map the target pages as user pages.
(get_user_pages ?)
I'm trying to find ways to cut through the overhead as much as I can.
In general, I want to be able to control my own caching; maintaining
certain pages while dropping others.

Gilboa


On Tue, 2005-08-30 at 04:00 -0400, Rami Rosen wrote:
> Hello, 
> 
>  I am not sure because I did not try it myself , but how about 
> simply opening it with O_DIRECT flag?
> And BTW, how do you open the file in the kernel ?
> did you use the sys_open() as was suggested in GergKH article I had
> cited in 
> the thread from a month ago ? ( sys_open()  accpets the O_DIRECT flag)
> 
> Regards,,
> Rami
> 
> On 8/29/05, Gilboa Davara <[EMAIL PROTECTED]> wrote:
>         Hello all,
>         
>         Couple of weeks ago I started a thread called "File I/O within
>         kernel
>         threads?" which ended with a call "for numbers". (Read: Is I/O
>         within
>         kernel performance increase justifies the development
>         overhead?) 
>         Last week I took my user-land simulator (that takes a file,
>         reads it,
>         and creates and sends two raw multiplexed streams out of it);
>         and
>         converted it into a kernel module.
>         The performance increase was nothing short of staggering: From
>         ~1100Mbps 
>         to ~1700Mbps. (Which is fairly close to the theoretical limit
>         of 2 GbE
>         NICs.)
>         While both versions could be further optimized, it's clear
>         that the
>         kernel version has an very impressive performance lead.
>         Considering these numbers, I opt to choose a Kernel mode
>         solution. 
>         
>         My question is simple:
>         While it's fairly easy to do normal buffered I/O from kernel
>         mode (using
>         flip_open/close and ->read/->write methods) for the life of me
>         I cannot
>         seem to find how to do O_DIRECT I/O from kernel mode. 
>         More-ever, as I need a single huge file on a dedicated
>         computer, I don't
>         really need the FS/VFA/pagecache over-head, AFAIC I rather do
>         raw I/O
>         directly on-to the target block device.
>         Can anyone point me into the right direction? 
>         
>         I'm currently trying to drill down the kernel source but it's
>         a daunting
>         task, to say the least.
>         
>         Again, I fully understand the implications of my request; I
>         understand
>         that I'm bending Linux sideways, etc. 
>         
>         Gilboa
>         
>         
>         =================================================================
>         To unsubscribe, send mail to [EMAIL PROTECTED]
>         with
>         the word "unsubscribe" in the message body, e.g., run the
>         command
>         echo unsubscribe | mail [EMAIL PROTECTED]
>         



=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to