ion: Use a freezable unbound workqueue for the memory prefetch work items
The prefetch work items currently use the system unbounded
workqueue for prefetching/draining memory for a secure VMID. The
execution of either operation can overlap with system suspend and
can block the later phases of the system suspend flow (e.g. waiting
for all available CPUs to go idle) if these operations take a long
amount of time.
Since the prefetch and drain operations involve manipulating the
S2 page tables and can take a long time based on the amount of memory
that is being hyp assigned, use a freezable unbound workqueue. Using
a freezable workqueue allows for outstanding prefetch works to be
processed at the beginning of the system suspend flow, when workqueues
are being frozen, and subsequent prefetch works are processed after
system resume, when workqueues are thawed. This prevents blocking
the later phases of system suspend, where CPUs should quickly
go to idle.
Change-Id: Iedcee6a565b5c871ceb7173c2b48ec3136aa44e1
Signed-off-by:
Isaac J. Manjarres <isaacm@codeaurora.org>
Loading
Please register or sign in to comment