On Sat, Aug 13, 2022 at 09:47:44AM -0400, Elad Lahav wrote: > On 2022-08-11 21:08, Paul E. McKenney wrote: > > > 5.3.2: "references only per-thread variables, and should not incur any > > > cache misses" - except that the thread can migrate to other cores and > > > can thus incur cache misses. > > > > Perhaps adding "in the common case" to that sentence? Or did you have > > something else in mind? > > Pandora, meet can of worms (are mixed metaphors still frowned upon these > days?). > > Do you assume that in the common case threads tend to stick to the same > core? If so, that's an interesting discussion, as I have changed my mind on > the subject (or, rather, had the change forced on me) a few times. In the immortal words of practitioners of engineering since recorded history began, "It depends." But you can usually characterize some number of preemptions per unit time for a given workload, and my guess is that this is usually well in excess of a microsecond, which would mean that short pieces of code should not be preempted frequently. (Famous last words...) Thanx, Paul