[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Minios-devel] [UNIKRAFT PATCH 00/23] Preemptive Scheduling


  • To: minios-devel@xxxxxxxxxxxxx
  • From: Costin Lupu <costin.lupu@xxxxxxxxx>
  • Date: Mon, 8 Jul 2019 11:33:29 +0300
  • Cc: felipe.huici@xxxxxxxxx, simon.kuenzer@xxxxxxxxx
  • Delivery-date: Mon, 08 Jul 2019 08:50:15 +0000
  • Ironport-phdr: 9a23:YKr+Hx/Gwg150v9uRHKM819IXTAuvvDOBiVQ1KB31OscTK2v8tzYMVDF4r011RmVBN+dt6oP07aempujcFRI2YyGvnEGfc4EfD4+ouJSoTYdBtWYA1bwNv/gYn9yNs1DUFh44yPzahANS47xaFLIv3K98yMZFAnhOgppPOT1HZPZg9iq2+yo9JDffhtEiCCybL9uIxm6sQrcvdQKjIV/Lao81gHHqWZSdeRMwmNoK1OTnxLi6cq14ZVu7Sdete8/+sBZSan1cLg2QrJeDDQ9LmA6/9brugXZTQuO/XQTTGMbmQdVDgff7RH6WpDxsjbmtud4xSKXM9H6QawyVD+/6apgVR3mhzodNzMh8G/ZlNF+gqxYrhymvBFz35LYbZuJOPdkYq/RYdUXTndBUMZLUCxBB5uxYpUID+oaIeZYro/9rEYIoxujHQmsGf7kxzhUiX/xxq06z+UhEQfc0AwkAtIOqGnUoc7pO6cJS+y11LTIwi7ZY/NM3jfw8Y7FeQ0ir/GURb98bMXcxVQ1Gw7Gjlics5LpMy2X2+gXvWWX9/dsWO2yh2I9qAx8oiKjytkih4THnI4Z11/J+Tt/zY0oP9O3UlR7bsShEJZIsiGaMJZ5Td06TmFzvSY61qUGuZmmfCgW0JgnxwDQa/iAc4WQ/BLjUfyeITZ8hH5/ZL2/nAy+8VC9yuLnTMW0ylFKojJEktnKqH8NywTe5tWIR/dg5Eus2jaC2xrN5u1aI004j6TWJ4YkwrEql5oTtUrDHjXxmEXzlKKZakIk+vO06+TmZLXqvJucN5JsigHjKakhhte/Df4gMggTRGeX4/681Lr78U3jXLpKluE2krXesJ3CIMQbp6i5Aw5S0oY48hqwEimp0MoGknkDN19FfBOHj5P1O1HVOvz5Aumwg1K2nDds3fDGMaXrAo/RIXjbjLfhYbF95lZSyAUtydBf5opUBa8bLPLzR0/xtcDXDh4iPgyy3enoFNF92ZkFVm6VHKCZLbvYsUWU6eI3P+mMeIgVtS7mK/gk4v7uink5lUUefam0w5QXbnG5Eep8I0iCZ3rjnMsOEWMQsQUlVuDllkCCAnZvYCO3XqQ94Sp+BI+4AIPrQoG2nKfHzCq9WJpMaTNoEFeJRFzvbJmFXb8odTqPaptqlScYVL7nT5I5yDmlr0ni1rAhNO2CqX5Qjo7qyNUgv76brho17zEhV8k=
  • Ironport-sdr: AKRaI1Hfpt2cGo9dtkhGsBMG7oLNP0xt45IwN1LyIXHx6DAfQ1RTTfjBrgejYzvM+ctFo+wzP/ b/5YLLxB+mPg==
  • List-id: Mini-os development list <minios-devel.lists.xenproject.org>

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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.