Use restartable sequences to implement a 64-bit counter

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Won't Do
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Internal Code
    • None
    • Service Arch
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The counter (i.e. Counter) will point to a contiguous region of memory containing all of its partitions. It will use rseq to implement increment operations:

      • The start (restart) code will use the following to index the array of counters and compute the address for the partition that needs to be updated:
        • The identifier of the logical core running the update. This is used to index a lookup table that comes before the counter storage. The following figure is an illustration of the memory layout for an object with 7 counters (yellow boxes) running on a 4 core system.
        • The (zero-based) offset assigned to the counter.
      • The commit code will perform the requested update (increment or decrement) on the address computed in the previous stage.

      It also provides a read API that returns the aggregate of all partitions for the counter. This will be the building block to implement CounterHolder.

              Assignee:
              [DO NOT USE] Backlog - Service Architecture
              Reporter:
              Amirsaman Memaripour
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: