hv: sched_iorr: Add IO sensitive Round-robin scheduler

IO sensitive Round-robin scheduler aim to schedule threads with
round-robin policy. Meanwhile, we also enhance it with some fairness
configuration, such as thread will be scheduled out without properly
timeslice. IO request on thread will be handled in high priority.

This patch only add a skeleton for the sched_iorr scheduler.

Tracked-On: #4178
Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com>
Signed-off-by: Yu Wang <yu1.wang@intel.com>
Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Shuo A Liu
2019-06-20 11:10:53 +08:00
committed by wenlingz
parent 3c8d465a11
commit ed4008630d
4 changed files with 64 additions and 0 deletions

View File

@@ -7,6 +7,8 @@
#ifndef SCHEDULE_H
#define SCHEDULE_H
#include <spinlock.h>
#include <list.h>
#include <timer.h>
#define NEED_RESCHEDULE (1U)
@@ -77,11 +79,17 @@ struct acrn_scheduler {
void (*deinit)(struct sched_control *ctl);
};
extern struct acrn_scheduler sched_noop;
extern struct acrn_scheduler sched_iorr;
struct sched_noop_control {
struct thread_object *noop_thread_obj;
};
struct sched_iorr_control {
struct list_head runqueue;
struct hv_timer tick_timer;
};
bool is_idle_thread(const struct thread_object *obj);
uint16_t sched_get_pcpuid(const struct thread_object *obj);
struct thread_object *sched_get_current(uint16_t pcpu_id);