input: Adjust priority

* Bring into the desired group to get the best result.

Change-Id: I3bd031074cd7006994736b4c22d0294b6012f662
This commit is contained in:
Steve Kondik 2015-09-20 04:20:21 -07:00
parent 80216f6442
commit ccf7c200ce
4 changed files with 14 additions and 2 deletions

View File

@ -21,6 +21,7 @@
#include "InputManager.h"
#include <cutils/log.h>
#include <cutils/iosched_policy.h>
namespace android {
@ -51,13 +52,15 @@ void InputManager::initialize() {
}
status_t InputManager::start() {
status_t result = mDispatcherThread->run("InputDispatcher", PRIORITY_URGENT_DISPLAY);
status_t result = mDispatcherThread->run("InputDispatcher",
PRIORITY_URGENT_DISPLAY + PRIORITY_MORE_FAVORABLE);
if (result) {
ALOGE("Could not start InputDispatcher thread due to error %d.", result);
return result;
}
result = mReaderThread->run("InputReader", PRIORITY_URGENT_DISPLAY);
result = mReaderThread->run("InputReader",
PRIORITY_URGENT_DISPLAY + PRIORITY_MORE_FAVORABLE);
if (result) {
ALOGE("Could not start InputReader thread due to error %d.", result);
@ -65,6 +68,9 @@ status_t InputManager::start() {
return result;
}
android_set_rt_ioprio(mDispatcherThread->getTid(), 1);
android_set_rt_ioprio(mReaderThread->getTid(), 1);
return OK;
}

View File

@ -21,6 +21,7 @@
#include <math.h>
#include <cutils/iosched_policy.h>
#include <cutils/log.h>
#include <ui/Fence.h>
@ -292,6 +293,7 @@ DispSync::DispSync() :
mThread(new DispSyncThread()) {
mThread->run("DispSync", PRIORITY_URGENT_DISPLAY + PRIORITY_MORE_FAVORABLE);
android_set_rt_ioprio(mThread->getTid(), 1);
reset();
beginResync();

View File

@ -20,6 +20,7 @@
#include <sys/types.h>
#include <cutils/compiler.h>
#include <cutils/iosched_policy.h>
#include <gui/BitTube.h>
#include <gui/IDisplayEventConnection.h>
@ -91,6 +92,7 @@ void EventThread::sendVsyncHintOnLocked() {
void EventThread::onFirstRef() {
run("EventThread", PRIORITY_URGENT_DISPLAY + PRIORITY_MORE_FAVORABLE);
android_set_rt_ioprio(getTid(), 1);
}
sp<EventThread::Connection> EventThread::createEventConnection() const {

View File

@ -27,6 +27,7 @@
#include <EGL/egl.h>
#include <cutils/log.h>
#include <cutils/iosched_policy.h>
#include <cutils/properties.h>
#include <binder/IPCThreadState.h>
@ -512,6 +513,7 @@ void SurfaceFlinger::init() {
mEventControlThread = new EventControlThread(this);
mEventControlThread->run("EventControl", PRIORITY_URGENT_DISPLAY);
android_set_rt_ioprio(mEventControlThread->getTid(), 1);
// set a fake vsync period if there is no HWComposer
if (mHwc->initCheck() != NO_ERROR) {