Skip to content
Snippets Groups Projects
  1. Jan 27, 2014
  2. Jan 24, 2014
    • Glauber Costa's avatar
      balloon: fix the double move problem · 4eb7d9c2
      Glauber Costa authored
      
      As we have recently discovered, some parallel GCs will move an object to two
      different locations at times, and later on decide on which one to use. This
      breaks our implementation if the final object is the second one to be copied,
      because by then the original region is already mapped - so we won't fault, and
      the unmapped region will not be the actual balloon, so we will have a bogus
      fault
      
      The core of this solution is to keep all the regions unmapped. Because they had
      only garbage before, we know Java shouldn't read anything from it before it
      writes something new. And when it does that, we declare that to be no longer a
      balloon.
      
      Movement is then split in two phases: the normal phase, and the finish phase.
      In the finish phase we will remove the old VMA and create the new VMA again,
      with heap characteristics.
      
      Special care needs to be taken when "conciliating" the array: because we use
      the difference between first faulting address and original array address to
      calculate how many bytes we are skipping, we need to store that information
      somewhere. We're using an unordered_map (hash) for that. We'll keep track of
      all in-flight ballooned regions and hold the original address of the array.
      
      When we detect movement *from* that region, we know it is the new location
      and update the balloon object with the new address.
      
      Signed-off-by: default avatarGlauber Costa <glommer@cloudius-systems.com>
      Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
      4eb7d9c2
    • Glauber Costa's avatar
      balloon: store flags from original vma when ballooning · 95c644dc
      Glauber Costa authored
      
      To avoid using hard code values for the original anonymous vma that mapped the
      region before we ballooned, let's store the original flags in the JVM vma. This
      patch does not yet use it, but only lays down the infrastructure. User will
      come in the next patch.
      
      Signed-off-by: default avatarGlauber Costa <glommer@cloudius-systems.com>
      Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
      95c644dc
    • Glauber Costa's avatar
      mmu: give the jvm balloon write permissions · 54b1d4dc
      Glauber Costa authored
      
      Up until now the JVM balloon explicitly forbade writes to its range, because
      we didn't expect the JVM to ever write to it. But with the recently problem
      Gleb discovered of double-copying of objects inside the Heap, we will use
      writes to figure out when that object is no longer a balloon. But still,
      we need to be able to go back to the JVM specific fault handler for that.
      
      Therefore, we need write permissions in the VMA itself.
      
      Signed-off-by: default avatarGlauber Costa <glommer@cloudius-systems.com>
      [ penberg: use perm_rw as suggested by gleb ]
      Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
      54b1d4dc
  3. Jan 23, 2014
  4. Jan 22, 2014
  5. Jan 21, 2014
    • Dmitry Fleytman's avatar
      DHCP: Repeat DHCP discovery on timeout · d241a2c0
      Dmitry Fleytman authored
      
      It is a bad practice to have DHCP discovery without timeout
      and retries. In case discovery packet gets lost boot stucks.
      
      Beside this there is an interesting phenomena on some systems.
      A few first DHCP discovery packets sent on boot get lost in some cases.
      
      This started to happen from time to time on my KVM system and almost
      every time on my Xen system after installing recent Fedora Core updates.
      Packet leaves VM's interface but never arrives to bridge interface.
      The packet itself built properly and arrives to DHCP server just fine
      after a few retransmissions.
      
      Most probably this phenomena is a bug (or limitation) in the current
      Linux bridge version so this patch is actually a work-around, but
      since in general case it is a good idea to have DHCP timeouts/retries
      it worth to have it anyway.
      
      Signed-off-by: default avatarDmitry Fleytman <dmitry@daynix.com>
      Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
      d241a2c0
  6. Jan 20, 2014
  7. Jan 19, 2014
  8. Jan 17, 2014
    • Dmitry Fleytman's avatar
      DHCP: Support MTU option · 69bf74a7
      Dmitry Fleytman authored
      
      This patch introduces support for MTU option as described in
      RFC2132, chapter 5.1. Interface MTU Option
      
      Amazon EC2 networking uses this option in some cases and it gives
      throughput improvement of about 250% on big instances with 10G networking.
      
      Netperf results for hi1.4xlarge instances, TCP_MAERTS test, OSv runs netserver:
      
      Send buffer size     Throughput w/ patch (Mbps)     Throughput w/o patch (Mbps)     Improvement (%)
      
      32                   4912.29                        1386.28                         254
      64                   4832.01                        1385.99                         249
      128                  4835.09                        1401.46                         245
      256                  4746.41                        1382.28                         243
      512                  4849.04                        1375.23                         253
      1024                 4631.8                         1356.69                         241
      2048                 4859.59                        1371.92                         254
      4096                 4864.99                        1383.67                         252
      8192                 4627.07                        1364.05                         239
      16384                4868.73                        1366.48                         256
      32768                4822.69                        1366.63                         253
      65536                4837.67                        1353.87                         257
      
      Signed-off-by: default avatarDmitry Fleytman <dmitry@daynix.com>
      Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
      69bf74a7
    • Pekka Enberg's avatar
      mmu: procfs support · b01a5444
      Pekka Enberg authored
      
      Add procfs_maps() function to core/mmu.cc that returns all the VMAs
      formatted for Linux compatible "/proc/<pid>/maps" file.
      
      This will be called by the procfs filesystem.
      
      Limitations:
      
        * Shared mappings are not identified as such.
        * File-backed mmap offset, device, inode, and pathname are not
          reported.
        * Special region names such as [heap] and [stack] are not reported.
      
      Reviewed-by: default avatarGlauber Costa <glommer@cloudius-systems.com>
      Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
      b01a5444
  9. Jan 16, 2014
  10. Jan 15, 2014
    • Eduardo Piva's avatar
      debug: create circular buffer for silent mode · 63ff4d06
      Eduardo Piva authored
      
      Create a circular buffer that stored all debug messages accordingly.
      If the debug buffer is full, reuse it. A method called flush_debug_buffer
      is added to enable printing all messages to console if verbose mode is
      configured.
      
      The global variable debug_buffer_full is used to track if, when
      flushing debug buffer to console, we need to flush both buffer sides.
      
      If verbose boolean variable is set, all messages are printed to the
      console after beeing stored in the buffer.
      
      The size of the buffer is 50Kb, defined in debug.hh.
      
      A function debugf that received a variable list of arguments
      is defined so we can change some printf from boot sequence
      to debugf call. A different name is used to prevent C overload.
      
      Signed-off-by: default avatarEduardo Piva <efpiva@gmail.com>
      Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
      63ff4d06
  11. Jan 13, 2014
Loading