Re: Is there a way to flush the file cache?



General Schvantzkoph wrote:

I've just gotten the answer on the Fedora forums. The open() call has a
O_DIRECT flag which causes file I/O to use user buffers instead of the
cache. Raw IO isn't supported in the 2.6 kernels.

I imagine there is another way to accomplish what Raw IO did in the 2.6
kernels because I use IBM DB2 and it uses raw IO. It bypasses the file
system and writes direct to the disk partition(s). This is only partly to
avoid the copy from user space to kernel space. It is also to permit much
larger page sizes, to allocate disk space contiguously, and such. It may
also get closer to having a COMMIT work correctly and mean that the data
have really gotten to the disk. (I think it only means the data got to the
hard drive's input buffer and received a suitable acknowledgment from the
hard drive.)

--
.~. Jean-David Beyer Registered Linux User 85642.
/V\ PGP-Key: 9A2FC99A Registered Machine 241939.
/( )\ Shrewsbury, New Jersey http://counter.li.org
^^-^^ 09:35:01 up 69 days, 12:07, 3 users, load average: 4.16, 4.09, 4.09
.



Relevant Pages

  • Re: BUG: softraid,ext3 lockup
    ... all kernels I have seen are slugish on ide-raid large raw write, ... now I got some performance test: ... the problem is present when I do this directly to raw partition /dev/hda2, ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Re: raw device on suse10.1
    ... or 10 on Linux. ... In SuSE releases with 2.4.21 kernels I used raw ... SuSE) and not in others, or the feature will be completely removed from ...
    (comp.databases.informix)
  • Re: POISON: Trader Joes "Fig Cake w/Apricot Kernels"
    ... kernels...didn't I read somewhere that ... poisonous...especially when raw. ... Acute Cyanide Toxicity Caused By Apricot Kernel Ingestion ...
    (rec.food.cooking)
  • Re: fgets() equivalent?
    ... fgetsis standard in C file I/O. ... The only issue you need to pay attention too, is RAW vs COOK ... Cooked mode in a Unix ... cooked mode in Unix applies ONLY to terminals. ...
    (microsoft.public.win32.programmer.kernel)