Messages in this thread | | | Date | Fri, 21 Mar 2014 23:02:49 +0300 | From | Artem Fetishev <> | Subject | Bug 71331 - mlock yields processor to lower priority process |
| |
Hi all,
I am looking at a use-case when a real-time task (B) of higher priority is sometimes preempted by another real-time task (A) of lower priority. Well, B is not really preempted. It calls mlockall() which forces task B to yield the CPU. Under certain conditions, mlockall() calls lru_add_drain_all() which schedules a deferred work and wants the calling task to wait until that work is complete by putting the task into TASK_UNINTERRUPTIBLE state and calling schedule_timeout().
Tasks utilize SCHED_FIFO policy.
See details here: https://bugzilla.kernel.org/show_bug.cgi?id=71331
Besides mlockall, there are other kernel paths which make use of lru_add_drain_all() and schedule_timeout(), so I guess there are bunch of other syscalls which may lead to the above use-case.
So the question is: is above use-case an expected behavior of real-time tasks or is it a bug in mlockall (i.e. it should not interrupt a real-time process)?
Thanks, -Artem
| |