> The seqlock for tb_jmp_cache is necessary the moment that the > array can be wiped out with a memset(), as shown above. That > function (tb_flush_jmp_cache) is called by tlb_flush_page, > which has many callers. > > One could argue that we could enforce calling tlb_flush_page to be > a) always done by the owner thread or b) done while all others CPUs > are paused. > > I argue that worrying about that is not worth it; let's protect > the array with a seqlock, which on TSO is essentially free, and > worry about more important things.
Got it, this makes sense. Paolo > Wrt the next two patches: > > Patch 27 is an improvement in that each TB has its own valid flag, > which makes sense because this should only affect TB's that are > trying to chain to/from it, not all TBs. > > Patch 28 uses the RCU QLIST which to me seems cleaner and less > error-prone than open-coding an RCU LIST. > > Thanks, > > Emilio >