[Webkit-unassigned] [Bug 195439] [PlayStation] Increase the default pthread stack size

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Apr 19 08:39:20 PDT 2024


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

Ahmad Saleem <ahmad.saleem792 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ahmad.saleem792 at gmail.com,
                   |                            |Hironori.Fujii at sony.com

--- Comment #7 from Ahmad Saleem <ahmad.saleem792 at gmail.com> ---
Current code: https://searchfox.org/wubkat/rev/f8504f25d2ccc6a64957e53ab8c4e42885007fb0/Source/WTF/wtf/posix/ThreadingPOSIX.cpp#314

bool Thread::establishHandle(NewThreadContext* context, std::optional<size_t> stackSize, QOS qos, SchedulingPolicy schedulingPolicy)
{
    pthread_t threadHandle;
    pthread_attr_t attr;
    pthread_attr_init(&attr);
#if HAVE(QOS_CLASSES)
    pthread_attr_set_qos_class_np(&attr, dispatchQOSClass(qos), 0);
#endif
#if HAVE(SCHEDULING_POLICIES)
    pthread_attr_setschedpolicy(&attr, schedPolicy(schedulingPolicy));
#endif
    if (stackSize)
        pthread_attr_setstacksize(&attr, stackSize.value());
    int error = pthread_create(&threadHandle, &attr, wtfThreadEntryPoint, context);
    pthread_attr_destroy(&attr);
    if (error) {
        LOG_ERROR("Failed to create pthread at entry point %p with context %p", wtfThreadEntryPoint, context);
        return false;
    }

#if OS(LINUX)
    int policy = schedPolicy(qos, schedulingPolicy);
    if (policy == SCHED_RR)
        RealTimeThreads::singleton().registerThread(*this);
    else {
        struct sched_param param = { };
        error = pthread_setschedparam(threadHandle, policy | SCHED_RESET_ON_FORK, &param);
        if (error)
            LOG_ERROR("Failed to set sched policy %d for thread %ld: %s", policy, threadHandle, safeStrerror(error).data());
    }
#else
#if !HAVE(QOS_CLASSES)
    UNUSED_PARAM(qos);
#endif
#if !HAVE(SCHEDULING_POLICIES)
    UNUSED_PARAM(schedulingPolicy);
#endif
#endif

    establishPlatformSpecificHandle(threadHandle);
    return true;
}

___

We don't seem to have anything specific for 'Playstation' platform like this patch was modifying:

#if PLATFORM(PLAYSTATION)

and searching via bug ID - '195439' and didn't see that this landed.

CCing - Don & Fuji to check, if this is needed or we can close this.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20240419/958aea49/attachment.htm>


More information about the webkit-unassigned mailing list