diff options
Diffstat (limited to 'kernel/rcutree.c')
-rw-r--r-- | kernel/rcutree.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/kernel/rcutree.c b/kernel/rcutree.c index 0da7b88d92d0..4b97bba7396e 100644 --- a/kernel/rcutree.c +++ b/kernel/rcutree.c | |||
@@ -201,6 +201,7 @@ void rcu_note_context_switch(int cpu) | |||
201 | { | 201 | { |
202 | trace_rcu_utilization("Start context switch"); | 202 | trace_rcu_utilization("Start context switch"); |
203 | rcu_sched_qs(cpu); | 203 | rcu_sched_qs(cpu); |
204 | rcu_preempt_note_context_switch(cpu); | ||
204 | trace_rcu_utilization("End context switch"); | 205 | trace_rcu_utilization("End context switch"); |
205 | } | 206 | } |
206 | EXPORT_SYMBOL_GPL(rcu_note_context_switch); | 207 | EXPORT_SYMBOL_GPL(rcu_note_context_switch); |
@@ -1397,6 +1398,8 @@ static void rcu_adopt_orphan_cbs(struct rcu_state *rsp) | |||
1397 | rdp->qlen_lazy += rsp->qlen_lazy; | 1398 | rdp->qlen_lazy += rsp->qlen_lazy; |
1398 | rdp->qlen += rsp->qlen; | 1399 | rdp->qlen += rsp->qlen; |
1399 | rdp->n_cbs_adopted += rsp->qlen; | 1400 | rdp->n_cbs_adopted += rsp->qlen; |
1401 | if (rsp->qlen_lazy != rsp->qlen) | ||
1402 | rcu_idle_count_callbacks_posted(); | ||
1400 | rsp->qlen_lazy = 0; | 1403 | rsp->qlen_lazy = 0; |
1401 | rsp->qlen = 0; | 1404 | rsp->qlen = 0; |
1402 | 1405 | ||
@@ -1528,7 +1531,7 @@ static void rcu_do_batch(struct rcu_state *rsp, struct rcu_data *rdp) | |||
1528 | { | 1531 | { |
1529 | unsigned long flags; | 1532 | unsigned long flags; |
1530 | struct rcu_head *next, *list, **tail; | 1533 | struct rcu_head *next, *list, **tail; |
1531 | int bl, count, count_lazy; | 1534 | int bl, count, count_lazy, i; |
1532 | 1535 | ||
1533 | /* If no callbacks are ready, just return.*/ | 1536 | /* If no callbacks are ready, just return.*/ |
1534 | if (!cpu_has_callbacks_ready_to_invoke(rdp)) { | 1537 | if (!cpu_has_callbacks_ready_to_invoke(rdp)) { |
@@ -1551,9 +1554,9 @@ static void rcu_do_batch(struct rcu_state *rsp, struct rcu_data *rdp) | |||
1551 | rdp->nxtlist = *rdp->nxttail[RCU_DONE_TAIL]; | 1554 | rdp->nxtlist = *rdp->nxttail[RCU_DONE_TAIL]; |
1552 | *rdp->nxttail[RCU_DONE_TAIL] = NULL; | 1555 | *rdp->nxttail[RCU_DONE_TAIL] = NULL; |
1553 | tail = rdp->nxttail[RCU_DONE_TAIL]; | 1556 | tail = rdp->nxttail[RCU_DONE_TAIL]; |
1554 | for (count = RCU_NEXT_SIZE - 1; count >= 0; count--) | 1557 | for (i = RCU_NEXT_SIZE - 1; i >= 0; i--) |
1555 | if (rdp->nxttail[count] == rdp->nxttail[RCU_DONE_TAIL]) | 1558 | if (rdp->nxttail[i] == rdp->nxttail[RCU_DONE_TAIL]) |
1556 | rdp->nxttail[count] = &rdp->nxtlist; | 1559 | rdp->nxttail[i] = &rdp->nxtlist; |
1557 | local_irq_restore(flags); | 1560 | local_irq_restore(flags); |
1558 | 1561 | ||
1559 | /* Invoke callbacks. */ | 1562 | /* Invoke callbacks. */ |
@@ -1581,9 +1584,9 @@ static void rcu_do_batch(struct rcu_state *rsp, struct rcu_data *rdp) | |||
1581 | if (list != NULL) { | 1584 | if (list != NULL) { |
1582 | *tail = rdp->nxtlist; | 1585 | *tail = rdp->nxtlist; |
1583 | rdp->nxtlist = list; | 1586 | rdp->nxtlist = list; |
1584 | for (count = 0; count < RCU_NEXT_SIZE; count++) | 1587 | for (i = 0; i < RCU_NEXT_SIZE; i++) |
1585 | if (&rdp->nxtlist == rdp->nxttail[count]) | 1588 | if (&rdp->nxtlist == rdp->nxttail[i]) |
1586 | rdp->nxttail[count] = tail; | 1589 | rdp->nxttail[i] = tail; |
1587 | else | 1590 | else |
1588 | break; | 1591 | break; |
1589 | } | 1592 | } |