[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] Expand cache= option and use write-through cach
From: |
Avi Kivity |
Subject: |
Re: [Qemu-devel] [PATCH] Expand cache= option and use write-through caching by default |
Date: |
Sat, 11 Oct 2008 08:54:44 +0200 |
User-agent: |
Thunderbird 2.0.0.16 (X11/20080723) |
Anthony Liguori wrote:
> This patch changes the cache= option to accept none, writeback, or writethough
> to control the host page cache behavior. By default, writethrough caching is
> now used which internally is implemented by using O_DSYNC to open the disk
> images. When using -snapshot, writeback is used by default since data
> integrity
> it not at all an issue.
>
> cache=none has the same behavior as cache=off previously. The later syntax is
> still supported by now deprecated. I also cleaned up the O_DIRECT
> implementation to avoid many of the #ifdefs.
>
>
Looks good.
> @@ -8069,7 +8075,7 @@ static void help(int exitcode)
> "-cdrom file use 'file' as IDE cdrom image (cdrom is ide1
> master)\n"
> "-drive [file=file][,if=type][,bus=n][,unit=m][,media=d][,index=i]\n"
> " [,cyls=c,heads=h,secs=s[,trans=t]][,snapshot=on|off]\n"
> - " [,cache=on|off][,format=f]\n"
> + " [,cache=writethrough|writeback|none][,format=f]\n"
> " use 'file' as a drive image\n"
> "-mtdblock file use 'file' as on-board Flash memory image\n"
> "-sd file use 'file' as SecureDigital card image\n"
>
>
Might want to specify the default, and also document it in the manual.
--
Do not meddle in the internals of kernels, for they are subtle and quick to
panic.