Commit Graph

53948 Commits

Author SHA1 Message Date
Asias He
b38dae4a2b gossip: Dump failure detector info 2015-04-20 15:49:27 +08:00
Asias He
7e0a0c381f gossip: Remove debug print message 2015-04-20 15:49:27 +08:00
Paweł Dziepak
5ffd057fd1 memory: use allocate_large_aligned() if alignment is more than a page
small_pools, which are responsible for allocations up to 16kB, aren't able
to provide a buffer with alignment stricter than a page. This results
in aligned allocations being broken for buffers in the range 4kB - 16kB.
This patch make sure that if the alignment requirement is too big for
small_pool to handle allocate_large_aligned() is used instead.

Fixes #36.

Signed-off-by: Paweł Dziepak <pdziepak@quarnos.org>
2015-04-20 10:32:43 +03:00
Paweł Dziepak
5d65f045f5 temporary_buffer: use posix_memalign() return value
The proper way to test whether posix_memalign() failed is to check its
return value, not the content of the pointer.

This also silences "ignoring return value of 'posix_memalign()'" diagnostic
messages.

Signed-off-by: Paweł Dziepak <pdziepak@quarnos.org>
Reviewed-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
2015-04-20 10:32:11 +03:00
Avi Kivity
8702fb1d13 Merge branch 'gleb/snitch' of github.com:cloudius-systems/seastar-dev into db
Some Snitch and StorageService related conversions, from Gleb.
2015-04-20 09:44:38 +03:00
Gleb Natapov
d75ccb0047 the very beginning of StorageService conversion 2015-04-20 09:18:23 +03:00
Gleb Natapov
d13422773d copy StorageSrvice.java over 2015-04-20 09:18:23 +03:00
Gleb Natapov
c39af6dda0 gossip: store regular pointer to subscribers instead of shared one
Some subscribers are allocated statically, so it is a churn to make
shared pointers from them. And since registered subscribers have to be
unregister before been destroyed anyway there is no lifetime issue here
that require use of a smart pointer.
2015-04-20 09:18:23 +03:00
Vlad Zolotarov
ea7bdc65c0 tcp: properly calculate the payload length for TSO decision
Fixes issue #41

Packet doesn't have neither L2 nor L3 headers in the tcp::output_one(),
therefore comparing p.len() to MSS + L2_HDR + L3_HDR + L4_HDR when
payload size is greater than (MSS - L2_HDR - L3_HDR) gives the wrong
negative decision in regard to whether to send this frame as an TSO frame.

Fix the above by comparing the MSS to actual payload size.

Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
Reviewed-by: Asias He <asias@cloudius-systems.com>
2015-04-20 08:46:36 +03:00
Vlad Zolotarov
b0321a98ae DPDK: Set default_txconf.txq_flags according to port HW capabilities
Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
2015-04-19 20:17:10 +03:00
Vlad Zolotarov
14d36b8b40 DPDK: Check if changing of HW FC is supported by device and don't halt if not.
Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
2015-04-19 20:14:14 +03:00
Avi Kivity
1942737331 Merge branch 'osv'
Fixes for OSv, from Takuya.
2015-04-19 10:48:40 +03:00
Takuya ASADA
d41de86d3b dpdk: skip hw flow control when OSv, since virtio PMD doesn't supported hw flow control functions
This is not really HAVE_OSV but virtio-net, may need to change 'if (nic == virtio)' later, if we want to support virtio-net on Linux/SR-IOV on OSv.

Signed-off-by: Takuya ASADA <syuu@cloudius-systems.com>
2015-04-19 10:33:40 +03:00
Takuya ASADA
1aa1529545 dpdk: Add ETH_TXQ_FLAGS_NOOFFLOADS when HAVE_OSV, since virtio PMD requires the flag
This is not really HAVE_OSV but virtio-net, may need to change 'if (nic == virtio)' later, if we want to support virtio-net on Linux/SR-IOV on OSv.

Signed-off-by: Takuya ASADA <syuu@cloudius-systems.com>
2015-04-19 10:33:39 +03:00
Takuya ASADA
6975eeac30 reactor: implement timer for OSv, since OSv does not support timer_create/timer_settime
OSv does not supported timer_create/timer_settime and thread based signal handling.
This patch implements timer function using OSv native timer and timer handler thread witch pinned to the CPU same as reactor thread.

