[asterisk-bugs] [JIRA] (ASTERISK-26450) core: Change linked list to other list type

Joshua Colp (JIRA) noreply at issues.asterisk.org
Sun Oct 9 19:43:01 CDT 2016


     [ https://issues.asterisk.org/jira/browse/ASTERISK-26450?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joshua Colp updated ASTERISK-26450:
-----------------------------------

    Assignee: Badalian Vyacheslav  (was: Unassigned)
      Status: Waiting for Feedback  (was: Triage)

I'd also suggest you do profiling to determine where most of the time is spent if you have not already.

> core: Change linked list to other list type
> -------------------------------------------
>
>                 Key: ASTERISK-26450
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-26450
>             Project: Asterisk
>          Issue Type: Improvement
>      Security Level: None
>          Components: Core/General
>            Reporter: Badalian Vyacheslav
>            Assignee: Badalian Vyacheslav
>            Severity: Minor
>
> Plase replace linked list to other list type or change it!
> Linked list have very poor perfomance becouse it can not use vectorizaton optimizations! You try save memory but get poor perfomance and locking issues.
> Variant 1 - You can replace next and prev fileds to INDEX and use Heap and get great perfomance. Also index and PTRs can be Atomic. If it's will be atomic you get LockFree Add, Delete, insert and Replace variant of list changes (Using atomic SWAP)!
> Variant 2 - You can use sorted Heap and if you need insert in middle or other changes simple:
> 1. Create new Heap sized +X
> 2. Make 2 copy with BIG blockes (zones before insert and after insert) - VERY fast operation becouse new Processors can copy 1024 blocks in one Tick using SIMD.
> 3. Insert elem in new Heap
> 4. Change HEAD in HEAD struct to new address
> 5. Delete old Heap
> If you use Head->Heap_addr[X]->Elem in all calls you have last version and non lock.
> This varian also LockFree. Also its have Much less address becose you not have next fileds!
> Small perfomace improvment also may be getted by commiler if use size_t,  uintptr_t and  ptrdiff_t.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list