Snap for 4565898 from 207a211804a60cb46d7ee9785c5055968e609188 to pi-release
Change-Id: Id6472866aa17835af1d73e04ce4c448f4f475e00
This commit is contained in:
commit
6016d24455
11
lmkd.c
11
lmkd.c
|
|
@ -1112,7 +1112,16 @@ int main(int argc __unused, char **argv __unused) {
|
||||||
kill_timeout_ms =
|
kill_timeout_ms =
|
||||||
(unsigned long)property_get_int32("ro.lmk.kill_timeout_ms", 0);
|
(unsigned long)property_get_int32("ro.lmk.kill_timeout_ms", 0);
|
||||||
|
|
||||||
if (mlockall(MCL_CURRENT | MCL_FUTURE))
|
// MCL_ONFAULT pins pages as they fault instead of loading
|
||||||
|
// everything immediately all at once. (Which would be bad,
|
||||||
|
// because as of this writing, we have a lot of mapped pages we
|
||||||
|
// never use.) Old kernels will see MCL_ONFAULT and fail with
|
||||||
|
// EINVAL; we ignore this failure.
|
||||||
|
//
|
||||||
|
// N.B. read the man page for mlockall. MCL_CURRENT | MCL_ONFAULT
|
||||||
|
// pins ⊆ MCL_CURRENT, converging to just MCL_CURRENT as we fault
|
||||||
|
// in pages.
|
||||||
|
if (mlockall(MCL_CURRENT | MCL_FUTURE | MCL_ONFAULT) && errno != EINVAL)
|
||||||
ALOGW("mlockall failed: errno=%d", errno);
|
ALOGW("mlockall failed: errno=%d", errno);
|
||||||
|
|
||||||
sched_setscheduler(0, SCHED_FIFO, ¶m);
|
sched_setscheduler(0, SCHED_FIFO, ¶m);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue