Skip to content
Snippets Groups Projects
  1. Mar 21, 2013
  2. Mar 19, 2013
  3. Mar 07, 2013
  4. Mar 06, 2013
  5. Mar 04, 2013
  6. Mar 03, 2013
    • Avi Kivity's avatar
      sched: preemption · 378e8aa1
      Avi Kivity authored
      Split the core scheduler into a function for calling from interrupts, and
      a wrapper for calling it from normal paths.  Call the preemptible path from
      interrupt handlers.
      378e8aa1
    • Avi Kivity's avatar
      arch: add irq_enabled() accessor · 96f25089
      Avi Kivity authored
      96f25089
    • Avi Kivity's avatar
      sched: per-thread exception stack · 21db6f2d
      Avi Kivity authored
      With preemption, we may switch threads in an interrupt.  This means we can
      no longer use a per-cpu exception stack, since every thread in the system
      can potentially be preempted.
      
      Switch to a per-thread exception stack instead.  This adds overhead to
      the context switch path, but it is negligible (a single memory write).
      21db6f2d
    • Avi Kivity's avatar
      sched: initialize thread::cpu() for the initial thread · 60923626
      Avi Kivity authored
      Currently it is uninitialized, which breaks things later on.
      60923626
  7. Mar 01, 2013
  8. Feb 28, 2013
  9. Feb 27, 2013
    • Avi Kivity's avatar
      sched: delete thread stack after use · 887081ac
      Avi Kivity authored
      We also make the deleter configurable so we can use munmap() or similar
      to destroy the stack of payload threads.
      887081ac
    • Avi Kivity's avatar
      sched: add idle thread · 4f725d4f
      Avi Kivity authored
      Previously, we performed idle processing in the scheduler, in the context
      of the thread that is being scheudled out.  This makes preemption more
      complicated, since every thread can potentially be in the idle loop
      simultaneously, having been preempted there some time in the past.  Obviously
      we can't disable interrupts in the idle loop.
      
      Move idle processing to its own thread to fix this problem.  This is currently
      sub-optimal since we don't have priority classes yet (or even just priorities),
      so the idle thread can be scheduled before workload threads.  If that happens
      it will examine the runqueue and yield if there's anything there.
      4f725d4f
  10. Feb 26, 2013
  11. Feb 24, 2013
  12. Feb 23, 2013
    • Avi Kivity's avatar
      sched: don't auto-start threads · f5c34d80
      Avi Kivity authored
      While easy to use, auto-starting threads generates problems when more
      complicated initialization takes place.
      
      Rather than making auto-start optional (as Guy suggested), remove it
      completely, to keep the API simple.
      
      Use thread::start() to start a thread.  Unstarted threads ignore wakeups
      until started.
      f5c34d80
  13. Feb 21, 2013
  14. Feb 19, 2013
  15. Feb 11, 2013
  16. Feb 07, 2013
  17. Feb 06, 2013
    • Avi Kivity's avatar
      sched: remote wakeups · 87d02164
      Avi Kivity authored
      Each cpu has a queue (actually an array of queues, one for each "waking" cpu)
      of threads that are to be woken.  A thread can be queued locklessly, so a
      runqueue lock is not needed.
      
      As we don't IPI yet, the queues are polled at strategic points.
      87d02164
    • Avi Kivity's avatar
      sched: implement thread::join() · 12875ed4
      Avi Kivity authored
      While generally useful, it helps now to avoid wakeups to threads that are
      no longer there.
      12875ed4
Loading