Skip to content
Snippets Groups Projects
  1. Feb 19, 2013
  2. Feb 18, 2013
  3. 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
  4. 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
  5. Feb 13, 2013
  6. Feb 12, 2013
  7. Feb 11, 2013
    • Christoph Hellwig's avatar
    • Avi Kivity's avatar
      sched: load balance threads on cpus · f3566622
      Avi Kivity authored
      At present, a trivial algorithm is used: wake up once in a while, look for
      a less-loaded cpu, and push a waiting thread from this cpu to the other cpu.
      
      This is very simple wrt. locking, since the waiting thread is guaranteed not
      to be running, and to be on the runqueue of the load balancer thread.
      f3566622
    • Avi Kivity's avatar
      sched: explicity request the runqueue to have constant-time size · 7ea7eecf
      Avi Kivity authored
      While it is the default, we'll rely heavily on constant time size
      to compute the load (from remote processors, too).  Document it to
      avoid having someone "optimize" it away.
      7ea7eecf
    • Avi Kivity's avatar
      sched: add 'pinned' attribute to threads · ba95524c
      Avi Kivity authored
      ba95524c
    • Avi Kivity's avatar
      mutex: fairness · e967bb87
      Avi Kivity authored
      Without fairness, the concurrent alloc/free test fails quickly on smp, as
      the allocator thread hogs the allocator mutex and quickly exhausts all memory.
      While we could fix up the test to avoid this, fairness is a desirable quality,
      so implement it.
      
      We do so by adding and owner field, and having the unlocker transfer ownership
      of the locked mutex instead of freeing it and letting the waiter race with
      a newcomer.
      
      Also simplify the wait list to a singly linked list.  There was some
      corruption with the original implementation, and rather than fix it,
      simplify it to a singly linked list which is all that is needed.
      e967bb87
  8. Feb 07, 2013
  9. Feb 06, 2013
  10. Feb 05, 2013
Loading