mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-23 09:47:44 +00:00
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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user