Skip to content
Snippets Groups Projects
  1. Dec 24, 2013
    • Avi Kivity's avatar
      bsd: convert the Xen stuff to C++ · 828ec291
      Avi Kivity authored
      
      Helps making bsd header changes that xen includes.
      
      Signed-off-by: default avatarAvi Kivity <avi@cloudius-systems.com>
      828ec291
    • Nadav Har'El's avatar
      sched: Overhaul sched::thread::attr construction · eb48b150
      Nadav Har'El authored
      
      We use sched::thread::attr to pass parameters to sched::thread creation,
      i.e., create a thread with non-default stack parameters, pinned to a
      particular CPU, or a detached thread.
      
      Previously we had constructors taking many combinations of stack size
      (integer), pinned cpu (cpu*) and detached (boolean), and doing "the
      right thing". However, this makes the code hard to read (what does
      attr(4096) specify?) and the constructors hard to expand with new
      parameters.
      
      Replace the attr() constructors with the so-called "named parameter"
      idiom: attr now only has a null constructor attr(), and one modifies
      it with calls to pin(cpu*), detach(), or stack(size).
      
      For example,
          attr()                                  // default attributes
          attr().pin(sched::cpus[0])              // pin to cpu 0
          attr().stack(4096).pin(sched::cpus[0])  // pin and non-default stack
          and so on.
      
      Signed-off-by: default avatarNadav Har'El <nyh@cloudius-systems.com>
      Signed-off-by: default avatarAvi Kivity <avi@cloudius-systems.com>
      eb48b150
    • Dmitry Fleytman's avatar
      netinet: Fix broken checksum verification in LRO mechanism · 71086617
      Dmitry Fleytman authored
      This patch applies bugfix published on FreeBSD list at Feb 2013:
      http://lists.freebsd.org/pipermail/svn-src-stable-9/2013-February/003928.html
      
      
      
      LRO mechanism is broken on systems without IP checksum verification offload.
      Due to improper checksum verification RX packets omit LRO path and go
      directly to TCP stack which is not good for performance.
      
      EC2 Xen is one example of such a system.
      This bug is one of the reasons we see bad performance on Amazon.
      
      Some test results w/ and w/o the fix:
      
      Buffer size    Before         After          Improvement %
      TCP TX
      32             557.52         1386.28        149
      64             552.38         1385.99        151
      128            546.43         1401.46        156
      256            565.25         1382.28        145
      512            557.32         1375.23        147
      1024           549.71         1356.69        147
      2048           551.11         1371.92        149
      4096           556.13         1383.67        149
      8192           559.49         1364.05        144
      16384          567.25         1366.48        141
      32768          546.18         1366.63        150
      65536          553.4          1353.87        145
      
      TCP RX
      32             107.37         105.48         -2
      64             187.56         179.9          -4
      128            297.16         301.71         2
      256            300.47         503.92         68
      512            294.76         826.13         180
      1024           299.95         1916.69        539
      2048           287.04         1924.44        570
      4096           300.78         1929.37        541
      8192           304.52         1934.02        535
      16384          305.04         1957.54        542
      32768          309            1921.84        522
      65536          296.48         1935.41        553
      
      Still we are pretty far from Linux, there are other problems to be fixed.
      
      Signed-off-by: default avatarDmitry Fleytman <dmitry@daynix.com>
      Signed-off-by: default avatarAvi Kivity <avi@cloudius-systems.com>
      71086617
  2. Dec 23, 2013
    • Asias He's avatar
      tests: Wait until all bio are done in bdev-write test. · 08f353e6
      Asias He authored
      
      I saw this Abort:
      
      35.159 Mb/s
      50.230 Mb/s
      46.648 Mb/s
      68.850 Mb/s
      Wrote 613.418 MB in 10.00 s
      Aborted
      
      The backtrace says:
      
        (gdb) bt
        #0  0x000000000035bb82 in halt_no_interrupts () at
        /home/asias/src/cloudius-systems/osv/arch/x64/processor.hh:241
        #1  osv::halt () at
        /home/asias/src/cloudius-systems/osv/core/power.cc:28
        #2  0x0000000000218142 in abort (msg=msg@entry=0x55197f "Aborted\n") at
        /home/asias/src/cloudius-systems/osv/runtime.cc:89
        #3  0x000000000021816e in abort () at
        /home/asias/src/cloudius-systems/osv/runtime.cc:79
        #4  0x000000000039eaa2 in osv::generate_signal (siginfo=...,
        ef=0xffffc0003eb56008) at
        /home/asias/src/cloudius-systems/osv/libc/signal.cc:58
        #5  0x000000000039eb0c in osv::handle_segmentation_fault
        (addr=<optimized out>, ef=<optimized out>) at
        /home/asias/src/cloudius-systems/osv/libc/signal.cc:73
        #6  0x000000000030b45c in mmu::vm_sigsegv
        (addr=addr@entry=17592186060800, ef=ef@entry=0xffffc0003eb56008) at
        /home/asias/src/cloudius-systems/osv/core/mmu.cc:763
        #7  0x000000000030b54b in mmu::vm_fault (addr=<optimized out>,
        addr@entry=17592186061840, ef=ef@entry=0xffffc0003eb56008)
            at /home/asias/src/cloudius-systems/osv/core/mmu.cc:773
        #8  0x000000000032bff5 in page_fault (ef=0xffffc0003eb56008) at
        /home/asias/src/cloudius-systems/osv/arch/x64/mmu.cc:35
        #9  <signal handler called>
        #10 0x0000100000004410 in ?? ()
        #11 0x000000000031e5fd in virtio::blk::req_done
        (this=0xffffc0003eddb800) at
        /home/asias/src/cloudius-systems/osv/drivers/virtio-blk.
      
      Wait until all the bio are done to fix this use after free.
      
      This patch also make the test to measure completed writes instead of
      submitted writes.
      
      Reviewed-by: default avatarTomasz Grabiec <tgrabiec@gmail.com>
      Signed-off-by: default avatarAsias He <asias@cloudius-systems.com>
      Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
      08f353e6
    • Nadav Har'El's avatar
      Update pre-requisites in README.md · e2771749
      Nadav Har'El authored
      
      We were missing the prerequisite qemu-img (needed for qemu-nbd, used
      during our build) and of course qemu-system-x86 (we run the guest as
      part of the build, to have it write files into the ZFS image).
      
      Signed-off-by: default avatarNadav Har'El <nyh@cloudius-systems.com>
      Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
      e2771749
    • Asias He's avatar
      run.py: Add aio=native for virtio-blk device · c52a03b1
      Asias He authored
      
      aio=native makes QEMU to use Linux native implementation of aio instead
      of emulated thread pool which improves tst-bdev-write.so performance:
      
        blk, aio=threads
        Wrote 691.910 MB in 10.03 s
        Wrote 590.020 MB in 10.00 s
        Wrote 605.578 MB in 10.01 s
        Wrote 662.828 MB in 10.01 s
        Wrote 624.762 MB in 10.01 s
      
        blk, aio=native
        Wrote 789.566 MB in 10.00 s
        Wrote 744.691 MB in 10.00 s
        Wrote 537.125 MB in 10.00 s
        Wrote 732.230 MB in 10.00 s
        Wrote 683.383 MB in 10.00 s
      
        scsi, aio=threads
        Wrote 200.863 MB in 10.02 s
        Wrote 193.758 MB in 10.02 s
        Wrote 193.680 MB in 10.03 s
        Wrote 195.211 MB in 10.03 s
        Wrote 190.762 MB in 10.02 s
      
        scsi, aio=native
        Wrote 414.344 MB in 10.05 s
        Wrote 483.148 MB in 10.00 s
        Wrote 537.477 MB in 10.01 s
        Wrote 477.727 MB in 10.01 s
        Wrote 462.805 MB in 10.01 s
      
      Signed-off-by: default avatarAsias He <asias@cloudius-systems.com>
      Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
      c52a03b1
    • Avi Kivity's avatar
      vring: avoid expensive divides · d11a6daa
      Avi Kivity authored
      
      Replace divides by variables and by the hard constants with masks and
      divides by easy constants.
      
      Improves netperf by about 1.6%.
      
      Noted by Vlad.
      
      Reviewed-by: default avatarDor Laor <dor@cloudius-systems.com>
      Reviewed-by: default avatarAsias He <asias@cloudius-systems.com>
      Signed-off-by: default avatarAvi Kivity <avi@cloudius-systems.com>
      d11a6daa
  3. Dec 20, 2013
  4. Dec 19, 2013
Loading