Skip to content

Conversation

@jasp00
Copy link
Member

@jasp00 jasp00 commented Jul 3, 2016

This should fix #2886.

@jasp00
Copy link
Member Author

jasp00 commented Jul 3, 2016

Qt5 build fixed.

e->next = m_first;
#endif
}
while( !m_first.testAndSetOrdered( e->next, e ) );

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a busy-wait... is it likely to cause a performance problem, or can you use some kind of blocking thing here?

Copy link

@DestyNova DestyNova Jul 5, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, upon reading a little bit about lockless lists, it seems that the while condition is much more likely to succeed than fail (because, of course, no lock is being held). So this should be fine. 👍

@mamins1376
Copy link
Contributor

Hanging bug fixed with your patch but cpu usage is still high. the interesting part is that with or without your fix, a QThread makes system load average go up to 9!!!
I will try debugging with gdb(or valgrind) and do some experiments to find the problem.

@mamins1376
Copy link
Contributor

mamins1376 commented Jul 3, 2016

performance problem introduced in e55ec80.

@jasp00
Copy link
Member Author

jasp00 commented Jul 6, 2016

The high CPU usage is fixed in #2893.

@jasp00 jasp00 merged commit c2a406e into LMMS:master Jul 6, 2016
@jasp00 jasp00 deleted the worker-lock branch July 6, 2016 15:18
sdasda7777 pushed a commit to sdasda7777/lmms that referenced this pull request Jun 28, 2022
Added LocklessList and use it for new play handles
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants