[asterisk-bugs] [JIRA] (ASTERISK-26450) Change linkedlist to other list type
Joshua Colp (JIRA)
noreply at issues.asterisk.org
Sun Oct 9 10:39: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
Status: Waiting for Feedback (was: Triage)
Do you plan on providing a patch and performance data for this? If not this would be considered a feature request. You can try to elicit some interest on the asterisk-dev mailing list from others to look into it.
> Change linkedlist to other list type
> ------------------------------------
>
> Key: ASTERISK-26450
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-26450
> Project: Asterisk
> Issue Type: Improvement
> Security Level: None
> Reporter: Badalian Vyacheslav
> Assignee: Badalian Vyacheslav
> Severity: Critical
>
> 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