Allow edgetpu_tachyon_service to call mlock()

Tachyon AIDL service is the new Darwinn runtime v3. It needs mlock capability to support the GenAI effort, allowing file backed large models to be mlocked, satisfying the memory accounting on Android, similar to what we just did for edgetpu_app_service ag/26481028

Bug: 337949682
Test: On-device tested that tachyon service can now lock large memories.
Change-Id: I02e4d87adf8a459e88e35f7b965d65b2840adce5
This commit is contained in:
feiyuchen 2024-05-05 23:09:21 +00:00
parent d4de4ddf90
commit 0ea3b6ccd1

View file

@ -49,3 +49,14 @@ get_prop(edgetpu_tachyon_server, vendor_edgetpu_runtime_prop)
get_prop(edgetpu_tachyon_server, vendor_hetero_runtime_prop) get_prop(edgetpu_tachyon_server, vendor_hetero_runtime_prop)
# Allow Tachyon service to read EdgeTPU CPU scheduler properties # Allow Tachyon service to read EdgeTPU CPU scheduler properties
get_prop(edgetpu_tachyon_server, vendor_edgetpu_cpu_scheduler_prop) get_prop(edgetpu_tachyon_server, vendor_edgetpu_cpu_scheduler_prop)
# Allow mlock without size restriction
allow edgetpu_tachyon_server self:capability ipc_lock;
# Need to effectively read file mapped file when mmap + mlocked.
allow edgetpu_tachyon_server privapp_data_file:file { map read};
# For shell level testing of mlock
userdebug_or_eng(`
allow edgetpu_tachyon_server shell_data_file:file { map read};
')