mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
In linux threaded interrupts run with a Realtime priority of 50. This bumps up the priority of bottom-half handlers over regular kernel/User threads even during process context. In the current implementation scheduler thread still runs in normal kernel thread priority. In order to allow a seamless scheduling experience, the worker thread is now created with a Realtime priority of 1. This allows for the Worker thread to work at a priority lower than interrupt handlers but higher than the regular kernel threads. Linux kernel allows setting priority with the help of sched_set_fifo() API. Only two modes are supported i.e. sched_set_fifo() and sched_set_fifo_low(). For more reference, refer to this article https://lwn.net/Articles/818388/. Added an implementation of nvgpu_thread_create_priority() for linux thread using the above two APIs. Jira NVGPU-860 Signed-off-by: Debarshi Dutta <ddutta@nvidia.com> Change-Id: I0a5a611bf0e0a5b9bb51354c6ff0a99e42e76e2f Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2751736 Reviewed-by: Prateek Sethi <prsethi@nvidia.com> Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>