Hello,<br><br><div class="gmail_quote">On Mon, Jan 23, 2012 at 7:34 PM, Stan Hoeppner <span dir="ltr"><<a href="mailto:stan@hardwarefreak.com">stan@hardwarefreak.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 1/23/2012 2:51 PM, Zheng Da wrote:<br>
<br>
> tmpfs doesn't support direct IO.<br>
<br>
</div>Of course not. tmpfs resides entirely within the page cache (or some of<br>
it in swap). The whole point of direct IO is to bypass the page cache,<br>
transferring data directly between user space memory and the storage<br>
device. As tmpfs is built entirely within the page cache, direct IO is<br>
obviously impossible. And it's also obviously unnecessary.<br>
<br>
Yes, you will need to rewrite your application to use tmpfs as direct IO<br>
calls won't work. This is something you obviously would rather not do.<br>
Which brings us back to Dave's question, which you have not answered:<br>
<br>
What exactly is the purpose of your program? What does it aim to<br>
accomplish? Is it for a database application? A word processor? Or<br>
simply a filesystem tester? What do _you_ aim to accomplish with this<br>
programming effort?<br><br></blockquote><div>I'm trying to test the scalability of page cache in the random access workload. And the cache hit rate is also relatively low. </div><div>The cache is now implemented in the user space. When cache misses, I need to read data from the file system with direct IO.</div>
<div><br></div><div>Da </div></div><br>