The documentation for sfence says:
Performs a serializing operation on all store-to-memory instructions that were issued prior the SFENCE instruction.
What does "serializing operation" mean?
Does it mean make sure all store-to-memory instructions that were issued prior to the sfence instruction are completed before continuing executing the instructions after sfence?
sfencemakes sure that all prior stores in program order become globally visible before any later stores in program order become globally visible. There are two differences compared to what you've written. First,sfencedoes not serialize issued prior stores; it serializes all prior stores irrespective of whether they have been issued or not. Second, it serializes with respect to only all later stores; not all later instructions. That's what is meant by "serializing operation" within the context ofsfence.You've quoted only the first sentence from the documentation, but every sentence matters.