0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-07-04 17:48:35 +02:00

ircd::db: Deinline some env::state related.

This commit is contained in:
Jason Volk 2018-12-16 14:25:06 -08:00
parent e22162f505
commit a513ba9cf3
2 changed files with 18 additions and 11 deletions

View file

@ -24,17 +24,10 @@ struct ircd::db::database::env::state
rocksdb::Env::Priority::TOTAL
};
/// Track of background tasks.
std::array<std::deque<task>, POOLS> tasks;
static conf::item<size_t> pool_stack_size;
/// The background task pools.
std::array<ctx::pool, POOLS> pool
{{
// name of pool stack size initial workers
{ "rdb bott", 128_KiB, 0 },
{ "rdb low", 128_KiB, 0 },
{ "rdb high", 128_KiB, 0 },
}};
std::array<std::deque<task>, POOLS> tasks;
std::array<ctx::pool, POOLS> pool;
state(database *const &d);
~state() noexcept;

View file

@ -7353,12 +7353,26 @@ noexcept
// db/database/env/state.h
//
decltype(ircd::db::database::env::state::pool_stack_size)
ircd::db::database::env::state::pool_stack_size
{
{ "name", "ircd.db.env.pool.stack_size" },
{ "default", long(128_KiB) },
};
//
// env::state
// env::state::state
//
ircd::db::database::env::state::state(database *const &d)
:d{*d}
,pool
{{
// name of pool stack size initial workers
{ "rdb bott", size_t(pool_stack_size), 0 },
{ "rdb low", size_t(pool_stack_size), 0 },
{ "rdb high", size_t(pool_stack_size), 0 },
}}
{
}