ANDROID: escalate kthread nice for Trusty
Trusty runs only when the Linux driver makes an SMC call into it;
previously this was at a constant priority regardless of the priority
of work running on the Trusty side.
This patch escalates the priority via the nice value of the kthread.
There are a few entry points:
1) All interrupts (including IPI) elevate the kthread that will run
the nop work
2) Trusty can return to Linux when there is more work at a different
priority level so that Linux can adjust and call back into Trusty
Note that 'use_high_wq' switch now overrides the 2nd case above to
always run at elevated priority. When this flag is set all Trusty work
will run at elevated priority.
Additionally, there is a new sysfs switch 'override_high_prio_nop' that
allows for benchmarking the new elevated priority used for the 1st case
above.
Bug: 260619596
Signed-off-by: Brandon Anderson <bander9289@gmail.com>
Change-Id: I113e3a09155f3f79c384a557557638f0d909d21f
5 files changed