• reveman's avatar
    base: Allow renderer thread priorities to be changed. · 7b97c324
    reveman authored
    This provides a mechanism for a renderer to change the priority of
    its threads and as a result also the cpuset they are assigned to.
    
    A ChildProcessHost IPC message from the renderer is used to request
    a thread priority change and have the browser process identify the
    renderer thread that is requesting a priority change by checking all
    its threads to find a thread with NSpid field in
    /proc/[pid]/task/[thread_id]/status that matches the namespace tid
    from the renderer.
    
    This is currently limited to Linux and ChromeOS but follow up work
    will investigate the possibility and benefits of doing the same on
    other platforms.
    
    Note: Thread priorities in the renderer are already adjusted in a
    similar way on Android as the sandbox is not strict enough to
    prevent this on Android today.
    
    BUG=chrome-os-partner:56550
    TEST=
    
    Review-Url: https://codereview.chromium.org/2334533002
    Cr-Commit-Position: refs/heads/master@{#419649}
    7b97c324
linux_util.h 1.65 KB