diff options
-rw-r--r-- | kernel/rcutree_plugin.h | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/kernel/rcutree_plugin.h b/kernel/rcutree_plugin.h index c0164441ab92..28185ad18df3 100644 --- a/kernel/rcutree_plugin.h +++ b/kernel/rcutree_plugin.h | |||
@@ -1617,6 +1617,15 @@ static void rcu_idle_count_callbacks_posted(void) | |||
1617 | #define RCU_IDLE_GP_DELAY 4 /* Roughly one grace period. */ | 1617 | #define RCU_IDLE_GP_DELAY 4 /* Roughly one grace period. */ |
1618 | #define RCU_IDLE_LAZY_GP_DELAY (6 * HZ) /* Roughly six seconds. */ | 1618 | #define RCU_IDLE_LAZY_GP_DELAY (6 * HZ) /* Roughly six seconds. */ |
1619 | 1619 | ||
1620 | static int rcu_idle_flushes = RCU_IDLE_FLUSHES; | ||
1621 | module_param(rcu_idle_flushes, int, 0644); | ||
1622 | static int rcu_idle_opt_flushes = RCU_IDLE_OPT_FLUSHES; | ||
1623 | module_param(rcu_idle_opt_flushes, int, 0644); | ||
1624 | static int rcu_idle_gp_delay = RCU_IDLE_GP_DELAY; | ||
1625 | module_param(rcu_idle_gp_delay, int, 0644); | ||
1626 | static int rcu_idle_lazy_gp_delay = RCU_IDLE_LAZY_GP_DELAY; | ||
1627 | module_param(rcu_idle_lazy_gp_delay, int, 0644); | ||
1628 | |||
1620 | extern int tick_nohz_enabled; | 1629 | extern int tick_nohz_enabled; |
1621 | 1630 | ||
1622 | /* | 1631 | /* |
@@ -1696,10 +1705,10 @@ int rcu_needs_cpu(int cpu, unsigned long *delta_jiffies) | |||
1696 | } | 1705 | } |
1697 | /* Set up for the possibility that RCU will post a timer. */ | 1706 | /* Set up for the possibility that RCU will post a timer. */ |
1698 | if (rcu_cpu_has_nonlazy_callbacks(cpu)) { | 1707 | if (rcu_cpu_has_nonlazy_callbacks(cpu)) { |
1699 | *delta_jiffies = round_up(RCU_IDLE_GP_DELAY + jiffies, | 1708 | *delta_jiffies = round_up(rcu_idle_gp_delay + jiffies, |
1700 | RCU_IDLE_GP_DELAY) - jiffies; | 1709 | rcu_idle_gp_delay) - jiffies; |
1701 | } else { | 1710 | } else { |
1702 | *delta_jiffies = jiffies + RCU_IDLE_LAZY_GP_DELAY; | 1711 | *delta_jiffies = jiffies + rcu_idle_lazy_gp_delay; |
1703 | *delta_jiffies = round_jiffies(*delta_jiffies) - jiffies; | 1712 | *delta_jiffies = round_jiffies(*delta_jiffies) - jiffies; |
1704 | } | 1713 | } |
1705 | return 0; | 1714 | return 0; |
@@ -1805,11 +1814,11 @@ static void rcu_prepare_for_idle(int cpu) | |||
1805 | if (rcu_cpu_has_nonlazy_callbacks(cpu)) { | 1814 | if (rcu_cpu_has_nonlazy_callbacks(cpu)) { |
1806 | trace_rcu_prep_idle("User dyntick with callbacks"); | 1815 | trace_rcu_prep_idle("User dyntick with callbacks"); |
1807 | rdtp->idle_gp_timer_expires = | 1816 | rdtp->idle_gp_timer_expires = |
1808 | round_up(jiffies + RCU_IDLE_GP_DELAY, | 1817 | round_up(jiffies + rcu_idle_gp_delay, |
1809 | RCU_IDLE_GP_DELAY); | 1818 | rcu_idle_gp_delay); |
1810 | } else if (rcu_cpu_has_callbacks(cpu)) { | 1819 | } else if (rcu_cpu_has_callbacks(cpu)) { |
1811 | rdtp->idle_gp_timer_expires = | 1820 | rdtp->idle_gp_timer_expires = |
1812 | round_jiffies(jiffies + RCU_IDLE_LAZY_GP_DELAY); | 1821 | round_jiffies(jiffies + rcu_idle_lazy_gp_delay); |
1813 | trace_rcu_prep_idle("User dyntick with lazy callbacks"); | 1822 | trace_rcu_prep_idle("User dyntick with lazy callbacks"); |
1814 | } else { | 1823 | } else { |
1815 | return; | 1824 | return; |
@@ -1861,8 +1870,8 @@ static void rcu_prepare_for_idle(int cpu) | |||
1861 | /* Check and update the ->dyntick_drain sequencing. */ | 1870 | /* Check and update the ->dyntick_drain sequencing. */ |
1862 | if (rdtp->dyntick_drain <= 0) { | 1871 | if (rdtp->dyntick_drain <= 0) { |
1863 | /* First time through, initialize the counter. */ | 1872 | /* First time through, initialize the counter. */ |
1864 | rdtp->dyntick_drain = RCU_IDLE_FLUSHES; | 1873 | rdtp->dyntick_drain = rcu_idle_flushes; |
1865 | } else if (rdtp->dyntick_drain <= RCU_IDLE_OPT_FLUSHES && | 1874 | } else if (rdtp->dyntick_drain <= rcu_idle_opt_flushes && |
1866 | !rcu_pending(cpu) && | 1875 | !rcu_pending(cpu) && |
1867 | !local_softirq_pending()) { | 1876 | !local_softirq_pending()) { |
1868 | /* Can we go dyntick-idle despite still having callbacks? */ | 1877 | /* Can we go dyntick-idle despite still having callbacks? */ |
@@ -1871,11 +1880,11 @@ static void rcu_prepare_for_idle(int cpu) | |||
1871 | if (rcu_cpu_has_nonlazy_callbacks(cpu)) { | 1880 | if (rcu_cpu_has_nonlazy_callbacks(cpu)) { |
1872 | trace_rcu_prep_idle("Dyntick with callbacks"); | 1881 | trace_rcu_prep_idle("Dyntick with callbacks"); |
1873 | rdtp->idle_gp_timer_expires = | 1882 | rdtp->idle_gp_timer_expires = |
1874 | round_up(jiffies + RCU_IDLE_GP_DELAY, | 1883 | round_up(jiffies + rcu_idle_gp_delay, |
1875 | RCU_IDLE_GP_DELAY); | 1884 | rcu_idle_gp_delay); |
1876 | } else { | 1885 | } else { |
1877 | rdtp->idle_gp_timer_expires = | 1886 | rdtp->idle_gp_timer_expires = |
1878 | round_jiffies(jiffies + RCU_IDLE_LAZY_GP_DELAY); | 1887 | round_jiffies(jiffies + rcu_idle_lazy_gp_delay); |
1879 | trace_rcu_prep_idle("Dyntick with lazy callbacks"); | 1888 | trace_rcu_prep_idle("Dyntick with lazy callbacks"); |
1880 | } | 1889 | } |
1881 | tp = &rdtp->idle_gp_timer; | 1890 | tp = &rdtp->idle_gp_timer; |