Skip to content
Snippets Groups Projects
  1. Feb 28, 2013
  2. 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
      Revert "mempool: use a mutex instead of a spinlock" · 6c60e80d
      Avi Kivity authored
      This reverts commit e917ab25.
      
      If we have an assert, it can break badly, as printf() inside the assert
      allocates.
      
      Will reinstate after adding emergency allocators.
      6c60e80d
    • Avi Kivity's avatar
      mempool: use a mutex instead of a spinlock · e917ab25
      Avi Kivity authored
      Mutexes are now allocation free and thus safe for use within the allocator.
      e917ab25
    • Avi Kivity's avatar
      mutex: take spinlocks out-of-line · c4642da0
      Avi Kivity authored
      We need to make them a little more complicated.
      c4642da0
    • 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
  3. Feb 26, 2013
  4. Feb 25, 2013
    • Avi Kivity's avatar
      mutex: allow recusrive locking · ec1d09c0
      Avi Kivity authored
      prex code depends on this.
      
      TODO: make it optional
      ec1d09c0
    • Avi Kivity's avatar
      mutex: remove _locked member · e74f5a0d
      Avi Kivity authored
      It just adds complexity, and doesn't reduce locking overhead, as we must
      take the spinlock anyway during unlock.
      
      Remove it, since it makes conversion to a recursive mutex (needed
      by fs/vfs/vfs_mount.c) more complicated.
      e74f5a0d
  5. 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
  6. Feb 21, 2013
  7. Feb 20, 2013
  8. Feb 19, 2013
  9. Feb 18, 2013
  10. Feb 17, 2013
    • Avi Kivity's avatar
      sched: optimize scanning the incoming_wakeups array · 3d4f7047
      Avi Kivity authored
      Protect the array with a cpu_set (bit set -> corresponding queue non-empty).
      This means we need to scan one word, instead of nr_cpus (plus of course all
      the cpus for which an incoming is waiting).
      3d4f7047
    • Avi Kivity's avatar
      sched: add an atomic cpu_set type · 434d0f47
      Avi Kivity authored
      Supporting up to 64 cpus for now.
      434d0f47
    • Avi Kivity's avatar
      elf: fix symbol resolution order to use load order · c1c1ec36
      Avi Kivity authored
      This fixes an issue where a symbol exists in multiple objects; when just
      one is loaded it is resolved to one of the modules, but after the second is
      loaded, it resolves to the second.  To the program this appears as if the
      address or contents of a static variable has changed.
      
      In our case this was triggered by both statically and dynamically linking
      a library.
      c1c1ec36
  11. Feb 14, 2013
    • Avi Kivity's avatar
      sched: atomic thread state · e8b34467
      Avi Kivity authored
      Currently, we have an atomic _waiting state for a thread, and additional
      non-atomic _on_runqueue and _terminated states.  This is problematic since
      a ->wake() racing with a ->stop_wait() can cause a thread to be
      simultaneously running and queued.
      
      Fix by using a single atomic variable for all theses states.
      e8b34467
    • Avi Kivity's avatar
      sched: migrate timers · c87706a3
      Avi Kivity authored
      When we migrate a thread, remove its timers from the cpu-local timer list,
      and move them back when we complete migration.
      c87706a3
  12. Feb 13, 2013
  13. Feb 12, 2013
  14. Feb 11, 2013
Loading