Skip to content
Snippets Groups Projects
  1. Oct 14, 2013
  2. Oct 13, 2013
  3. Oct 10, 2013
  4. Oct 03, 2013
  5. Sep 26, 2013
  6. Sep 20, 2013
  7. Sep 17, 2013
  8. Sep 16, 2013
    • Dmitry Fleytman's avatar
    • Glauber Costa's avatar
      routing: provide a valid MTU in route messages · 295d80ff
      Glauber Costa authored
      Right now we send route messages with MTUs zeroed out. This can lead
      to the following assert in ip_output.c (~line 308) triggering:
      
          KASSERT(mtu > 0, ("%s: mtu %d <= 0, rte=%p (rt_flags=0x%08x) ifp=%p",
              __func__, mtu, rte, (rte != NULL) ? rte->rt_flags : 0, ifp));
      
      This happens because the code will assume that if there is a valid route, that
      route will have a valid MTU. And in this case, will always use the route MTU
      instead of the interface one.
      
      When we allocate the route it has a valid MTU. But when we send the route
      message, we will overwrite it with the value we see in the route message.  This
      is done in rtsock.c:rt_setmetrics.
      
      With this patch, those assertion stops happening.
      
      A note: this wasn't been seen in local instalations, only on EC2. Looking at
      it, there is nothing Xen specific. The reason it was not happening on local, is
      that local traffic does not go through the default route, but rather through
      the local 192.168.100.0/24 route. That one seems to take a different
      configuration path, and thus sets the MTU correctly.
      295d80ff
  9. Sep 15, 2013
    • Nadav Har'El's avatar
      Add copyright statements in bsd/ · fe9e6a82
      Nadav Har'El authored
      Added our copyright statements to some of the files in the top bsd/
      directory, and in bsd/porting.
      
      I only added our copyright to files which were completely by us - I did
      not attempt to hunt which bsd or solaris files we modified to add our
      copyright to them, I don't think this is important (or, we can do this
      later).
      
      I also found one header file (uma_stub.h) that had large chunks copied from
      freebsd, so I added both the freebsd copyright and ours.
      fe9e6a82
    • Glauber Costa's avatar
      trivial: small fixes to blkfront · 21285383
      Glauber Costa authored
      * %lu => %u when reading flush. The barrier flag had the same bug, but I
      ended up recreating it for flush.
      * Move check of xb_flags to after we check sc->flags != NULL, as spotted by
      Dima
      21285383
  10. Sep 14, 2013
    • Glauber Costa's avatar
      xenfront: guest-side implementation of flush · 6842d8ce
      Glauber Costa authored
      Not all Xen versions implement the barrier feature in their pv disks. Such is
      the case in Amazon EC2. For those, we should interpret the flush request and
      wait for the requests until they are all handled. Also, we can still try to use
      one of either barriers or flush-disk operations before we resort to guest-side
      software implementation. Our driver currently only tests for one of them, so
      this patch also implements flush requests.
      
      Luckily, the implementation of xb_dump (which we don't currently use) needs to
      do that as well, and this is also quite well isolated in xb_quiesce(). All we need
      to do is call xb_quiesce() if flushing is not available in our backend
      6842d8ce
    • Glauber Costa's avatar
      Do not overwrite the buffer on writes. · 0e62d585
      Glauber Costa authored
      Even Lords make brown paper bag mistakes. This is a left over code from my
      initial testing, where the buffer where set with pre existing values to make
      sure they were going through.  I forgot to remove them. As a result reads were
      fine, but writes would just wipe the previous data from the buffer.
      Incidentally, the "write-then-read-the-data-back" test I was doing would also
      obviously pass, so I haven't noticed this so far.
      
      Fix is to just leave the buffer alone.
      0e62d585
    • Nadav Har'El's avatar
      Change "hz" to fix poll() premature timeout · 26a30376
      Nadav Har'El authored
      msleep() measure times in units of 1/hz seconds. We had hz = 1,000,000,
      which gives excellent resolution (microsecond) but a terible range
      (limits msleep()'s timeout to 35 minutes).
      
      We had a program (Cassandra) doing poll() with a timeout of 2 hours,
      which caused msleep to think we gave a negative timeout.
      
      This patch reduces hz to 1,000, i.e., have msleep() operate in the same units
      as poll(). Looking at the code, I don't believe this change will have any
      ill-effects - we don't need higher resolution (freebsd code is used to
      hz=1,000, which is the default there), and the code converts time units to
      hz's correctly, always using the hz macro. The allowed range for timeouts will
      grow to over 24 days - and match poll()'s allowed range.
      26a30376
Loading