Skip to content
Snippets Groups Projects
  1. Feb 07, 2014
  2. Feb 02, 2014
  3. Jan 29, 2014
    • Glauber Costa's avatar
      blkfront: c++ify a bit more · 5403c4a1
      Glauber Costa authored
      
      This patch make some of the blkfront structures a bit more C++ friendly. I am
      creating a C++ version of the device private structure, and the goal here is to
      convert it slowly until all or most fields are inside it. At that point, I
      expect it to be easy to turn the functions into methods, etc. I am sorry, I
      would really like to do a mass translation here, but there are urgent bugs
      requiring my attention.
      
      Some notes:
       * I am converting blkfront only, and leaving netfront with the old code. It
         shouldn't be hard, I just deferred the risk of mistakes to a future
         oportunity.
       * you will notice that lines that are added by me are not following the
         original file's identation. This is deliberate. As much as we have in our
         guidelines to preserve the original ident, since we are slowly converting
         those files, our identation should eventually win. Think of it as a form
         of cultural domination. (and shouldn't bother viewers if tabs=4 spaces)
      
      Signed-off-by: default avatarGlauber Costa <glommer@cloudius-systems.com>
      Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
      5403c4a1
  4. Jan 27, 2014
  5. Jan 22, 2014
  6. Jan 20, 2014
  7. Jan 16, 2014
  8. Jan 15, 2014
    • Eduardo Piva's avatar
      debug: Change calls to printf on boot messages · f37b7e53
      Eduardo Piva authored
      
      Change some printf calls on boot messages, so it will call
      the apropriate debug function. This will enable OSv
      to operate on silent mode.
      
      Added debug.h header so we can link debug functions to C files.
      
      Fixes #118
      
      Signed-off-by: default avatarEduardo Piva <efpiva@gmail.com>
      Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
      f37b7e53
    • Nadav Har'El's avatar
      Document clock::time() and fix its implementation on kvmclock · ae65b676
      Nadav Har'El authored
      
      Our clock::time() function returns the current wall-clock time (number of
      nanoseconds since the Unix epoch). We never clearly documented this, so this
      patch adds this documentation.
      
      Moreover, in kvmclock, we assumed that the host never adjusts its
      wall-clock time, which is not a good assumption because it prevents us
      from benefiting from NTP running on the host. As Avi Kivity explains:
      
         "For the wall clock, you need to sample the wall clock base every time,
          since it can be changed by the host."
      
      So this patch changes kvmclock::time() to sample the wall-clock-at-boot
      reported by the paravirtual clock, on every time() call, and not just once.
      
      The downsite of this patch is that clock::get::time(), and therefore
      nanotime(), become a bit slower on kvmclock, as they need to sample
      the wall_clock_boot() every time, require a couple of barriers and
      arithmetic operations. But note that we shouldn't even be using the
      non-monotonic clock::get::time() for our timers - we should be using the
      monotonic clock::get::uptime() - and when we switch to using that we'll
      get back the bit of performance lost in this patch.
      
      Signed-off-by: default avatarNadav Har'El <nyh@cloudius-systems.com>
      Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
      ae65b676
  9. Jan 10, 2014
  10. Jan 07, 2014
    • Nadav Har'El's avatar
      Exile spinlock to a separate file · 8fcad509
      Nadav Har'El authored
      
      In very early OSv history, the spinlock was used in the mutex's
      implementation so it made sense to put it in mutex.cc and mutex.h.
      
      But now that the spinlock is all that's left in mutex.cc (the real mutex
      is in lfmutex.cc), rename this file spinlock.cc. Also, move the spinlock
      definitions from <osv/mutex.h> to a new <osv/spinlock.h>, so if someone
      wants to make the grave mistake of using a spinlock - they will at least
      need to explicitly include this header file.
      
      Currently, the only remaining user of the spinlock is the console.
      Using a spinlock (and not a mutex) in the console allows printing debug
      messages while preemption is disabled. Arguably, this use-case is no
      longer important (we have tracepoints), so in the future we can consider
      dropping the spinlock completely.
      
      Signed-off-by: default avatarNadav Har'El <nyh@cloudius-systems.com>
      Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
      8fcad509
Loading