2022-06-03 19:15:11 +00:00
|
|
|
/* SPDX-License-Identifier: BSD-3-Clause
|
2020-09-03 20:58:58 +00:00
|
|
|
* Copyright (c) Intel Corporation.
|
|
|
|
* All rights reserved.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "spdk/stdinc.h"
|
|
|
|
#include "spdk/likely.h"
|
|
|
|
#include "spdk/event.h"
|
|
|
|
#include "spdk/log.h"
|
|
|
|
#include "spdk/env.h"
|
2021-08-06 09:17:16 +00:00
|
|
|
#include "spdk/scheduler.h"
|
2020-09-03 20:58:58 +00:00
|
|
|
|
|
|
|
#include "spdk_internal/event.h"
|
|
|
|
|
2021-07-15 13:21:24 +00:00
|
|
|
static int
|
|
|
|
init_static(void)
|
|
|
|
{
|
2021-09-14 08:38:24 +00:00
|
|
|
/* There is no scheduling perfomed by static scheduler,
|
|
|
|
* do not set the scheduling period. */
|
|
|
|
spdk_scheduler_set_period(0);
|
2021-07-15 13:21:24 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
deinit_static(void)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2021-07-20 08:53:36 +00:00
|
|
|
balance_static(struct spdk_scheduler_core_info *cores, uint32_t core_count)
|
2021-07-15 13:21:24 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2022-02-07 12:11:34 +00:00
|
|
|
static int
|
|
|
|
set_opts_static(const struct spdk_json_val *opts)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
get_opts_static(struct spdk_json_write_ctx *ctx)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2020-09-03 20:58:58 +00:00
|
|
|
static struct spdk_scheduler scheduler = {
|
|
|
|
.name = "static",
|
2021-07-15 13:21:24 +00:00
|
|
|
.init = init_static,
|
|
|
|
.deinit = deinit_static,
|
|
|
|
.balance = balance_static,
|
2022-02-07 12:11:34 +00:00
|
|
|
.set_opts = set_opts_static,
|
|
|
|
.get_opts = get_opts_static,
|
2020-09-03 20:58:58 +00:00
|
|
|
};
|
2021-01-13 14:04:52 +00:00
|
|
|
SPDK_SCHEDULER_REGISTER(scheduler);
|