Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for FFMA without hugepages and using only mmap #296

Merged
merged 32 commits into from
Apr 2, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
a70a5f7
Move hugepage_cache under memory_allocator and rename it ffma_page_ca…
danielealbano Apr 1, 2023
b8897fd
Split out ffma_thread_cache out of ffma
danielealbano Apr 1, 2023
1721e11
Fix mmap support, rename hugepage(s) in page(s)
danielealbano Apr 1, 2023
e3e2245
Fix ffma initialization
danielealbano Apr 1, 2023
71860d4
Fix test name
danielealbano Apr 1, 2023
b072274
Fix benchmarks
danielealbano Apr 1, 2023
fc9f23b
Fix symbol export
danielealbano Apr 1, 2023
469996c
Update ffma tests
danielealbano Apr 1, 2023
0f5c753
ffma is now always enabled, no need to check
danielealbano Apr 1, 2023
a57a786
Implement functions to generate a random aligned address and to try t…
danielealbano Apr 1, 2023
ff24aa2
Fix compilation warnings related to missing ffma.h
danielealbano Apr 1, 2023
b3bf876
Setup ffma at the start
danielealbano Apr 1, 2023
6065a2c
Ensure the thread cache is populated
danielealbano Apr 1, 2023
54f9cd2
Simplify the receiving logic and ensure that the receive buffer is la…
danielealbano Apr 1, 2023
5c25e54
Update the redis tests using the internal send_recv_resp_command_mult…
danielealbano Apr 1, 2023
233de81
Drop double option setting in mimalloc
danielealbano Apr 2, 2023
1b0cf08
Fix page warming up in bench-ffma
danielealbano Apr 2, 2023
6b04200
Fix build when mimalloc is disabled for debugging
danielealbano Apr 2, 2023
673e22d
Move ffma.c code into the header to allow static inlining
danielealbano Apr 2, 2023
555b0ee
Update tests to support the statically inlined code
danielealbano Apr 2, 2023
3fed5fb
Improve the debugging of the ffma page cache
danielealbano Apr 2, 2023
5c11136
Restore the check on the thread cache using ffma_thread_cache_has
danielealbano Apr 2, 2023
c9b472f
Now the maximum size of a single parameter can only be ~170MB so modi…
danielealbano Apr 2, 2023
6618425
Fix some allocations that were not converted to use xalloc in the has…
danielealbano Apr 2, 2023
804b30c
Disable hugepages, not required for the ffma tests anymore
danielealbano Apr 2, 2023
180bb73
Reduce tests verbosity
danielealbano Apr 2, 2023
2556a5b
Re-enable the hugepages but require only 20, needed for some other tests
danielealbano Apr 2, 2023
65f49f0
General cleanup & tests improvements
danielealbano Apr 2, 2023
8b477d6
Ensure that the generic page cache is freed before the tests and then…
danielealbano Apr 2, 2023
0f0a8ae
Add verbosity in case of test failure as the failures are spurious
danielealbano Apr 2, 2023
a287740
Ensure the page cache is freed and then re-initialized before and aft…
danielealbano Apr 2, 2023
1584935
Fix the spurious PTTL test
danielealbano Apr 2, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
General cleanup & tests improvements
  • Loading branch information
danielealbano committed Apr 2, 2023
commit 65f49f069ff51afda492c7772c32ef039529e8a0
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ TEST_CASE("hashtable/hashtable_mcmp_op_delete.c", "[hashtable][hashtable_op][has
hashtable,
test_key_1,
test_key_1_len,
NULL));
nullptr));
})
}

Expand All @@ -73,7 +73,7 @@ TEST_CASE("hashtable/hashtable_mcmp_op_delete.c", "[hashtable][hashtable_op][has
test_key_1_alloc,
test_key_1_len,
test_value_1,
NULL));
nullptr));

REQUIRE(half_hashes_chunk->half_hashes[chunk_slot_index].quarter_hash == test_key_1_hash_quarter);
REQUIRE(key_value->flags != HASHTABLE_KEY_VALUE_FLAG_DELETED);
Expand All @@ -82,7 +82,7 @@ TEST_CASE("hashtable/hashtable_mcmp_op_delete.c", "[hashtable][hashtable_op][has
hashtable,
test_key_1,
test_key_1_len,
NULL));
nullptr));

REQUIRE(half_hashes_chunk->half_hashes[chunk_slot_index].slot_id == 0);
REQUIRE(key_value->flags == HASHTABLE_KEY_VALUE_FLAG_DELETED);
Expand Down Expand Up @@ -110,7 +110,7 @@ TEST_CASE("hashtable/hashtable_mcmp_op_delete.c", "[hashtable][hashtable_op][has
test_key_1_alloc,
test_key_1_len,
test_value_1,
NULL));
nullptr));

REQUIRE(half_hashes_chunk->half_hashes[chunk_slot_index].quarter_hash == test_key_1_hash_quarter);
REQUIRE(key_value->flags != HASHTABLE_KEY_VALUE_FLAG_DELETED);
Expand Down Expand Up @@ -147,7 +147,7 @@ TEST_CASE("hashtable/hashtable_mcmp_op_delete.c", "[hashtable][hashtable_op][has
test_key_1_alloc,
test_key_1_len,
test_value_1,
NULL));
nullptr));

