mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-21 14:11:20 +00:00
rcu: Switch last accelerate/advance to rcu_data structure
This commit removes ->last_accelerate and ->last_advance_all from the rcu_dynticks structure and updates the code to access them from the rcu_data structure. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
This commit is contained in:
parent
0fd79e7521
commit
5998a75adb
2 changed files with 8 additions and 13 deletions
|
@ -49,10 +49,6 @@ struct rcu_dynticks {
|
||||||
/* # times non-lazy CBs posted to CPU. */
|
/* # times non-lazy CBs posted to CPU. */
|
||||||
unsigned long nonlazy_posted_snap;
|
unsigned long nonlazy_posted_snap;
|
||||||
/* idle-period nonlazy_posted snapshot. */
|
/* idle-period nonlazy_posted snapshot. */
|
||||||
unsigned long last_accelerate;
|
|
||||||
/* Last jiffy CBs were accelerated. */
|
|
||||||
unsigned long last_advance_all;
|
|
||||||
/* Last jiffy CBs were all advanced. */
|
|
||||||
#endif /* #ifdef CONFIG_RCU_FAST_NO_HZ */
|
#endif /* #ifdef CONFIG_RCU_FAST_NO_HZ */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1597,16 +1597,14 @@ module_param(rcu_idle_lazy_gp_delay, int, 0644);
|
||||||
static bool __maybe_unused rcu_try_advance_all_cbs(void)
|
static bool __maybe_unused rcu_try_advance_all_cbs(void)
|
||||||
{
|
{
|
||||||
bool cbs_ready = false;
|
bool cbs_ready = false;
|
||||||
struct rcu_data *rdp;
|
struct rcu_data *rdp = this_cpu_ptr(&rcu_data);
|
||||||
struct rcu_dynticks *rdtp = this_cpu_ptr(&rcu_dynticks);
|
|
||||||
struct rcu_node *rnp;
|
struct rcu_node *rnp;
|
||||||
|
|
||||||
/* Exit early if we advanced recently. */
|
/* Exit early if we advanced recently. */
|
||||||
if (jiffies == rdtp->last_advance_all)
|
if (jiffies == rdp->last_advance_all)
|
||||||
return false;
|
return false;
|
||||||
rdtp->last_advance_all = jiffies;
|
rdp->last_advance_all = jiffies;
|
||||||
|
|
||||||
rdp = this_cpu_ptr(&rcu_data);
|
|
||||||
rnp = rdp->mynode;
|
rnp = rdp->mynode;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1635,6 +1633,7 @@ static bool __maybe_unused rcu_try_advance_all_cbs(void)
|
||||||
*/
|
*/
|
||||||
int rcu_needs_cpu(u64 basemono, u64 *nextevt)
|
int rcu_needs_cpu(u64 basemono, u64 *nextevt)
|
||||||
{
|
{
|
||||||
|
struct rcu_data *rdp = this_cpu_ptr(&rcu_data);
|
||||||
struct rcu_dynticks *rdtp = this_cpu_ptr(&rcu_dynticks);
|
struct rcu_dynticks *rdtp = this_cpu_ptr(&rcu_dynticks);
|
||||||
unsigned long dj;
|
unsigned long dj;
|
||||||
|
|
||||||
|
@ -1655,7 +1654,7 @@ int rcu_needs_cpu(u64 basemono, u64 *nextevt)
|
||||||
invoke_rcu_core();
|
invoke_rcu_core();
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
rdtp->last_accelerate = jiffies;
|
rdp->last_accelerate = jiffies;
|
||||||
|
|
||||||
/* Request timer delay depending on laziness, and round. */
|
/* Request timer delay depending on laziness, and round. */
|
||||||
if (!rdtp->all_lazy) {
|
if (!rdtp->all_lazy) {
|
||||||
|
@ -1718,9 +1717,9 @@ static void rcu_prepare_for_idle(void)
|
||||||
* If we have not yet accelerated this jiffy, accelerate all
|
* If we have not yet accelerated this jiffy, accelerate all
|
||||||
* callbacks on this CPU.
|
* callbacks on this CPU.
|
||||||
*/
|
*/
|
||||||
if (rdtp->last_accelerate == jiffies)
|
if (rdp->last_accelerate == jiffies)
|
||||||
return;
|
return;
|
||||||
rdtp->last_accelerate = jiffies;
|
rdp->last_accelerate = jiffies;
|
||||||
if (rcu_segcblist_pend_cbs(&rdp->cblist)) {
|
if (rcu_segcblist_pend_cbs(&rdp->cblist)) {
|
||||||
rnp = rdp->mynode;
|
rnp = rdp->mynode;
|
||||||
raw_spin_lock_rcu_node(rnp); /* irqs already disabled. */
|
raw_spin_lock_rcu_node(rnp); /* irqs already disabled. */
|
||||||
|
@ -1769,7 +1768,7 @@ static void print_cpu_stall_fast_no_hz(char *cp, int cpu)
|
||||||
unsigned long nlpd = rdtp->nonlazy_posted - rdtp->nonlazy_posted_snap;
|
unsigned long nlpd = rdtp->nonlazy_posted - rdtp->nonlazy_posted_snap;
|
||||||
|
|
||||||
sprintf(cp, "last_accelerate: %04lx/%04lx, nonlazy_posted: %ld, %c%c",
|
sprintf(cp, "last_accelerate: %04lx/%04lx, nonlazy_posted: %ld, %c%c",
|
||||||
rdtp->last_accelerate & 0xffff, jiffies & 0xffff,
|
rdp->last_accelerate & 0xffff, jiffies & 0xffff,
|
||||||
ulong2long(nlpd),
|
ulong2long(nlpd),
|
||||||
rdtp->all_lazy ? 'L' : '.',
|
rdtp->all_lazy ? 'L' : '.',
|
||||||
rdp->tick_nohz_enabled_snap ? '.' : 'D');
|
rdp->tick_nohz_enabled_snap ? '.' : 'D');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue