• P
    sched/fair: Rewrite cfs_rq->removed_*avg · 2a2f5d4e
    Peter Zijlstra 提交于
    Since on wakeup migration we don't hold the rq->lock for the old CPU
    we cannot update its state. Instead we add the removed 'load' to an
    atomic variable and have the next update on that CPU collect and
    process it.
    
    Currently we have 2 atomic variables; which already have the issue
    that they can be read out-of-sync. Also, two atomic ops on a single
    cacheline is already more expensive than an uncontended lock.
    
    Since we want to add more, convert the thing over to an explicit
    cacheline with a lock in.
    Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: NIngo Molnar <mingo@kernel.org>
    2a2f5d4e
sched.h 54.1 KB