Re: [Qemu-devel] [PATCH] QEMU: change default disk cache behavior

2010-05-20 Thread Anthony Liguori

On 05/20/2010 08:49 AM, Jes Sorensen wrote:

On 05/20/10 15:40, Anthony Liguori wrote:
   

On 05/20/2010 08:36 AM, Jes Sorensen wrote:
 

And I strongly suspect that such a blanket change would be wrong but
that a more targeted change like making cache=none default for physical
devices would satisfy mostly everyone.

 

Is there any other thing than physical devices attached to the -drive
parameter?
   

Image files which are the overwhelming more common use-case.
 

For image files we certainly want it too, at least for proper ones (ie.
raw).


What makes you say that?


  It could be that it causes problems for qcow2.
   


It's definitely the wrong thing for qcow2 with backing files.

Regards,

Anthony Liguori


I'll try and look at it when I am back.

Cheers,
Jes

   





Re: [Qemu-devel] [PATCH] QEMU: change default disk cache behavior

2010-05-20 Thread Stefan Hajnoczi
On Thu, May 20, 2010 at 2:49 PM, Jes Sorensen  wrote:
> On 05/20/10 15:40, Anthony Liguori wrote:
>> On 05/20/2010 08:36 AM, Jes Sorensen wrote:
 And I strongly suspect that such a blanket change would be wrong but
 that a more targeted change like making cache=none default for physical
 devices would satisfy mostly everyone.

>>> Is there any other thing than physical devices attached to the -drive
>>> parameter?
>>
>> Image files which are the overwhelming more common use-case.
>
> For image files we certainly want it too, at least for proper ones (ie.
> raw). It could be that it causes problems for qcow2.

Qcow2 is safest with cache=writethrough because it doesn't order image updates:

https://bugzilla.redhat.com/show_bug.cgi?id=572825
http://wiki.qemu.org/Features/Qcow2DataIntegrity

Stefan



Re: [Qemu-devel] [PATCH] QEMU: change default disk cache behavior

2010-05-20 Thread Jes Sorensen
On 05/20/10 15:40, Anthony Liguori wrote:
> On 05/20/2010 08:36 AM, Jes Sorensen wrote:
>>> And I strongly suspect that such a blanket change would be wrong but
>>> that a more targeted change like making cache=none default for physical
>>> devices would satisfy mostly everyone.
>>>  
>> Is there any other thing than physical devices attached to the -drive
>> parameter?
> 
> Image files which are the overwhelming more common use-case.

For image files we certainly want it too, at least for proper ones (ie.
raw). It could be that it causes problems for qcow2.

I'll try and look at it when I am back.

Cheers,
Jes




Re: [Qemu-devel] [PATCH] QEMU: change default disk cache behavior

2010-05-20 Thread Anthony Liguori

On 05/20/2010 08:36 AM, Jes Sorensen wrote:

On 05/20/10 14:30, Anthony Liguori wrote:
   

On 05/20/2010 04:32 AM, jes.soren...@redhat.com wrote:
 

Therefore, here is a patch that does two things:
   - default to "nocache"
   - in case of failure with nocache, retry with "write-back"

   

This sort of change requires performance data in a variety of
circumstances to justify.

And I strongly suspect that such a blanket change would be wrong but
that a more targeted change like making cache=none default for physical
devices would satisfy mostly everyone.
 

Is there any other thing than physical devices attached to the -drive
parameter?
   


Image files which are the overwhelming more common use-case.

Regards,

Anthony Liguori


If so, I can take a look at making it more generic when I am back from
holiday next week.

Jes

   





Re: [Qemu-devel] [PATCH] QEMU: change default disk cache behavior

2010-05-20 Thread Jes Sorensen
On 05/20/10 14:30, Anthony Liguori wrote:
> On 05/20/2010 04:32 AM, jes.soren...@redhat.com wrote:
>> Therefore, here is a patch that does two things:
>>   - default to "nocache"
>>   - in case of failure with nocache, retry with "write-back"
>>
> 
> This sort of change requires performance data in a variety of
> circumstances to justify.
> 
> And I strongly suspect that such a blanket change would be wrong but
> that a more targeted change like making cache=none default for physical
> devices would satisfy mostly everyone.

Is there any other thing than physical devices attached to the -drive
parameter?

If so, I can take a look at making it more generic when I am back from
holiday next week.

Jes




Re: [Qemu-devel] [PATCH] QEMU: change default disk cache behavior

2010-05-20 Thread Anthony Liguori

On 05/20/2010 04:32 AM, jes.soren...@redhat.com wrote:

From: Jes Sorensen

We seem to get into the discussion of what is the correct default
setting disk images in QEMU. The libvirt team is reluctant to change
specified for newly created images without the default setting
matching it, and everybody seems to agree that the current setting of
WT is the worse possible option.

'nocache' seems to be the preferred option, but it doesn't work for
all cases, like images on ramfs, NFS etc.

Therefore, here is a patch that does two things:
  - default to "nocache"
  - in case of failure with nocache, retry with "write-back"
   


This sort of change requires performance data in a variety of 
circumstances to justify.


And I strongly suspect that such a blanket change would be wrong but 
that a more targeted change like making cache=none default for physical 
devices would satisfy mostly everyone.


Regards,

Anthony Liguori


Jes Sorensen (1):
   QEMU: Change default disk caching to nocache

  vl.c |   25 +++--
  1 files changed, 19 insertions(+), 6 deletions(-)