On Thu, Jun 02, 2022 at 05:45:18AM +0000, Zhang, Qiang1 wrote: > > On Thu, Jun 02, 2022 at 02:06:50AM +0000, Zhang, Qiang1 wrote: > > Hi All > > > > Currently, I have tested as follows: > > > > runqemu kvm slirp nographic qemuparams="-m 2048 -smp 4" > > bootparams="isolcpus=2,3 nohz_full=2,3 rcu_nocbs=2,3 > > rcutree.dump_tree=1, rcu_nocb_poll" -d > > > > rcu: Offload RCU callbacks from CPUs: 2-3. > > rcu: Poll for callbacks from no-CBs CPUs. > > rcu: rcu_organize_nocb_kthreads: No-CB GP kthread CPU 0: 1 (rcuog/0) > > rcu: rcu_organize_nocb_kthreads: No-CB GP kthread CPU 2: 3 (rcuog/2) > > > > but I find the rt-fifo rcuog/0 kthreads always doing polling, but due > > to the my_rdp->nocb_head_rdp always is empty, this doesn't do the > > actual thing, Is it possible that we do not polling when the nocb_head_rdp linked list is empty, and polling when it is not empty. > > > > Any thought? > > >If I understand your question correctly, you would like to avoid polling when the rcuog kthread's CPU's rcu_data structure's nocb_head_rdp list is empty. This could happen only when all of the CPUs served by that rcuog kthread have been de-offloaded, correct? > > Yes, thanks Paul reply. I'll be more careful with my wording next time. 不是问题! 毕竟,情况可能会更糟。 我可能会尝试用中文或其他东西写作。 Et la langue dominante change avec le temps. Il n'y a pas si longtemps, c'était le français plutôt que l'anglais. En tant qu'anglophone natif, une partie de mon travail consiste à aider les locuteurs non natifs. Et qui sait? Peut-être qu'un jour la langue dominante sera le chinois. Yeah, Google Translate. Why do you ask? ;-) > >If so, this is not currently a user-visible issue, but it would be good to fix it before offloading and de-offloading becomes user-visible. > > > >If this is what you were thinking, what did you have in mind for a fix? > > When rcu_nocb_poll is set and the rcuog kthread's CPU's rcu_data structure's nocb_head_rdp list is empty, > treat rcuog kthread like non-polling mode and put them in the waitqueue(my_rdp->nocb_gp_wq) for waiting, > when nocb_head_rdp list is not empty(rcu_nocb_poll && !list_empty(nocb_head_rdp)), re-entering periodic wake-up mode. I need yours opinion. > > Any thought? This seems plausible to me! This code is tricky, so it may take a time or two to get it right, but what is life without a challenge? Thanx, Paul > Thanks > Zqiang > > > > >(We need to get Frederic's view in any case, of course.) > > > > Thanx, Paul