<!DOCTYPE html>
<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>I have a file where I would like to keep part of the file in
      system cache and the other part not.  So I open the file twice,
      once with O_DIRECT, and once without O_DIRECT.</p>
    <p>I have written a simple testcase where I write the first 50 MB of
      the file without DIRECT, and the second 50M with O_DIRECT.  The
      file is striped 4x1M.  It would appear that when the second 50M of
      the file is written O_DIRECT, the first 50MB of the file is
      dropped from system cache.   Both fd remain open during the entire
      process.  From what I can tell, it seems that once a given stripe
      is impacted by an O_DIRECT  write then the entire stripe is
      dropped from cache. Is this the expected behavior?</p>
    <p>John<br>
    </p>
  </body>
</html>