Function rcu_dynticks_eqs_exit spent more cycles to processor
Quoted 5 lines · Corcodel Marian
Hi below , in modified func from
kernel/rcu/tree.cand not stall proc, run perf for more info.
Item typeatomic_tdynticks fromrcu_dynticksstucture can bee replaced with u8 type, because Intel guarrantee atomic operations to byte.
Eg,rtdp->dynticks= ~RCU_DYNTICK_CTRL_MASK;
I am not clear on exactly what change you are suggesting. But regardless, this is core code, so it must run on all CPUs that the Linux kernel supports, not just Intel x86. Furthermore, a straight store of ~RCU_DYNTICK_CTRL_MASK would be rather destructive in this function, if that is what you are getting at with your assignment statement above. So again, I am not clear on exactly what change you are suggesting, but whatever it is, it must build and run on all architectures.
Adding LKML on CC, develop in the open and all that.
Thanx, Paul
Quoted 17 lines
static void
rcu_dynticks_eqs_exit(void){ struct rcu_dynticks *rdtp = this_cpu_ptr(&rcu_dynticks); /* * CPUs seeing atomic_add_return() must see prior idle sojourns, * and we also must force ordering with the next RCU read-side * critical section. */ atomic_andnot(RCU_DYNTICK_CTRL_MASK, &rdtp->dynticks); smp_mb__after_atomic(); /* _exit after clearing mask. */ /* Prefer duplicate flushes to losing a flush. */ rcu_eqs_special_exit(); }