Signed-off-by: Takuya ASADA <syuu@cloudius-systems.com>
2015-04-19 10:33:39 +03:00
Takuya ASADA
db93ae84db dpdk: Use --no-shconf on OSv
DPDK does not work without --no-shconf on OSv, we need to add it.

Signed-off-by: Takuya ASADA <syuu@cloudius-systems.com>
2015-04-19 10:33:38 +03:00
Takuya ASADA
83189367b6 temporary_buffer: Use posix_memalign instead of memalign, since OSv does not have memalign
Required for OSv to prevent missing symbol.

Signed-off-by: Takuya ASADA <syuu@cloudius-systems.com>
2015-04-19 10:33:37 +03:00
Takuya ASADA
991b77863d Use namespace on timer_set to prevent conflict with OSv's timer_set
Since we have same header on OSv too, we need to prevent conflict.

Signed-off-by: Takuya ASADA <syuu@cloudius-systems.com>
2015-04-19 10:33:36 +03:00
Takuya ASADA
826a8b446f configure.py: do not show Entering/Leaving directory on DPDK cflags detector
When configure.py called inside Makefile, dpdk_cflags() mistakenly extract "Entering directory" message. This patch prevent the problem.

Signed-off-by: Takuya ASADA <syuu@cloudius-systems.com>
2015-04-19 10:33:35 +03:00
Takuya ASADA
2c23c5430a configure.py: use combined library on OSv with DPDK
OSv does not able to load separated shared libraries, we need to use combined library.

Signed-off-by: Takuya ASADA <syuu@cloudius-systems.com>
2015-04-19 10:33:34 +03:00
Takuya ASADA
516286a820 configure.py: Add include patch for OSv
This is required to include osv/sched.hh.

Signed-off-by: Takuya ASADA <syuu@cloudius-systems.com>
2015-04-19 10:33:34 +03:00
Takuya ASADA
00049ea9c7 Fix compile errors with OSv
Signed-off-by: Takuya ASADA <syuu@cloudius-systems.com>
2015-04-19 10:33:32 +03:00
Gleb Natapov
02fb270fbe token operator<< 2015-04-19 10:15:14 +03:00
Raphael S. Carvalho
fdf50ef643 sstables: add initial support to compression
Starting with LZ4, the default compressor.
Stub functions were added to other compression algorithms, which should
eventually be replaced with an actual implementation.

Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
Reviewed-by: Nadav Har'El <nyh@cloudius-systems.com>
2015-04-19 10:07:29 +03:00
Tomasz Grabiec
8d6b93d787 query: Document intention behind query results format 2015-04-19 10:07:02 +03:00
Avi Kivity
d691e4d1ff Merge branch 'tgrabiec/cleanups' of github.com:cloudius-systems/seastar-dev into db
Remove obsolete files and fix code which used them, from Tomasz.
2015-04-19 09:53:49 +03:00
Tomasz Grabiec
9309a2ee6f Remove obselete files 2015-04-17 15:08:06 +02:00
Tomasz Grabiec
979b671adf cql3: Fix abstract_marker::raw::prepare()
It was using the wrong version of "collection_type(_impl)?" class.
2015-04-17 15:08:06 +02:00
Tomasz Grabiec
744d75e7f8 db: Move max_ttl from db/expiring_cell.hh to gc_clock.hh 2015-04-17 15:08:06 +02:00
Tomasz Grabiec
d87fbe9eb8 cql3: Fix references to obsolete collection types
The code was using the wrong version of list_type_impl and
collection_type_impl.
2015-04-17 15:08:06 +02:00
Tomasz Grabiec
5693f73b7a db: Implement generate_legacy_id() properly 2015-04-17 14:22:29 +02:00
Tomasz Grabiec
af6cafd993 tests: Add test for name-based UUID generation 2015-04-17 14:22:29 +02:00
Tomasz Grabiec
957544f69b utils: UUID_gen: Add support for name-based UUIDs (type 3) 2015-04-17 14:19:07 +02:00
Tomasz Grabiec
b79d2008c0 utils: UUID_gen: Fix comment about get_UUID()
UUID can hold not only type 1 UUIDs, but any UUID.
2015-04-17 14:19:07 +02:00
Avi Kivity
1aaa8c2f13 tests: fix cql_query_test tuple_test using a data_type on multiple cores
Pointed out by Tomek.
2015-04-16 18:39:43 +03:00
Avi Kivity
2c8b3a8e22 Merge branch 'tgrabiec/tuple_type_iterator' of github.com:cloudius-systems/urchin into db
Iterators for composites, from Tomasz.
2015-04-16 17:52:38 +03:00
Avi Kivity
edaf43f36a Merge branch 'asias/gossip_v1' of github.com:cloudius-systems/seastar-dev into db
Gossip now actually talks among nodes, from Asias.
2015-04-16 17:00:24 +03:00
Vlad Zolotarov
934c6ace46 DPDK: Add Ethernet HW Flow Control feature
Add an option to enable/disable sending and respecting PAUSE frames as defined in
802.3x and 802.3z specifications. We will configure the Link level PAUSEs
(as opposed to PFC).

