![]() This invalidates the value of ncbsnz.Ĭhecks percpu_enqueue_lim, but sees that its value is already OĜPU 1 resumes execution and enqueues its callback onto its own No callback queued on any other CPU, and thus sets ncbsnz to zero. OĜPU 0 again invokes rcu_tasks_one_gp(), and counts fewer than So it declines to finalize the shrink operation. OĜPU 0 sees that ncbsnz is non-zero in its second "if" statement, It also getsĪ grace-period state value from get_state_synchronize_rcu(). It sets ->percpu_enqueue_lim to 1,īut CPU 1 has already read the old value of 42. It thereforeĬhecks percpu_enqueue_lim, and sees that its value is greater Of callbacks does not exceed rcu_task_collapse_lim. OĜPU 0 sees the rcu_task_cb_adjust is non-zero and that the number It therefore decides to enqueue itsĬallback onto CPU 1's callback list, but is delayed. OĜPU 1 invokes call_rcu_tasks_generic() and loads 42 from It sees at least oneĬallback queued on some other CPU, thus setting ncbsnz OĜPU 0 invokes rcu_tasks_one_gp(), and counts fewer than ![]() To see this, consider the following sequence of events: Would trigger the WARN_ON_ONCE() in the second "if" statement. Will queue a callback on a non-zero CPU after these CPUs have had theirĬallbacks counted and zero has been stored to ncbsnz. It is possible that a long-delayed call_rcu_tasks_generic() invocation Unfortunately, the current code assumes that a grace period whose end isĭetected by the poll_state_synchronize_rcu() in the second "if" conditionĪctually ended before the earlier code counted the callbacks queued onĬPUs other than CPU 0 (local variable "ncbsnz"). Rcu_tasks_need_gpcb() to wait for an RCU grace period to elapse beforeįinalizing the transition. This is currently handled by requiring call_rcu_tasks_generic() toĮnqueue callbacks under the protection of rcu_read_lock() and requiring Other CPU might be adding new callbacks, which might suddenly make this This third case is interesting because some To be invoked, and (3) It would be a good time to shrink back down to a ![]() ![]() The rcu_tasks_need_gpcb() determines whether or not: (1) There areĬallbacks needing another grace period, (2) There are callbacks ready
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |