简体   繁体   中英

Cache, Branch predictor and TLB maintenance operations

About ARM DSB memory barrier instruction :

DSB -

Data Synchronization Barrier acts as a special kind of memory barrier. No instruction in program order after this instruction executes until this instruction completes.

Well understood, Next:

This instruction completes when:

All explicit memory accesses before this instruction complete.

All Cache, Branch predictor and TLB maintenance operations before this instruction complete.

Wait, what exactly is cache, branch predictor and TLB maintenance means? Does it means flushing? and does it means that the DSB instruction itself can trigger such flushing? and what else is considered as maintenance?

I think this is an issue of English grammar ambiguity. I think they mean

  • cache operation (all side-effects of loads/stores, or explicit flush / invalidate after an MMU operation)
  • branch predictor operation (eg globally enable/disable branch prediction)
  • TLB-maintenance operation (eg invalidate a TLB entry after changing a page table entry)

I don't think they're trying to describe branch-predictor operations as "maintenance", and the word "maintenance" is only supposed to go with "TLB" in that sentence.

(Some branch-predictor operations could maybe be described as maintenance, if ARM has added branch-predictor flush operations for Spectre mitigation, the way Intel has for their x86 CPUs with their recent microcode updates that added a new model-specific register. ( https://access.redhat.com/articles/3311301 ). But I don't think that's what their sentence is trying to say here.)

The key point to disambiguating this is to recognise that TLB maintenance is a significantly more common term than TLB operation . (by a factor of about 3 according to a simple search).

Where TLB operation is used alone, it seems to refer to either the process of operation, or to a specific identified activity. Where instructions are described as interacting with the TLB, these are described under the heading of TLB maintenance operations and this group forms a fairly large set. This set of instructions will generally not be described as just TLB operations , so your proposed parsing requires splitting a common (if not explicitly standard) term in the documentation.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM