Glauber Costa | 1 Sep 2009 01:39
Picon
Favicon

[GIT PULL] stable 0.10.7

Anthony,

Please pull from my master branch at:

	http://git.qemu.org/qemu-stable-0.10.git/

I am not sending all patches these time, to avoid cluttering the list.
They are all the same, except for Chris Webb's backport, which has been
sent to the list a while ago, and "fix broken migration", that has been
reverted.

thanks.

Christoph Hellwig | 1 Sep 2009 01:06
Picon

Re: [PATCH 1/4] block: add enable_write_cache flag

On Mon, Aug 31, 2009 at 11:46:45PM +0100, Jamie Lokier wrote:
> > On Mon, Aug 31, 2009 at 11:09:50PM +0100, Jamie Lokier wrote:
> > > Right now, on a Linux host O_SYNC is unsafe with hardware that has a
> > > volatile write cache.  That might not be changed, but if it is than
> > > performance with cache=writethrough will plummet (due to issuing a
> > > CACHE FLUSH to the hardware after every write), while performance with
> > > cache=writeback will be reasonable.
> > 
> > Currenly all modes are more or less unsafe with volatile write caches
> > at least when using ext3 or raw block device accesses.  XFS is safe
> > two thirds due to doing the right thing and one third due to sheer
> > luck.
> 
> Right, but now you've made it worse.  By not calling fdatasync at all,
> you've reduced the integrity.  Previously it would reach the drive's
> cache, and take whatever (short) time it took to reach the platter.
> Now you're leaving data in the host cache which can stay for much
> longer, and is vulnerable to host kernel crashes.

Your last comment is for data=writeback, which in Avi's proposal that
I implemented would indeed lost any guarantees and be for all pratical
matters unsafe.  It's not true for any of the other options.

> Oh, and QEMU could call whatever "hdparm -F" does when using raw block
> devices ;-)

Actually for ide/scsi implementing cache control is on my todo list.
Not sure about virtio yet.

> Well I'd like to start by pointing out your patch introduces a
(Continue reading)

Christoph Hellwig | 1 Sep 2009 01:06
Picon

Re: [PATCH 1/4] block: add enable_write_cache flag

On Mon, Aug 31, 2009 at 11:59:25PM +0100, Jamie Lokier wrote:
> Anthony Liguori wrote:
> > Can someone do some benchmarking with cache=writeback and fdatasync 
> > first and quantify what the real performance impact is?
> 
> Unfortunately we can't yet quantify the impact on the hardware I care
> about (ordinary consumer PCs with non-NCQ SATA disks), because Linux
> hosts don't *yet* implement O_SYNC or fdatasync properly.

They do if you use XFS.

Christoph Hellwig | 1 Sep 2009 01:09
Picon

Re: [PATCH 1/4] block: add enable_write_cache flag

On Tue, Sep 01, 2009 at 01:06:46AM +0200, Christoph Hellwig wrote:
> On Mon, Aug 31, 2009 at 11:59:25PM +0100, Jamie Lokier wrote:
> > Anthony Liguori wrote:
> > > Can someone do some benchmarking with cache=writeback and fdatasync 
> > > first and quantify what the real performance impact is?
> > 
> > Unfortunately we can't yet quantify the impact on the hardware I care
> > about (ordinary consumer PCs with non-NCQ SATA disks), because Linux
> > hosts don't *yet* implement O_SYNC or fdatasync properly.
> 
> They do if you use XFS.

And data-writeback + fdatasync also when using reiserfs.  For ext3/4 you
need the patches I sent out today, for O_SYNC on everythig but XFS also
Jan Kara's patch series.

Juan Quintela | 1 Sep 2009 02:12
Picon
Favicon

[PATCH 1/3] savevm: Convert savevm handlers list to TAILQ


Signed-off-by: Juan Quintela <quintela <at> redhat.com>
---
 savevm.c |   94 +++++++++++++++++++++++++++----------------------------------
 1 files changed, 42 insertions(+), 52 deletions(-)

