More cleanup

This commit is contained in:
2025-08-22 13:52:32 -04:00
parent 815e6c065a
commit ce7e596836
3 changed files with 3 additions and 6 deletions

View File

@@ -239,7 +239,6 @@ add_executable(load_tester tools/load_tester.cpp)
target_link_libraries(load_tester Threads::Threads llhttp_static perfetto) target_link_libraries(load_tester Threads::Threads llhttp_static perfetto)
add_test(NAME arena_allocator_tests COMMAND test_arena_allocator) add_test(NAME arena_allocator_tests COMMAND test_arena_allocator)
add_test(NAME connection_registry_tests COMMAND test_connection_registry)
add_test(NAME commit_request_tests COMMAND test_commit_request) add_test(NAME commit_request_tests COMMAND test_commit_request)
add_test(NAME http_handler_tests COMMAND test_http_handler) add_test(NAME http_handler_tests COMMAND test_http_handler)
add_test(NAME server_connection_return_tests add_test(NAME server_connection_return_tests

View File

@@ -48,7 +48,7 @@ template <class T> struct ThreadPipeline {
// Constructor // Constructor
// lgSlotCount: log2 of ring buffer size (e.g., 10 -> 1024 slots) // lgSlotCount: log2 of ring buffer size (e.g., 10 -> 1024 slots)
// threadsPerStage: number of threads for each stage (e.g., {1, 4, 2} = 1 // threadsPerStage: number of threads for each stage (e.g., {1, 4, 2} = 1
// producer, 4 stage-1 workers, 2 stage-2 workers) // stage-0 worker, 4 stage-1 workers, 2 stage-2 workers)
ThreadPipeline(int lgSlotCount, const std::vector<int> &threadsPerStage) ThreadPipeline(int lgSlotCount, const std::vector<int> &threadsPerStage)
: slotCount(1 << lgSlotCount), slotCountMask(slotCount - 1), : slotCount(1 << lgSlotCount), slotCountMask(slotCount - 1),
threadState(threadsPerStage.size()), ring(slotCount) { threadState(threadsPerStage.size()), ring(slotCount) {
@@ -228,9 +228,9 @@ private:
return safeLen; return safeLen;
} }
struct alignas(128) ThreadState { struct ThreadState {
// Where this thread has published up to // Where this thread has published up to
std::atomic<uint32_t> pops{0}; alignas(128) std::atomic<uint32_t> pops{0};
// Where this thread will publish to the next time it publishes // Where this thread will publish to the next time it publishes
uint32_t localPops{0}; uint32_t localPops{0};
// Where the previous stage's threads have published up to last we checked // Where the previous stage's threads have published up to last we checked

View File

@@ -5,8 +5,6 @@
#include <errno.h> #include <errno.h>
#include <limits.h> #include <limits.h>
// TODO fix up this whole thing
Connection::Connection(struct sockaddr_storage addr, int fd, int64_t id, Connection::Connection(struct sockaddr_storage addr, int fd, int64_t id,
size_t epoll_index, ConnectionHandler *handler, size_t epoll_index, ConnectionHandler *handler,
Server &server) Server &server)