1. 10 9月, 2016 5 次提交
    • M
      virtio-pci: reduce modern_mem_bar size · d9997d89
      Marcel Apfelbaum 提交于
      Currently each VQ Notification Virtio Capability is allocated
      on a different page. The idea is to enable split drivers within
      guests, however there are no known plans to do that.
      The allocation will result in a 8MB BAR, more than various
      guest firmwares pre-allocates for PCI Bridges hotplug process.
      
      Reserve 4 bytes per VQ by default and add a new parameter
      "page-per-vq" to be used with split drivers.
      Signed-off-by: NMarcel Apfelbaum <marcel@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      d9997d89
    • L
      target-i386: present virtual L3 cache info for vcpus · 14c985cf
      Longpeng(Mike) 提交于
      Some software algorithms are based on the hardware's cache info, for example,
      for x86 linux kernel, when cpu1 want to wakeup a task on cpu2, cpu1 will trigger
      a resched IPI and told cpu2 to do the wakeup if they don't share low level
      cache. Oppositely, cpu1 will access cpu2's runqueue directly if they share llc.
      The relevant linux-kernel code as bellow:
      
      	static void ttwu_queue(struct task_struct *p, int cpu)
      	{
      		struct rq *rq = cpu_rq(cpu);
      		......
      		if (... && !cpus_share_cache(smp_processor_id(), cpu)) {
      			......
      			ttwu_queue_remote(p, cpu); /* will trigger RES IPI */
      			return;
      		}
      		......
      		ttwu_do_activate(rq, p, 0); /* access target's rq directly */
      		......
      	}
      
      In real hardware, the cpus on the same socket share L3 cache, so one won't
      trigger a resched IPIs when wakeup a task on others. But QEMU doesn't present a
      virtual L3 cache info for VM, then the linux guest will trigger lots of RES IPIs
      under some workloads even if the virtual cpus belongs to the same virtual socket.
      
      For KVM, there will be lots of vmexit due to guest send IPIs.
      The workload is a SAP HANA's testsuite, we run it one round(about 40 minuates)
      and observe the (Suse11sp3)Guest's amounts of RES IPIs which triggering during
      the period:
              No-L3           With-L3(applied this patch)
      cpu0:	363890		44582
      cpu1:	373405		43109
      cpu2:	340783		43797
      cpu3:	333854		43409
      cpu4:	327170		40038
      cpu5:	325491		39922
      cpu6:	319129		42391
      cpu7:	306480		41035
      cpu8:	161139		32188
      cpu9:	164649		31024
      cpu10:	149823		30398
      cpu11:	149823		32455
      cpu12:	164830		35143
      cpu13:	172269		35805
      cpu14:	179979		33898
      cpu15:	194505		32754
      avg:	268963.6	40129.8
      
      The VM's topology is "1*socket 8*cores 2*threads".
      After present virtual L3 cache info for VM, the amounts of RES IPIs in guest
      reduce 85%.
      
      For KVM, vcpus send IPIs will cause vmexit which is expensive, so it can cause
      severe performance degradation. We had tested the overall system performance if
      vcpus actually run on sparate physical socket. With L3 cache, the performance
      improves 7.2%~33.1%(avg:15.7%).
      Signed-off-by: NLongpeng(Mike) <longpeng2@huawei.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      14c985cf
    • L
      pc: Add 2.8 machine · a4d3c834
      Longpeng(Mike) 提交于
      This will used by the next patch.
      Signed-off-by: NLongpeng(Mike) <longpeng2@huawei.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      a4d3c834
    • M
      virtio-pci: use size from correct structure · e3aab6c7
      Michael S. Tsirkin 提交于
      PIO MR registration should use size from the correct notify struct.
      Doesn't affect any visible behaviour because the field values are the
      same (both are 4).
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      e3aab6c7
    • T
      virtio: Tell the user what went wrong when event_notifier_init failed · a8bba0ad
      Thomas Huth 提交于
      event_notifier_init() can fail in real life, for example when there
      are not enough open file handles available (EMFILE) when using a lot
      of devices. So instead of leaving the average user with a cryptic
      error number only, print out a proper error message with strerror()
      instead, so that the user has a better way to figure out what is
      going on and that using "ulimit -n" might help here for example.
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NCornelia Huck <cornelia.huck@de.ibm.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      a8bba0ad
  2. 09 9月, 2016 2 次提交
    • P
      Merge remote-tracking branch 'remotes/famz/tags/docker-pull-request' into staging · c2a57aae
      Peter Maydell 提交于
      # gpg: Signature made Fri 09 Sep 2016 05:54:35 BST
      # gpg:                using RSA key 0xCA35624C6A9171C6
      # gpg: Good signature from "Fam Zheng <famz@redhat.com>"
      # gpg: WARNING: This key is not certified with a trusted signature!
      # gpg:          There is no indication that the signature belongs to the owner.
      # Primary key fingerprint: 5003 7CB7 9706 0F76 F021  AD56 CA35 624C 6A91 71C6
      
      * remotes/famz/tags/docker-pull-request:
        docker: silence debootstrap when --quiet is given
        docker: build debootstrap after cloning
        docker: make sure debootstrap is at least 1.0.67
        docker: print warning if EXECUTABLE is not set when building debootstrap image
        docker: debian-bootstrap.pre: print helpful message if DEB_ARCH/DEB_TYPE unset
        docker: debian-bootstrap.pre: print error messages to stderr
        docker: avoid dependency on 'realpath' package
        docker.py: don't hang on large docker output
        docker: Add a glib2-2.22 image
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      c2a57aae
    • P
      qtest.c: Allow zero size in memset qtest commands · 5f31bbf1
      Peter Maydell 提交于
      Some tests use the qtest protocol "memset" command with a zero
      size, expecting it to do nothing. However in the current code this
      will result in calling memset() with a NULL pointer, which is
      undefined behaviour. Detect and specially handle zero sizes to
      avoid this.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Message-id: 1470393800-7882-1-git-send-email-peter.maydell@linaro.org
      5f31bbf1
  3. 08 9月, 2016 33 次提交