mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
sched: Kick full dynticks CPU that have more than one task enqueued.
Kick the tick on full dynticks CPUs when they get more than one task running on their queue. This makes sure that local fairness is maintained by the tick on the destination. This is done regardless of these tasks' class. We should be able to be more clever in the future depending on these. eg: a CPU that runs a SCHED_FIFO task doesn't need to maintain fairness against local pending tasks of the fair class. But keep things simple for now. Signed-off-by: Frederic Weisbecker <[email protected]> Cc: Chris Metcalf <[email protected]> Cc: Christoph Lameter <[email protected]> Cc: Geoff Levand <[email protected]> Cc: Gilad Ben Yossef <[email protected]> Cc: Hakan Akkan <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Kevin Hilman <[email protected]> Cc: Li Zhong <[email protected]> Cc: Oleg Nesterov <[email protected]> Cc: Paul E. McKenney <[email protected]> Cc: Paul Gortmaker <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Steven Rostedt <[email protected]> Cc: Thomas Gleixner <[email protected]>
This commit is contained in:
parent
026249ef10
commit
9f3660c2c1
1 changed files with 11 additions and 0 deletions
|
|
@ -5,6 +5,7 @@
|
|||
#include <linux/mutex.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/stop_machine.h>
|
||||
#include <linux/tick.h>
|
||||
|
||||
#include "cpupri.h"
|
||||
|
||||
|
|
@ -1106,6 +1107,16 @@ static inline u64 steal_ticks(u64 steal)
|
|||
static inline void inc_nr_running(struct rq *rq)
|
||||
{
|
||||
rq->nr_running++;
|
||||
|
||||
#ifdef CONFIG_NO_HZ_FULL
|
||||
if (rq->nr_running == 2) {
|
||||
if (tick_nohz_full_cpu(rq->cpu)) {
|
||||
/* Order rq->nr_running write against the IPI */
|
||||
smp_wmb();
|
||||
smp_send_reschedule(rq->cpu);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline void dec_nr_running(struct rq *rq)
|
||||
|
|
|
|||
Loading…
Reference in a new issue