[Webkit-unassigned] [Bug 160160] [Threaded Compositor] Crashes and deadlocks in single web process mode

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jul 26 06:01:56 PDT 2016


https://bugs.webkit.org/show_bug.cgi?id=160160

Zan Dobersek <zan at falconsigh.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #284569|review?                     |review+
              Flags|                            |

--- Comment #15 from Zan Dobersek <zan at falconsigh.net> ---
Comment on attachment 284569
  --> https://bugs.webkit.org/attachment.cgi?id=284569
Another approach

View in context: https://bugs.webkit.org/attachment.cgi?id=284569&action=review

Looks good, thanks for reiterating on this.

> Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp:94
> +    WorkQueue& getOrCreateWorkQueueForContext(void* context)
> +    {
> +        auto addResult = m_workQueueMap.add(context, nullptr);
> +        if (addResult.isNewEntry) {
> +            if (m_threadCount >= m_threadCountLimit) {
> +                RELEASE_ASSERT(m_sharedWorkQueue);
> +                addResult.iterator->value = m_sharedWorkQueue;
> +            } else {
> +                addResult.iterator->value = WorkQueue::create("org.webkit.ThreadedCompositorWorkQueue");
> +                if (!m_threadCount)
> +                    m_sharedWorkQueue = addResult.iterator->value;
> +                m_threadCount++;
> +            }
> +        }

This is OK for now, and it works for a single-thread limit. But for configurations where more (but not unlimited) threads could be used, one option would be to use a HashSet here and disperse the contexts across the available threads. But that's for the future.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160726/eef9e085/attachment.html>


More information about the webkit-unassigned mailing list