[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Minios-devel] [UNIKRAFT PATCH 00/23] Preemptive Scheduling
This patch series introduces support for preemptive scheduling in Unikraft. New abstractions are introduced - hardware and paravirtualization contexts - extending the thread context abstraction specializations. A new internal library - ukschedpreempt - is our proposed preemptive scheduler implementation. This new scheduler implements the same interface as the one implemented by the cooperative scheduler. This series depends on 'plat/kvm: Fix current thread retrieval in interrupt context on x86_64' patch and 'Preepare for preemptive scheduling' series. Costin Lupu (23): plat/common: Introduce hardware context plat: Hardware context - Set exception stack when switching to a new thread plat: Hardware context - Use interrupt stack when handling interrupts plat: Hardware context - Add trampoline for starting threads plat: Hardware context - Yield thread to a previously yielding thread plat: Hardware context - Yield thread to a previously interrupted thread lib/uksched: Move stack_push() to arch plat/xen/x86/entry64.S: Add more comments for critical region fixup plat/xen: Introduce paravirtualization context plat/xen: Paravirtualization context - Save interrupted thread stack in PDA plat/xen: Paravirtualization context - Switch interrupted thread to a previously yielding thread plat/xen: Paravirtualization context - Yield thread to a previously interrupted thread plat: Call scheduler on timer interrupts lib/uksched: Add scheduling related private info on threads lib/ukschedpreempt: Introduce library skeleton lib/ukschedpreempt: Use hardware context for thread switching lib/ukschedpreempt: Use priority queue for ready threads lib/ukschedpreempt: Block threads lib/ukschedpreempt: Handle thread attributes (priority, time slice) lib/ukschedpreempt: Schedule threads lib/ukschedpreempt: Add idle thread lib/ukschedpreempt: Handle timer interrupts lib/uksched: Register preemptive scheduler to default init include/uk/arch/lcpu.h | 7 + include/uk/plat/thread.h | 5 +- include/uk/plat/time.h | 6 + lib/Config.uk | 5 + lib/Makefile.uk | 1 + lib/uksched/include/uk/thread.h | 4 +- lib/uksched/sched.c | 10 +- lib/uksched/thread.c | 18 +- lib/ukschedpreempt/Config.uk | 5 + lib/ukschedpreempt/Makefile.uk | 7 + lib/ukschedpreempt/exportsyms.uk | 1 + .../include/uk/preempt_thread_attr.h | 48 +++ lib/ukschedpreempt/include/uk/prioq.h | 90 ++++ lib/ukschedpreempt/include/uk/schedpreempt.h | 51 +++ lib/ukschedpreempt/prioq.c | 138 +++++++ lib/ukschedpreempt/schedpreempt.c | 385 ++++++++++++++++++ plat/common/include/_time.h | 5 + plat/common/include/hw_ctx.h | 53 +++ plat/common/include/x86/regs.h | 2 +- plat/common/include/x86/traps.h | 1 + plat/common/sw_ctx.c | 6 +- plat/common/thread.c | 25 +- plat/common/time.c | 77 ++++ plat/common/x86/hw_ctx.c | 130 ++++++ plat/common/x86/thread_start.S | 41 ++ plat/kvm/Makefile.uk | 2 + plat/kvm/include/kvm-x86/traps.h | 1 + plat/kvm/x86/cpu_vectors_x86_64.S | 24 ++ plat/kvm/x86/time.c | 6 + plat/kvm/x86/traps.c | 4 + plat/xen/Makefile.uk | 8 + plat/xen/include/xen-x86/pv_ctx.h | 53 +++ plat/xen/x86/arch_events.c | 9 +- plat/xen/x86/arch_time.c | 3 + plat/xen/x86/entry64.S | 64 ++- plat/xen/x86/pda.h | 57 +++ plat/xen/x86/pv_ctx.c | 149 +++++++ 37 files changed, 1459 insertions(+), 42 deletions(-) create mode 100644 lib/ukschedpreempt/Config.uk create mode 100644 lib/ukschedpreempt/Makefile.uk create mode 100644 lib/ukschedpreempt/exportsyms.uk create mode 100644 lib/ukschedpreempt/include/uk/preempt_thread_attr.h create mode 100644 lib/ukschedpreempt/include/uk/prioq.h create mode 100644 lib/ukschedpreempt/include/uk/schedpreempt.h create mode 100644 lib/ukschedpreempt/prioq.c create mode 100644 lib/ukschedpreempt/schedpreempt.c create mode 100644 plat/common/include/hw_ctx.h create mode 100644 plat/common/time.c create mode 100644 plat/common/x86/hw_ctx.c create mode 100644 plat/xen/include/xen-x86/pv_ctx.h create mode 100644 plat/xen/x86/pda.h create mode 100644 plat/xen/x86/pv_ctx.c -- 2.20.1 _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |