[vbox-dev] [PATCH] open virtual disk file with O_DIRECT

Frank Mehnert frank.mehnert at oracle.com
Tue Mar 1 21:17:23 GMT 2011


On Tuesday 22 February 2011 11:24:30 Howard Su wrote:
> I am not sure how big diff this change will bring in. But I think this
> is worth trying. I enable this unconditional because i believe the
> most write for disk file doesn't need cache in host (guest already
> handle it.)
> 
> Index: VD.cpp
> ===================================================================
> --- VD.cpp      (revision 35998)
> +++ VD.cpp      (working copy)
> @@ -2333,7 +2333,7 @@
>      pStorage->pfnCompleted = pfnCompleted;
> 
>      /* Open the file. */
> -    int rc = RTFileOpen(&pStorage->File, pszLocation, fOpen);
> +    int rc = RTFileOpen(&pStorage->File, pszLocation, fOpen |
> RTFILE_O_NO_CACHE);
>      if (RT_SUCCESS(rc))
>      {
>          *ppStorage = pStorage;

This change does not make much sense. Better disable the host I/O
cache in the VM settings which is the correct strategy.

Kind regards,

Frank
-- 
ORACLE Deutschland B.V. & Co. KG   Dr.-Ing. Frank Mehnert
Werkstrasse 24                     Staff Engineer, VirtualBox
71384 Weinstadt, Germany           mailto:frank.mehnert at oracle.com

Hauptverwaltung: Riesstr. 25, D-80992 München
Registergericht: Amtsgericht München, HRA 95603

Komplementärin: ORACLE Deutschland Verwaltung B.V.
Rijnzathe 6, 3454PV De Meern, Niederlande
Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697
Geschäftsführer: Jürgen Kunz, Marcel van de Molen, Alexander van der Ven
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://www.virtualbox.org/pipermail/vbox-dev/attachments/20110301/0835d9b1/attachment.sig>


More information about the vbox-dev mailing list