Skip to content
Snippets Groups Projects
  1. Feb 05, 2014
    • Nadav Har'El's avatar
      trace: only allocate trace_log when tracepoints are enabled · c50a090f
      Nadav Har'El authored
      
      The current code the trace_log - a 4MB array which stores tracepoint data -
      is a global array. In other words, as explained in issue #96, it is part
      of the BSS, which always adds 4MB memory usage to OSv - whether or not
      tracepoints are actually enabled.
      
      This patch changes trace_log to be a dynamically-allocated array, allocated
      when the first tracepoint is enabled (e.g., with a --trace=...  boot
      option).
      
      This will also allow us (in the future) to choose the size of the trace log
      at run time rather than compile time.
      
      This patch reduces 4 MB of BSS (from 13MB to 9MB), and correspondly lowers
      our minimum memory use by 4 MB. Whereas the minimum memory requirement of
      the "rogue" image used to be 59 MB, now it is 55 MB.
      
      Signed-off-by: default avatarNadav Har'El <nyh@cloudius-systems.com>
      Signed-off-by: default avatarAvi Kivity <avi@cloudius-systems.com>
      c50a090f
  2. Feb 03, 2014
  3. Feb 02, 2014
  4. Jan 29, 2014
    • Nadav Har'El's avatar
      build: convenient shortcut for image with several modules · 0a863192
      Nadav Har'El authored
      
      A previous patch made it possible to run "make image=rogue" when a
      module rogue exists, without creating a images/rogue file.
      
      This patch expands this feature to be even more powerful:
      
      First, it allows choosing alternative command lines of a particular
      module. For example:
      
              make image=mgmt.shell
      
      Creates an image with the mgmt module (and its dependencies), and its
      command line will be mgmt's "shell" command line (i.e., run just the
      shell without the web server) instead of the "default" command line.
      
      Second, instead of specifying just one module to put in the image (plus its
      dependencies), we now allow giving a comma-separated list of unrelated
      modules, all of which are put in the image. For example:
      
              make image=memcached,netperf,tests
      
      The default command line of the image will be to run in parallel the
      "default" command line of each of the modules, if it exists. In the above
      example, the "tests" module has no command line labeled "default", so only
      those of memcached and netperf will run, but tests' files will still be
      included in the image.
      
      As above, a non-default command line of the module can also be chosen,
      for example:
      
              make image=memcached,mgmt.shell
      
      Will build an image with the memcached and mgmt modules, and will run
      in parallel memcached's "default" command line and mgmt's "shell"
      command line.
      
      If you want to include some module's files in the image, but not run
      its command line, use the special word "none". For example:
      
              make image=memcached,netperf.none
      
      will create an image with both memcached and netperf's files, but only
      run memcached's command line.
      
      Reviewed-by: default avatarTomasz Grabiec <tgrabiec@gmail.com>
      Signed-off-by: default avatarNadav Har'El <nyh@cloudius-systems.com>
      Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
      0a863192
    • Tomasz Grabiec's avatar
      modules: support running more than one simple app · e9af222f
      Tomasz Grabiec authored
      
      Now since we have support for parallel launching in the command line
      we can implement support for it in the modules.
      
      Example (image config):
      
       run = [
         api.require('netperf').default,
         api.require('mgmt').shell
       ]
      
      Result:
      
      $ scripts/run.py
      OSv v0.05-132-g779307c
      Starting netserver with host 'IN(6)ADDR_ANY' port '12865' and family AF_INET
      
      [/]%
      
      Reviewed-by: default avatarNadav Har'El <nyh@cloudius-systems.com>
      Signed-off-by: default avatarTomasz Grabiec <tgrabiec@cloudius-systems.com>
      Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
      e9af222f
    • Nadav Har'El's avatar
      build system: no need for trivial images/* files · 0983aa9c
      Nadav Har'El authored
      
      Until now, whenever we added a new module in apps.git, e.g., apps/tomcat,
      we also had to add a file images/tomcat.py in osv.git, so that
      "make image=tomcat" would work.
      
      This patch makes it unnecessary to have a images/tomcat.py - when one does
      "make image=tomcat" and images/tomcat.py is absent, we try to build an
      image containing the single module tomcat and its dependencies (which
      is defined as usual in apps/modules.json and apps/*/module.py).
      
      Non-default images, which contain more than one unrelated modules (e.g., both
      mgmt and tests) can still be defined in files in images/).
      
      Reviewed-by: default avatarTomasz Grabiec <tgrabiec@gmail.com>
      Signed-off-by: default avatarNadav Har'El <nyh@cloudius-systems.com>
      Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
      0983aa9c
  5. Jan 27, 2014
  6. Jan 22, 2014
  7. Jan 20, 2014
    • Gleb Natapov's avatar
    • Nadav Har'El's avatar
      run.py: Add -V (--verbose) option · 3fef719f
      Nadav Har'El authored
      
      The OSv loader has a "--verbose" option to enable debug() output to be
      printed to the console and not just to a memory buffer. However, needing to
      pass this option in the "-e" string is annoying, and even worse when you want
      to use the default command line and didn't even want an explict "-e" option.
      
      So this patch adds a --verbose to run.py, which can be used whether or not
      a "-e" option is given. For example:
      
          run.py --verbose
      or
          run.py --verbose tests/tst-timerfd.so
      
      As a shorthand for --verbose, I used "-V". Unfortunately, lowercase "-v"
      was already taken (by the "vhost" option).
      
      Fixes #173.
      
      Signed-off-by: default avatarNadav Har'El <nyh@cloudius-systems.com>
      Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
      3fef719f
    • Nadav Har'El's avatar
      run.py: without -e, revert to the default command line. · 38c69944
      Nadav Har'El authored
      
      As issue #128 explains, it is annoying that once the "-e" option was used
      in run.py, it overrides the default command line, so that running run.py
      again without -e reruns the same modified command line, and not the default
      one as usual.
      
      This simple patch changes this behavior: On every run of run.py, the command
      line is set - if "-e" is given it is set to the given command line, but if
      "-e" is absent, the command line is reset to the default one. This is
      basically the behavior that people always wanted from run.py.
      
      This patch, and the behavior it performs, are much simpler than any of
      the alternatives proposed in issue #128.
      
      Please don't complain that this can only be used for development, and not
      for EC2, for creating images to distribute, and so on. After all, this is a
      patch to *run.py*, and it is obviously not relevant to anyone who is running
      an OSv image not through run.py. This patch only makes run.py more convenient
      to use.
      
      Fixes #128.
      
      Signed-off-by: default avatarNadav Har'El <nyh@cloudius-systems.com>
      Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
      38c69944
  8. Jan 16, 2014
  9. Jan 15, 2014
  10. Jan 14, 2014
    • Nadav Har'El's avatar
      Move tests to a separate module · 4d0ed4c3
      Nadav Har'El authored
      
      Instead of always putting the tests into all images, this patch adds the
      option of putting them only in some of the images, by making them into a
      new module, modules/tests.
      
      The default image (images/default.py) continues to require the tests
      modules, so tests are included in the default image. Building with
      "make image=tests" makes an image with only the tests and nothing else.
      Other images (e.g., memcached, cassandra,...) currently do not require
      the tests module, so the generated image does will not include the tests.
      
      With this patch, "make image=memcached", for example, contains only the
      bare minimum needed for memcached, and the resulting qcow image is just
      18 MB, down from 69 MB when we included all the tests.
      
      Fixes #160
      
      Signed-off-by: default avatarNadav Har'El <nyh@cloudius-systems.com>
      Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
      4d0ed4c3
  11. Jan 13, 2014
Loading