REQUIRE(half_hashes_chunk->half_hashes[chunk_slot_index].quarter_hash == test_key_1_hash_quarter);
REQUIRE(key_value->flags != HASHTABLE_KEY_VALUE_FLAG_DELETED);
Expand All @@ -156,7 +156,7 @@ TEST_CASE("hashtable/hashtable_mcmp_op_delete.c", "[hashtable][hashtable_op][has
hashtable,
test_key_1,
test_key_1_len,
NULL));
nullptr));

REQUIRE(half_hashes_chunk->half_hashes[chunk_slot_index].slot_id == 0);
REQUIRE(key_value->flags == HASHTABLE_KEY_VALUE_FLAG_DELETED);
Expand All @@ -169,7 +169,7 @@ TEST_CASE("hashtable/hashtable_mcmp_op_delete.c", "[hashtable][hashtable_op][has
test_key_1_alloc,
test_key_1_len,
test_value_1,
NULL));
nullptr));

REQUIRE(half_hashes_chunk->half_hashes[chunk_slot_index].filled == true);
REQUIRE(half_hashes_chunk->half_hashes[chunk_slot_index].distance == 0);
Expand All @@ -180,7 +180,7 @@ TEST_CASE("hashtable/hashtable_mcmp_op_delete.c", "[hashtable][hashtable_op][has
hashtable,
test_key_1,
test_key_1_len,
NULL));
nullptr));

REQUIRE(half_hashes_chunk->half_hashes[chunk_slot_index].slot_id == 0);
REQUIRE(key_value->flags == HASHTABLE_KEY_VALUE_FLAG_DELETED);
Expand All @@ -204,7 +204,7 @@ TEST_CASE("hashtable/hashtable_mcmp_op_delete.c", "[hashtable][hashtable_op][has
test_key_same_bucket_alloc,
test_key_same_bucket[i].key_len,
test_value_1 + i,
NULL));
nullptr));
}

hashtable_chunk_slot_index_t random_slot_index = random_generate() % slots_to_fill;
Expand All @@ -213,7 +213,7 @@ TEST_CASE("hashtable/hashtable_mcmp_op_delete.c", "[hashtable][hashtable_op][has
hashtable,
test_key_same_bucket[random_slot_index].key,
test_key_same_bucket[random_slot_index].key_len,
NULL));
nullptr));

hashtable_chunk_index_t chunk_index_base =
HASHTABLE_TO_CHUNK_INDEX(hashtable_mcmp_support_index_from_hash(
Expand Down Expand Up @@ -250,7 +250,7 @@ TEST_CASE("hashtable/hashtable_mcmp_op_delete.c", "[hashtable][hashtable_op][has
test_key_same_bucket_alloc,
test_key_same_bucket[i].key_len,
test_value_1 + i,
NULL));
nullptr));
}

hashtable_chunk_slot_index_t random_slot_index = random_generate() % (slots_to_fill - 1);
Expand All @@ -259,7 +259,7 @@ TEST_CASE("hashtable/hashtable_mcmp_op_delete.c", "[hashtable][hashtable_op][has
hashtable,
test_key_same_bucket[random_slot_index].key,
test_key_same_bucket[random_slot_index].key_len,
NULL));
nullptr));

hashtable_chunk_index_t chunk_index_base =
HASHTABLE_TO_CHUNK_INDEX(hashtable_mcmp_support_index_from_hash(
Expand All @@ -282,7 +282,7 @@ TEST_CASE("hashtable/hashtable_mcmp_op_delete.c", "[hashtable][hashtable_op][has
test_key_same_bucket_alloc,
test_key_same_bucket[slots_to_fill - 1].key_len,
test_value_1 + slots_to_fill - 1,
NULL));
nullptr));

REQUIRE(half_hashes_chunk->half_hashes[random_slot_index].filled == true);
REQUIRE(half_hashes_chunk->half_hashes[random_slot_index].distance == 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@
#include "epoch_gc.h"
#include "epoch_gc_worker.h"

#include "../../../network/network_tests_support.h"

#include "program.h"

#include "test-modules-redis-command-fixture.hpp"
Expand All @@ -64,7 +66,7 @@ TestModulesRedisCommandFixture::TestModulesRedisCommandFixture() {

config_module_network_binding = {
.host = "127.0.0.1",
.port = 12345,
.port = network_tests_support_search_free_port_ipv4(),
};

config_module_redis = {
Expand Down Expand Up @@ -321,7 +323,6 @@ bool TestModulesRedisCommandFixture::send_recv_resp_command_multi_recv(

// Sets up the reader
this->c->reader = redisReaderCreate();
// this->c->reader->maxbuf = SIZE_MAX;

// Prepares the command and write it to the internal buffer
redisAppendCommandArgv(
Expand Down
1 change: 0 additions & 1 deletion tests/unit_tests/test-xalloc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,6 @@ TEST_CASE("xalloc.c", "[xalloc]") {
}

SECTION("invalid size") {
uintptr_t data = 0;
REQUIRE(xalloc_hugepage_alloc(0) == NULL);
}
}
Expand Down