Skip to content
Snippets Groups Projects
  1. Dec 30, 2013
    • Tomasz Grabiec's avatar
      bsd: Initialize physmem variable · 9b72ad47
      Tomasz Grabiec authored
      
      This was the cause of poor ZFS performance in misc-fs-stress test.
      
      Before:
      
       Wrote 168.129 MB in 10.12 s = 16.610 Mb/s
       Wrote 194.688 MB in 10.00 s = 19.469 Mb/s
       Wrote 183.004 MB in 10.06 s = 18.186 Mb/s
       Wrote 167.754 MB in 10.28 s = 16.315 Mb/s
      
      After:
      
       Wrote 636.227 MB in 10.00 s = 63.623 Mb/s
       Wrote 666.979 MB in 10.00 s = 66.696 Mb/s
       Wrote 613.512 MB in 10.00 s = 61.350 Mb/s
       Wrote 573.502 MB in 10.00 s = 57.346 Mb/s
       Wrote 668.607 MB in 10.00 s = 66.857 Mb/s
       Wrote 630.920 MB in 10.00 s = 63.087 Mb/s
      
      It turned out that the limiting factor was the ARC cache. A check
      inside arc_tempreserve_space() was forcing txg to be synced too often
      (once every 400ms). The arc_c variable was only 16M (arc_c_min) which
      allowed to write only 8M per transaction. It turns out that arc_c
      depends on kmem_size() which is based on physmem which was never
      initialized.
      
      I would hold with commiting this yet because of several reasons,
      which I want to put under your consideration.
      
      While this improves write throughput it makes the boot time after make
      much longer, on my disk the boot time is increased from 1.5s to 10s.
      This is because zfs verifies the last 3 txgs upon mount. This patch
      increases txg size, which results in more data to check in the next
      boot. I'm working on solving this right now.
      
      Something worth noting is that while larger transactions sync less
      often incresing throughput they also sync longer increasing worst case
      latency. In my test the pauses get as high as 3 seconds with 1G of
      guest memory.
      
      Signed-off-by: default avatarTomasz Grabiec <tgrabiec@cloudius-systems.com>
      Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
      9b72ad47
    • Avi Kivity's avatar
      xen: remove designated initializer in C++ code · 14e6485d
      Avi Kivity authored
      
      While (unfortunately) C++ doesn't support designated initializers, and the
      compiler rejects them, one instance has survived in xenbus.  Strangely,
      gcc 4.8.2 generates correct code, while gcc 4.8.0 fails with an internal
      compiler error, instead of both of them rejecting the code.
      
      Signed-off-by: default avatarAvi Kivity <avi@cloudius-systems.com>
      Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
      14e6485d
  2. Dec 26, 2013
  3. 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
  4. Dec 20, 2013
  5. Dec 19, 2013
  6. Dec 16, 2013
  7. Dec 12, 2013
  8. Dec 10, 2013
    • Raphael S. Carvalho's avatar
      vfs: Fix duplicate in-memory vnodes · 9ecda822
      Raphael S. Carvalho authored
      
      Currently, namei() does vget() unconditionally if no dentry is found.
      This is wrong because the path can be a hard link that points to a vnode
      that's already in memory.
      
      To fix the problem:
      
        - Use inode number as part of the hash in vget()
      
        - Use vn_lookup() in vget() to make sure we have one vnode in memory
          per inode number.
      
        - Push the vget() calls down to individual filesystems and make
          VOP_LOOKUP return an vnode
      
      Changes since v2:
        - v1 dropped lock in vn_lookup, thus assert that vnode_lock is held.
      
      Changes since v3:
        - Fix lock ordering issue in dentry_lookup. The lock respective to the parent
      node must be acquired before dentry_lookup and released after the process is
      done. Otherwise, a second thread looking up for the same dentry may take the
      'NULL' path incorrectly.
      
      Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
      Signed-off-by: default avatarRaphael S. Carvalho <raphaelsc@cloudius-systems.com>
      Signed-off-by: default avatarAvi Kivity <avi@cloudius-systems.com>
      9ecda822
    • Nadav Har'El's avatar
      Fix wrong error codes in unlink(), rmdir() and readdir() · 86b5374f
      Nadav Har'El authored
      
      This patch fixes the error codes in four error cases:
      
      1. unlink() of a directory used to return EPERM (as in Posix), and now
         returns EISDIR (as in Linux).
      
      2. rmdir() of a non-empty directory used to return EEXIST (as in Posix)
         and now returns ENOTEMPTY (as in Linux).
      
      3. rmdir() of a regular file (non-directory) used to return EBADF
         and now returns ENOTDIR (as in Linux).
      
      4. readdir() of a regular file (non-directory) used to return EBADF
         and now returns ENOTDIR (as in Linux).
      
      This patch also adds a test, tst-remove.cc, for the various unlink() and
      rmdir() success and failure modes.
      
      Fixes #123.
      
      Signed-off-by: default avatarNadav Har'El <nyh@cloudius-systems.com>
      Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
      86b5374f
  9. Dec 09, 2013
  10. Dec 08, 2013
  11. Dec 05, 2013
  12. Dec 04, 2013
  13. Dec 03, 2013
Loading