Previously we allocated `sizeof(struct ring) + size`. This patch
allocates `sizeof(struct ring)` and then `size` for the payload
separately. Hopefully the payload will be better aligned.
Signed-off-by: David Scott <dave.scott@docker.com>
This patch adds a simple ring buffer implementation and uses it to buffer
the reads and writes to/from the AF_HYPERV socket and tap file descriptor.
This removes the need to perform small reads and writes for the per-packet
headers and allows a read on the Hyper-V socket to block at the same time
as a write to the tap device (and vice-versa)
The configuration in the init.d script is:
- a max message size (individual read or write) of 8192. Experimentally
this seems to be the largest completely reliable size across the Windows
versions we can support. Messages of length 16384 sometimes fail.
- a buffer size of 256KiB in each direction.
Single stream TCP throughput as measured by iperf increases modestly, by
another 100Mbit/sec.
Signed-off-by: David Scott <dave.scott@docker.com>
These never got an interface on any platform, and I don't think they
ever will, we can increase global limits or you can set something
with a privileged container. Can add back later if required.
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Use a bind mount for OSX and Windows for 9p filesystem.
This makes it easier to use a different database source,
and to share database into system containers.
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
In most places we use the Alpine one, which is already here, but
make sure this is updated, as we may use it more (yes, we should be
consistent).
Change the hash to just use the ca-cert hash, not the apt hash.
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Static qemu-user is now available in Alpine edge. Includes the
patch for Golang crashing due to non standard signal usage.
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
As it includes timestanps in the tarball it does not make a stable
hash; use contents of the files instead.
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Simplifies the build process, and makes testing easier as there is a
Docker container you can run to test things.
Replaces #994
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
C version of #1006
Note that I switched all the C builds to use -O2 and that meant
that the compiler found some more warnings so I also fixed these
up. The possibly undefined ones were harmless, the aliasing one
is now more correct.
As these are small programs, the caching from `docker build` makes
no real difference, and worst case compile time is much better.
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Makes updates simpler.
Makes it explicit that `perf` currently requires Alpine 3.4, and update kernel version.
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Now there is an Alpine 3.5 variant of the Go 1.7 images, use this.
fix#972
Note updated the containers/binfmt image as this will be converted
to go-compile shortly, at which point alpine-build-go can be removed.
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
As `grep` echoes the output, no need to have `set -x` on this script,
make output smaller and cleaner.
Signed-off-by: Justin Cormack <justin.cormack@docker.com>