rcutorture.c (622be33fcbc93e9b672b99ed338369eb5e843ac3) | rcutorture.c (4babd855fd6137f9792117eb73b096c221a49d3c) |
---|---|
1/* 2 * Read-Copy Update module-based torture test facility 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation; either version 2 of the License, or 7 * (at your option) any later version. 8 * --- 1773 unchanged lines hidden (view full) --- 1782 barrier_cbs_tasks = NULL; 1783 } 1784 if (barrier_cbs_wq != NULL) { 1785 kfree(barrier_cbs_wq); 1786 barrier_cbs_wq = NULL; 1787 } 1788} 1789 | 1/* 2 * Read-Copy Update module-based torture test facility 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation; either version 2 of the License, or 7 * (at your option) any later version. 8 * --- 1773 unchanged lines hidden (view full) --- 1782 barrier_cbs_tasks = NULL; 1783 } 1784 if (barrier_cbs_wq != NULL) { 1785 kfree(barrier_cbs_wq); 1786 barrier_cbs_wq = NULL; 1787 } 1788} 1789 |
1790static bool rcu_torture_can_boost(void) 1791{ 1792 static int boost_warn_once; 1793 int prio; 1794 1795 if (!(test_boost == 1 && cur_ops->can_boost) && test_boost != 2) 1796 return false; 1797 1798 prio = rcu_get_gp_kthreads_prio(); 1799 if (!prio) 1800 return false; 1801 1802 if (prio < 2) { 1803 if (boost_warn_once == 1) 1804 return false; 1805 1806 pr_alert("%s: WARN: RCU kthread priority too low to test boosting. " 1807 "Skipping RCU boost test. Try passing rcutree.kthread_prio > 1 " 1808 "on the kernel command line.\n", KBUILD_MODNAME); 1809 boost_warn_once = 1; 1810 return false; 1811 } 1812 1813 return true; 1814} 1815 |
|
1790static enum cpuhp_state rcutor_hp; 1791 1792static void 1793rcu_torture_cleanup(void) 1794{ 1795 int flags = 0; 1796 unsigned long gp_seq = 0; 1797 int i; --- 28 unchanged lines hidden (view full) --- 1826 rcutorture_get_gp_data(cur_ops->ttype, &flags, &gp_seq); 1827 srcutorture_get_gp_data(cur_ops->ttype, srcu_ctlp, &flags, &gp_seq); 1828 pr_alert("%s: End-test grace-period state: g%lu f%#x\n", 1829 cur_ops->name, gp_seq, flags); 1830 torture_stop_kthread(rcu_torture_stats, stats_task); 1831 torture_stop_kthread(rcu_torture_fqs, fqs_task); 1832 for (i = 0; i < ncbflooders; i++) 1833 torture_stop_kthread(rcu_torture_cbflood, cbflood_task[i]); | 1816static enum cpuhp_state rcutor_hp; 1817 1818static void 1819rcu_torture_cleanup(void) 1820{ 1821 int flags = 0; 1822 unsigned long gp_seq = 0; 1823 int i; --- 28 unchanged lines hidden (view full) --- 1852 rcutorture_get_gp_data(cur_ops->ttype, &flags, &gp_seq); 1853 srcutorture_get_gp_data(cur_ops->ttype, srcu_ctlp, &flags, &gp_seq); 1854 pr_alert("%s: End-test grace-period state: g%lu f%#x\n", 1855 cur_ops->name, gp_seq, flags); 1856 torture_stop_kthread(rcu_torture_stats, stats_task); 1857 torture_stop_kthread(rcu_torture_fqs, fqs_task); 1858 for (i = 0; i < ncbflooders; i++) 1859 torture_stop_kthread(rcu_torture_cbflood, cbflood_task[i]); |
1834 if ((test_boost == 1 && cur_ops->can_boost) || 1835 test_boost == 2) | 1860 if (rcu_torture_can_boost()) |
1836 cpuhp_remove_state(rcutor_hp); 1837 1838 /* 1839 * Wait for all RCU callbacks to fire, then do flavor-specific 1840 * cleanup operations. 1841 */ 1842 if (cur_ops->cb_barrier != NULL) 1843 cur_ops->cb_barrier(); --- 207 unchanged lines hidden (view full) --- 2051 fqs_task); 2052 if (firsterr) 2053 goto unwind; 2054 } 2055 if (test_boost_interval < 1) 2056 test_boost_interval = 1; 2057 if (test_boost_duration < 2) 2058 test_boost_duration = 2; | 1861 cpuhp_remove_state(rcutor_hp); 1862 1863 /* 1864 * Wait for all RCU callbacks to fire, then do flavor-specific 1865 * cleanup operations. 1866 */ 1867 if (cur_ops->cb_barrier != NULL) 1868 cur_ops->cb_barrier(); --- 207 unchanged lines hidden (view full) --- 2076 fqs_task); 2077 if (firsterr) 2078 goto unwind; 2079 } 2080 if (test_boost_interval < 1) 2081 test_boost_interval = 1; 2082 if (test_boost_duration < 2) 2083 test_boost_duration = 2; |
2059 if ((test_boost == 1 && cur_ops->can_boost) || 2060 test_boost == 2) { | 2084 if (rcu_torture_can_boost()) { |
2061 2062 boost_starttime = jiffies + test_boost_interval * HZ; 2063 2064 firsterr = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN, "RCU_TORTURE", 2065 rcutorture_booster_init, 2066 rcutorture_booster_cleanup); 2067 if (firsterr < 0) 2068 goto unwind; --- 45 unchanged lines hidden --- | 2085 2086 boost_starttime = jiffies + test_boost_interval * HZ; 2087 2088 firsterr = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN, "RCU_TORTURE", 2089 rcutorture_booster_init, 2090 rcutorture_booster_cleanup); 2091 if (firsterr < 0) 2092 goto unwind; --- 45 unchanged lines hidden --- |