aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched/core.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2016-05-09 15:59:24 -0400
committerDavid S. Miller <davem@davemloft.net>2016-05-09 15:59:24 -0400
commite800072c18f0d7b89a80fa46dceb3d080c80e09c (patch)
tree8da6cb7944762a60ec37594720c1ad2757631c2f /kernel/sched/core.c
parente8ed77dfa90dd79c5343415a4bbbfdab9787b35a (diff)
parentb507146bb6b9ac0c0197100ba3e299825a21fed3 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
In netdevice.h we removed the structure in net-next that is being changes in 'net'. In macsec.c and rtnetlink.c we have overlaps between fixes in 'net' and the u64 attribute changes in 'net-next'. The mlx5 conflicts have to do with vxlan support dependencies. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'kernel/sched/core.c')
-rw-r--r--kernel/sched/core.c29
1 files changed, 16 insertions, 13 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 8b489fcac37b..d1f7149f8704 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -596,17 +596,8 @@ bool sched_can_stop_tick(struct rq *rq)
596 return false; 596 return false;
597 597
598 /* 598 /*
599 * FIFO realtime policy runs the highest priority task (after DEADLINE). 599 * If there are more than one RR tasks, we need the tick to effect the
600 * Other runnable tasks are of a lower priority. The scheduler tick 600 * actual RR behaviour.
601 * isn't needed.
602 */
603 fifo_nr_running = rq->rt.rt_nr_running - rq->rt.rr_nr_running;
604 if (fifo_nr_running)
605 return true;
606
607 /*
608 * Round-robin realtime tasks time slice with other tasks at the same
609 * realtime priority.
610 */ 601 */
611 if (rq->rt.rr_nr_running) { 602 if (rq->rt.rr_nr_running) {
612 if (rq->rt.rr_nr_running == 1) 603 if (rq->rt.rr_nr_running == 1)
@@ -615,8 +606,20 @@ bool sched_can_stop_tick(struct rq *rq)
615 return false; 606 return false;
616 } 607 }
617 608
618 /* Normal multitasking need periodic preemption checks */ 609 /*
619 if (rq->cfs.nr_running > 1) 610 * If there's no RR tasks, but FIFO tasks, we can skip the tick, no
611 * forced preemption between FIFO tasks.
612 */
613 fifo_nr_running = rq->rt.rt_nr_running - rq->rt.rr_nr_running;
614 if (fifo_nr_running)
615 return true;
616
617 /*
618 * If there are no DL,RR/FIFO tasks, there must only be CFS tasks left;
619 * if there's more than one we need the tick for involuntary
620 * preemption.
621 */
622 if (rq->nr_running > 1)
620 return false; 623 return false;
621 624
622 return true; 625 return true;