linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Bug 71331 - mlock yields processor to lower priority process
@ 2014-03-21 20:02 Artem Fetishev
  2014-03-21  9:23 ` Mike Galbraith
  0 siblings, 1 reply; 15+ messages in thread
From: Artem Fetishev @ 2014-03-21 20:02 UTC (permalink / raw)
  To: peterz, jmdavis, kosaki.motohiro; +Cc: linux-kernel

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

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2014-03-27 11:38 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-21 20:02 Bug 71331 - mlock yields processor to lower priority process Artem Fetishev
2014-03-21  9:23 ` Mike Galbraith
2014-03-21 12:18   ` jimmie.davis
2014-03-21 13:14     ` Mike Galbraith
2014-03-21 14:34       ` jimmie.davis
2014-03-21 14:54         ` Motohiro Kosaki
2014-03-21 13:35     ` Oliver Neukum
2014-03-21 14:01       ` jimmie.davis
2014-03-21 14:41         ` Mike Galbraith
2014-03-21 14:50           ` jimmie.davis
2014-03-27  0:39             ` Andy Lutomirski
2014-03-27  4:20               ` jimmie.davis
2014-03-27  5:35                 ` Mike Galbraith
2014-03-27  6:02             ` Robert Hancock
2014-03-27 11:37               ` jimmie.davis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).