In simple words Ethernel Flow Control relies on sending/receiving PAUSE (XOFF) MAC frames that
indicate the sender that receiver's buffer is almost full. The idea is to avoid receive buffer overflow. When
receiver's buffer is being freed it will send XON frame to indicate to the sender that it may
transmit again.

   - Added DPDK-specific command option to toggle the feature.
   - Sending PAUSEs is enabled by default.

Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
2015-04-16 16:58:16 +03:00
Tomasz Grabiec
bacede04b2 types: Expose component iterators in tuple_wrapper
This automatically exposes them in partition_key and clustering_key too.

The iterators return bytes_view to components.

For example:

  schema s;
  partition_key k;

  for (bytes_view component : boost::make_iterator_range(key.begin(s), key.end(s))) {
     // ...
  }
2015-04-16 14:04:04 +02:00
Tomasz Grabiec
5ef11d113a types: Improve code readability 2015-04-16 14:04:04 +02:00
Tomasz Grabiec
4c418ddef8 types: Use enum rather than bool in tuple_type template parameter
The 'bool' type doesn't hold any meaning on its own, which makes the
template instantiation sites not very readable:

  tuple_type<true>

To improve that, we can introduce an enum class which is meaningful in
every context:

  tuple_type<allow_prefixes::yes>
2015-04-16 14:57:21 +03:00
Asias He
6a2eed05fd tests: Gossip around node load info
$ ./gossip --seed 127.0.0.1  --listen-address 127.0.0.1
$ ./gossip --seed 127.0.0.1  --listen-address 127.0.0.2
$ ./gossip --seed 127.0.0.1  --listen-address 127.0.0.3

After a few seconds, all the 3 nodes will know each other's load info
by gossip.

----------- endpoint_state_map dump beg -----------
ep=127.0.0.1, eps=EndpointState: HeartBeatState = generation = 1, version = 0, AppStateMap =  { 1 : Value(0.5,1) }
ep=127.0.0.2, eps=EndpointState: HeartBeatState = generation = 1, version = 0, AppStateMap =  { 1 : Value(0.5,1) }
ep=127.0.0.3, eps=EndpointState: HeartBeatState = generation = 1, version = 0, AppStateMap =  { 1 : Value(0.5,1) }
----------- endpoint_state_map dump end -----------
2015-04-16 17:44:20 +08:00
Asias He
02f8c9d965 gossip: Add dump_endpoint_state_map for debug 2015-04-16 17:44:20 +08:00
Asias He
4abee75c04 gossip: Drop fail guard in mark_alive and apply_state_locally 2015-04-16 17:44:20 +08:00
Asias He
4cffb5513d gossip: Drop unnecessary FIXME 2015-04-16 17:44:20 +08:00
Asias He
7f98644742 gossip: Fix send_gossip
Insert when local_ep_state_ptr is engaged not otherwise.
2015-04-16 17:08:19 +08:00
Asias He
eeafdf5815 gossip: Make gms::versioned_value::load static
We are supposed to call it without an instance.
We will convert other similar functions in follow up patches.
2015-04-16 17:03:46 +08:00
Asias He
d661827045 gossip: Fix get_broadcast_address
It is default to listen_address.
2015-04-16 17:01:52 +08:00
Asias He
adff3b9c79 gossip: Drop redundant print in heart_beat_state 2015-04-16 16:59:53 +08:00
Tomasz Grabiec
3bb23c5aff types: Convert tuple_type to use uint16_t for length component
Origin is using CompositeType to serialize composite keys and that
type is using 16-bit integer to encode the length. If it's enough for
Origin, it's enough for us.
2015-04-16 11:49:26 +03:00