Skip to content
Snippets Groups Projects
  1. Aug 05, 2013
  2. Aug 04, 2013
    • Avi Kivity's avatar
      build: improve .text section generation · 3d58de8e
      Avi Kivity authored
      gcc generates some functions in their own section.  Have a wildcard that
      catches all of these sections so they can all be merged into the global
      .text section; this makes 'perf kvm top' format its output better.
      
      The catch-all wildcard is placed last since ld uses the first match.
      3d58de8e
    • Avi Kivity's avatar
      string: fast memcpy and memset for machines without ERMS · 7f3df3ef
      Avi Kivity authored
      Not all machines have Enhanced REP MOVSB/STOSB (ERMS); provide optimized
      fallbacks.
      7f3df3ef
    • Avi Kivity's avatar
      Merge branch 'uma' (early part) · 6d87c464
      Avi Kivity authored
      Cache uma initialized objects to avoid re-initializing them on each allocation.
      6d87c464
    • Nadav Har'El's avatar
      Convert poll.c to poll.cc · e1686fc4
      Nadav Har'El authored
      Convert poll.c to poll.cc, and add a few tracepoints.
      e1686fc4
    • Nadav Har'El's avatar
      CLI: Don't run init.js on telnet sessions · c4b60f7b
      Nadav Har'El authored
      Before this patch, we ran init.js for every new shell. But init.js runs
      things that only need to be done once - like setting the IP address or
      runnig a DHCP or Telnet server - and we don't need to do this again when
      somebody telnets in.
      
      So this patch adds an "init" flag, which tells the shell if it should
      read init.js. This flag is true for the CLI's main(), but when run from
      TelnetCLI, the flag is false.
      c4b60f7b
    • Nadav Har'El's avatar
      CLI: Telnet connection shouldn't mess with console's stty · a8e0b003
      Nadav Har'El authored
      Our CLI changes the console's tty mode to raw when doing its line
      editing, and back to the original (cooked) mode when running a command.
      Obviously, when we're running on a telnet connection we shouldn't touch
      the console's mode like the existing code did.
      
      OSV doesn't (at least for now) have ptys, so we can't handle the
      telnet connection exactly like we handled the console, and the kernel
      can't implement a "cooked" line discipline for us like it implemented on
      the console. But we can do a very similar thing in Java instead:
      
      This patch adds a new Java class, "TTY", which has an input and output
      stream and an "stty" interface. We have one implementation for the console
      (using System.in, System.out and the console's Stty), and a different
      implementation, TelnetTTY, for a telnet connection.
      
      This patch does not currently implement a line discipline ("cooked mode")
      for this TelnetTTY, so it will always stay in raw mode. This is fine for all
      our current uses of the CLI, but if in the future we have commands that read
      user input and expect cooked mode (echo, line editing), we'll need to
      implement this line discipline.
      a8e0b003
  3. Aug 01, 2013
    • Glauber Costa's avatar
      do not unmap bios memory · 633a0b7c
      Glauber Costa authored
      There is no harm in leaving it mappend, and there is a potential harm in unmapping,
      since our mapping code does not keep reference counters. So if we map an already
      mapped area, the unmap code will just unmap it for good. Avi spotted this.
      633a0b7c
    • Glauber Costa's avatar
      speed up pci discovery · 436c8e59
      Glauber Costa authored
      We are currently using PCI's brute force enumeration, which consists of scanning
      all possible combination of b,d,f. This makes us issue many inb operations, a lot
      more than we could do if we were using smarter enumeration. In my system, the inbs
      alone account for more than 5M cycles, which takes around 4s to run (remember this
      is xen, it is faster in KVM)
      
      We can do a lot better by using recursive discovery, and only scanning the buses
      we need to. In the case of virtual systems the difference is even bigger, since it
      is very unlikely that we will have any complex setup with more than one bridge.
      
      Boot for me feels instantaneous now (once we get to start OSV)
      436c8e59
  4. Jul 31, 2013
    • Avi Kivity's avatar
      uma: cache initialized objects · 776221bd
      Avi Kivity authored
      The init and fini functions are fairly expensive (for networking).  Cache
      initialized objects in percpu pools to save this cost.
      
      The implementation is imperfect since if we're allocating on one cpu and
      freeing on another, reuse is low.  This can be improved in the future, or
      made unnecessary with VJ rings.
      
      Increases netperf from ~14.6Gbps to ~17.8Gbps on my machine.
      776221bd
    • Avi Kivity's avatar
      uma: honor M_ZERO · 88e3d43e
      Avi Kivity authored
      M_ZERO requests zeroing of the object regardless of any constructor; honor it.
      
      It works now because we bzero() all objects unconditionally, but we soon
      won't.
      88e3d43e
    • Avi Kivity's avatar
      uma: dynamically allocate zones · 5a6ca26e
      Avi Kivity authored
      We're going to make zones more expensive to allocate, so allocate only
      as many as we need.
      5a6ca26e
    • Avi Kivity's avatar
      bsd: switch uma to C++ · 13d28a21
      Avi Kivity authored
      Allows integrating with our mempools.
      13d28a21
    • Avi Kivity's avatar
      percpu: add indirect dynamic percpu · 2cbb2df6
      Avi Kivity authored
      dynamic_percpu<some_large_struct> will exhaust our percpu pools very quickly.
      dynamic_percpu<unique_ptr<some_large_struct>> works, but is awkward to
      construct (need a cpu notifier so we allocate it for newly onlined cpus).
      
      Add dynamic_percpu_indirect<some_large_struct> which will allocate an
      object for each cpu automatically as it is brought up.  It's not
      completely general as we can't pass any constructor arguments, but should work
      for now.
      2cbb2df6
    • Avi Kivity's avatar
      dhcp: remove M_ZERO from mbuf allocation · 4ac239de
      Avi Kivity authored
      M_ZERO requests zeroing of the entire mbuf, which clears the fields initialized
      by the init function.  It only works now because we don't honor M_ZERO.
      
      Remove M_ZERO and replace with bzero() for the packet data only.
      4ac239de
    • Avi Kivity's avatar
      callstack: fix uninitialized data in trace object · 4829c0bc
      Avi Kivity authored
      The trace object contains a list link for the hash table, which needs to be
      initialized by the constructor.  However, trace_alloc() did not call the
      constructor and returned uninitialized memory.
      
      Fix by calling the constructor.  For simplicity, all of the object's
      initialization is moved to the constructor.
      4829c0bc
    • Glauber Costa's avatar
      make initialization priorities explicit · f801c763
      Glauber Costa authored
      I have recently ran into an early init bug due that ended up being tracked
      down to a changeset in which the initialization priorities of the constructors
      were changed. One of the changed ones was kvmclock, but the change did not
      update kvmclock.
      
      I propose we use constants for that. To avoid things like this in the future,
      wherever priorities are used, I believe they should come from the same place
      so that the order is utterly obvious. To handle that, I am creating the prio.hh
      file, and sticking all priority definitions in there.
      f801c763
    • Glauber Costa's avatar
      msleep: respect BSD's PDROP · 322bd4fb
      Glauber Costa authored
      So after all the BSD code is not buggy, it is just their semantics that is
      slightly different from our version of mlock (Thanks Christoph). Whether or not
      we will drop the lock will be controlled by the value of the PDROP flag.
      
      Our msleep queues are protected by an internal lock which is not the same lock
      the user passed to the msleep call. Therefore, we can just a version of
      wait_until that does not take a lock argument, and do the locking manually
      ourselves. We may then lock it back or not, depending on the presence of the
      PDROP flag.
      322bd4fb
  5. Jul 30, 2013
    • Glauber Costa's avatar
      make some xen headers usable from C++ · f797c686
      Glauber Costa authored
      Only those I plan to use for now. Wrap it into __*_DECLS
      f797c686
    • Glauber Costa's avatar
      sync_stub: provide more stubs for xen · fd45df71
      Glauber Costa authored
      This provides a simple msleep implementation that simply calls our own, and
      an empty MTX_INIT macro
      fd45df71
    • Glauber Costa's avatar
      bsd: header files for xen · a8f92c58
      Glauber Costa authored
      Most of those files are quasi-empty (just with the usual .h ifdef in case we need
      to add things later). When relevant, we also add code to those files, sometimes
      including our own files, and providing extra definitions.
      
      Providing those stubs make importing BSD files a lot easier.
      a8f92c58
    • Christoph Hellwig's avatar
      zfs: support O_SYNC/O_DSYNC and fsync · 44426468
      Christoph Hellwig authored
      44426468
    • Christoph Hellwig's avatar
    • Avi Kivity's avatar
      assert: mark __assert_fail as noreturn · a9ab8745
      Avi Kivity authored
      This allows gcc to infer that asserts usually do not trigger, and move all
      that code out-of-line.
      a9ab8745
    • Nadav Har'El's avatar
      CLI: Telnet server · 0b2df7d9
      Nadav Har'El authored
      This patch adds a simple telnet server to OSV, implemented in Java.
      One can telnet to the VM's IP address (default port 23) and get a CLI
      shell. Multiple concurrent telnet sessions are supported (and the shells
      are independent, as expected).
      
      To start the telnet server, simply run the com.cloudius.cli.util.TelnetCLI
      class. For example, in the CLI to start a telnet server in the background
      use:
      
      	java com.cloudius.cli.util.TelnetCLI &
      
      To start OSV with only a telnet server, try
      
      	sudo scripts/run.py -c1 -nv -m2G -e "java.so -jar
      		/java/cli.jar java  com.cloudius.cli.util.TelnetCLI"
      
      (The "cli.jar" in the last example is only needed to set the IP address...)
      
      In the future we can turn the telnet server on by default - but let's
      add a password feature first :-) Right now, there's no password requested
      when someone telnets in.
      0b2df7d9
    • Nadav Har'El's avatar
      CLI: Allow setting the CLI's input/output streams · 08ce572f
      Nadav Har'El authored
      The CLI used to assume it was using System.in, System.out (which point
      to the console). Now make these parameters. We need this so we can run the
      CLI on a telnet connection, and it doesn't send output to the console or try
      to read from it.
      08ce572f
    • Dor Laor's avatar
      Add write cache enable bit to virtio-blk · 61f465e6
      Dor Laor authored
      61f465e6
Loading