mirror of
https://github.com/matrix-construct/construct
synced 2025-01-13 08:23:56 +01:00
ircd::ctx: Add nice/ionice values to pool opts; propagate on spawn.
This commit is contained in:
parent
78d300b3b7
commit
4ef3f6eab7
2 changed files with 12 additions and 0 deletions
|
@ -108,6 +108,12 @@ struct ircd::ctx::pool::opts
|
|||
/// are blocked from submitting (see: queue_max_blocking). This warning
|
||||
/// will still be seen for submissions outside any ircd::ctx.
|
||||
bool queue_max_dwarning {true};
|
||||
|
||||
/// IO priority nice value for contexts in this pool.
|
||||
int8_t ionice {0};
|
||||
|
||||
/// Scheduler priority nice value for contexts in this pool.
|
||||
int8_t nice {0};
|
||||
};
|
||||
|
||||
template<class F,
|
||||
|
|
|
@ -1515,7 +1515,13 @@ ircd::ctx::pool::add(const size_t &num)
|
|||
{
|
||||
assert(opt);
|
||||
for(size_t i(0); i < num; ++i)
|
||||
{
|
||||
ctxs.emplace_back(name, opt->stack_size, context::POST, std::bind(&pool::main, this));
|
||||
|
||||
assert(opt);
|
||||
ionice(ctxs.back(), opt->ionice);
|
||||
nice(ctxs.back(), opt->nice);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in a new issue