Skip to content
  • Con Kolivas's avatar
    [PATCH] sched: run SCHED_NORMAL tasks with real time tasks on SMT siblings · fc38ed75
    Con Kolivas authored
    
    
    The hyperthread aware nice handling currently puts to sleep any non real
    time task when a real time task is running on its sibling cpu.  This can
    lead to prolonged starvation by having the non real time task pegged to the
    cpu with load balancing not pulling that task away.
    
    Currently we force lower priority hyperthread tasks to run a percentage of
    time difference based on timeslice differences which is meaningless when
    comparing real time tasks to SCHED_NORMAL tasks.  We can allow non real
    time tasks to run with real time tasks on the sibling up to per_cpu_gain%
    if we use jiffies as a counter.
    
    Cleanups and micro-optimisations to the relevant code section should make
    it more understandable as well.
    
    Signed-off-by: default avatarCon Kolivas <kernel@kolivas.org>
    Acked-by: default avatarIngo Molnar <mingo@elte.hu>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    fc38ed75