Skip to content

2个orchestration 在申请ring buffer时, 多个ring buffer之间必须保序 #269

@teddyxlj

Description

@teddyxlj

当有2个orchestration同时申请task slot和heap时,2个ringbuffer是如何保序的。如果申请的时候分配成如下这样:
其中0-3是orch0,分配到的,4-5是orch1分配到的。
那么当执行advance_ring_pointer回收ring buffer时last_task_alive 从2->3, tail从1->2会不会导致 heap的4/5被错误的回收了?

ring buffer都是按照task顺序来回收的。必须保证分配的时候多个bufer之间保序。

      last_task_alive 
                  last_task_alive		  
                │     │                                
                ▼     ▼                                
 ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐             
 │CONS    │CONS    │CONS   │ PEND   │PEND    │PEND    │PEND    │             
 └─────┴─────┴─────┴─────┴─────┴─────┴─────┘             
    0                  1             2             3              4*                5*

           tail                   tail               
            │                       │                     
            ▼                       ▼                     
 ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐             
 │0            │1           │2           │ 4*         │ 5*         │2           │3           │             
 └─────┴─────┴─────┴─────┴─────┴─────┴─────┘             

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions