Asynchronous test cases can be delared using SEASTAR_TEST_CASE macro,
which is equivalent to BOOST_AUTO_TEST_CASE, but the function body is
run inside a reactor and can returns a future<> which resolves when
the test is done.
cpu_pages::initialize() established the one-past-the-end page as a sentinel
to avoid boundary conditions checks. cpu_pages::do_resize() considers the
last page as the sentinel. This discrepancy causes the last page to be
considered free by do_resize, which promptly ends up as a use-after-free
page.
Fix by aligning do_resize() with initialize().
ioctl and fallocate are being used for TRIMMING effect on block and regular
files, respectively.
This feature is useful for SSDs, where write amplification can be reduced,
and drive life increased. Unlike HDD, SSD has to be explicitly notified of
blocks no longer used.
The interface consists of passing the range to the function, through offset
and length parameters.
Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
Intended to allow different file classes to implement their own
file operations; currently supporting regular and block device
files. This support would also be required for a native file
system, for example.
Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
Due to popular demand, this patch adds README-OSv, containing detailed
instructions on how to run Seastar inside OSv.
Because Seastar is moving at a fast pace, and uses new "exotic" Linux
features almost every day, please make sure that you use the latest
master of OSv, otherwise you are very likely to be missing features that
Seastar needs. At the time of this writing, you'll even need to apply a
few uncommited OSv patches (those which add thread pinning support), but
hopefully these patches will be committed today and the OSv master will
go back to enough for the Seastar master.
To clarify (though this is also mentioned in the README-OSv itself),
Seastar can only run in OSv with the "posix" network stack. The
"native" network stack does not work yet, because we haven't completed
a mechanism to assign virtio (or xen) from OSv directly to Seastar.
This is in the works.
Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
Before:
$ curl http://192.168.66.123:20000
The client will keep sending SYN packet and hangs.
After:
$ curl http://192.168.66.123:20000
curl: (7) Failed connect to 192.168.66.123:20000; Connection refused
Linux and OS X do the same.
[avi: drop connection_refused declaration]
It improves memaslap score of UDP memcache by 30%.
Note that for recvmsg we always speculate because in case of UDP we
don't know the exact sizeof the datagram and thus we always specify
larger size in msghdr.
virtio_net_device::txq::post allocates temporary vector each time it
calls vring::post() since later expects to get vector as a parameter.
Change vring::post() to get two iterators instead and remove needless
vector allocation.
For mmaps over a file descriptor, it makes sense to have the operation as a
method of file_desc.
Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
Unfortunately, we have two new non-obvious prerequisites: numactl and hwloc.
List them in README.md.
Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
NOTE: This patch makes pollable_fd::get_file_desc public in order to
access it in posix_server_socket_impl::accept(). Maybe there is a better
solution. But, fow now, this avoids a lot of including game.