diff --git a/savevm.c b/savevm.c
index 2b4054a..baef277 100644
--- a/savevm.c
+++ b/savevm.c
 <at>  <at>  -890,6 +890,7  <at>  <at>  const VMStateInfo vmstate_info_buffer = {
 };

 typedef struct SaveStateEntry {
+    TAILQ_ENTRY(SaveStateEntry) entry;
     char idstr[256];
     int instance_id;
     int version_id;
 <at>  <at>  -899,12 +900,26  <at>  <at>  typedef struct SaveStateEntry {
     LoadStateHandler *load_state;
     const VMStateDescription *vmsd;
     void *opaque;
-    struct SaveStateEntry *next;
 } SaveStateEntry;

-static SaveStateEntry *first_se;
+static TAILQ_HEAD(savevm_handlers, SaveStateEntry) savevm_handlers =
+    TAILQ_HEAD_INITIALIZER(savevm_handlers);
 static int global_section_id;

(Continue reading)

Juan Quintela | 1 Sep 2009 02:12
Picon
Favicon

[PATCH 2/3] Add LIST_FOREACH_SAFE() definition


Signed-off-by: Juan Quintela <quintela <at> redhat.com>
---
 sys-queue.h |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/sys-queue.h b/sys-queue.h
index cb6a4c8..eb89a4d 100644
--- a/sys-queue.h
+++ b/sys-queue.h
 <at>  <at>  -126,6 +126,11  <at>  <at>  struct {                                                                \
                 (var);                                                  \
                 (var) = ((var)->field.le_next))

+#define LIST_FOREACH_SAFE(var, head, field, next_var)                   \
+        for ((var) = ((head)->lh_first);                                \
+                (var) && ((next_var) = ((var)->field.le_next), 1);      \
+                (var) = (next_var))
+
 /*
  * List access methods.
  */
--

-- 
1.6.2.5

Juan Quintela | 1 Sep 2009 02:12
Picon
Favicon

[PATCH 3/3] savevm: Convert loadvm handlers list to LIST


Signed-off-by: Juan Quintela <quintela <at> redhat.com>
---
 savevm.c |   21 ++++++++++++---------
 1 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/savevm.c b/savevm.c
index baef277..6adf46c 100644
--- a/savevm.c
+++ b/savevm.c
 <at>  <at>  -1260,10 +1260,10  <at>  <at>  static SaveStateEntry *find_se(const char *idstr, int instance_id)
 }

 typedef struct LoadStateEntry {
+    LIST_ENTRY(LoadStateEntry) entry;
     SaveStateEntry *se;
     int section_id;
     int version_id;
-    struct LoadStateEntry *next;
 } LoadStateEntry;

 static int qemu_loadvm_state_v2(QEMUFile *f)
 <at>  <at>  -1309,7 +1309,9  <at>  <at>  static int qemu_loadvm_state_v2(QEMUFile *f)

 int qemu_loadvm_state(QEMUFile *f)
 {
-    LoadStateEntry *first_le = NULL;
+    LIST_HEAD(, LoadStateEntry) loadvm_handlers =
+        LIST_HEAD_INITIALIZER(loadvm_handlers);
+    LoadStateEntry *le, *new_le;
(Continue reading)

Juan Quintela | 1 Sep 2009 02:12
Picon
Favicon

[PATCH 0/3] Bring savevm.c to the wonderful world of sys-queue.h

Hi

V2:
- Initialize loadvm_handlers with LIST_HEAD_INITIALIZER.
  Reported by Luiz Capitulino.

v1:
- replace first_se by a TAILQ (savevm_handlers)
- replace first_le by a LIST (loadvm_handlers)
- add LIST_FOREACH_SAFe that didn't exist before

Later, Juan.

Juan Quintela (3):
  savevm: Convert savevm handlers list to TAILQ
  Add LIST_FOREACH_SAFE() definition
  savevm: Convert loadvm handlers list to LIST

 savevm.c    |  115 +++++++++++++++++++++++++++-------------------------------
 sys-queue.h |    5 +++
 2 files changed, 59 insertions(+), 61 deletions(-)

Juan Quintela | 1 Sep 2009 02:25
Picon
Favicon

Re: [PATCH 3/3] savevm: Convert loadvm handlers list to LIST

Luiz Capitulino <lcapitulino <at> redhat.com> wrote:
> On Tue, 01 Sep 2009 00:08:43 +0200
> Juan Quintela <quintela <at> redhat.com> wrote:
>
>> Luiz Capitulino <lcapitulino <at> redhat.com> wrote:
>> > On Fri, 28 Aug 2009 22:31:57 +0200
>> > Juan Quintela <quintela <at> redhat.com> wrote:
>> >
>> >> 
>> >> Signed-off-by: Juan Quintela <quintela <at> redhat.com>
>> >> ---
>> >>  savevm.c |   20 +++++++++++---------
>> >>  1 files changed, 11 insertions(+), 9 deletions(-)
>> >> 
>> >> diff --git a/savevm.c b/savevm.c
>> >> index baef277..9836c60 100644
>> >> --- a/savevm.c
>> >> +++ b/savevm.c
>> >>  <at>  <at>  -1260,10 +1260,10  <at>  <at>  static SaveStateEntry *find_se(const char *idstr, int instance_id)
>> >>  }
>> >> 
>> >>  typedef struct LoadStateEntry {
>> >> +    LIST_ENTRY(LoadStateEntry) entry;
>> >>      SaveStateEntry *se;
>> >>      int section_id;
>> >>      int version_id;
>> >> -    struct LoadStateEntry *next;
>> >>  } LoadStateEntry;
>> >> 
>> >>  static int qemu_loadvm_state_v2(QEMUFile *f)
(Continue reading)

Paolo Bonzini | 1 Sep 2009 02:55
Picon
Gravatar

Re: [PATCH v3] introduce on_vcpu

On 08/31/2009 01:35 PM, Glauber Costa wrote:
> On Sat, Aug 29, 2009 at 02:22:27AM +0100, Jamie Lokier wrote:
>> Anthony Liguori wrote:
>>> Glauber Costa wrote:
>>> Since we already keep the tid in the vcpu structure, it seems to make
>>> more sense to ask "am I this vcpu thread" by doing gettid() == env->tid
>>> than by maintaining a new global tls variable.
>>
>> Note that a tls variable will be much faster than gettid().  Don't
>> know if you're talking about a hot path.
> just to be sure, TLS is not supported on all our linux target hosts, right?

I think it is.

~/devel/gcc/gcc pbonzini$ grep -l SYMBOL_REF_TLS_MODEL config/*/*.c
config/alpha/alpha.c
config/arm/arm.c
config/frv/frv.c
config/i386/i386.c
config/ia64/ia64.c
config/m68k/m68k.c
config/mips/mips.c
config/pa/pa.c
config/rs6000/rs6000.c
config/s390/s390.c
config/sh/sh.c
config/sparc/sparc.c
config/xtensa/xtensa.c

Paolo
(Continue reading)


Gmane