From: Ingo Molnar <mingo@elte.hu>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Andrew Morton <akpm@linux-foundation.org>,
Sripathi Kodi <sripathik@in.ibm.com>,
Gregory Haskins <ghaskins@novell.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: Re: [PATCH] balance RT task resched only on runqueue
Date: Wed, 5 Mar 2008 16:24:50 +0100 [thread overview]
Message-ID: <20080305152450.GA19300@elte.hu> (raw)
In-Reply-To: <1204728101.5241.12.camel@localhost.localdomain>
* Steven Rostedt <rostedt@goodmis.org> wrote:
> In the RT kernel we discovered a place that can reschedule a task
> without holding the tasks runqueue lock. This was caused by the RT
> balancing code that pulls RT tasks to the current run queue and will
> reschedule the current task.
>
> There's a slight chance that the pulling of the RT tasks will release
> the current runqueue's lock and retake it (in the
> double_lock_balance). During this time that the runqueue is released,
> the current task can migrate to another runqueue.
>
> In the prio_changed_rt code, after the pull, if the current task is of
> lesser priority than one of the RT tasks pulled, resched_task is
> called on the current task. If the current task had migrated in that
> small window, resched_task will be called without holding the runqueue
> lock for the runqueue that the task is on.
>
> This race condition also exists in the mainline kernel and this patch
> adds a check to make sure the task hasn't migrated before calling
> resched_task.
thanks Steve, applied.
Ingo
prev parent reply other threads:[~2008-03-05 15:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-05 14:41 Steven Rostedt
2008-03-05 15:00 ` [PATCH -v2] " Steven Rostedt
2008-03-05 15:02 ` Peter Zijlstra
2008-03-05 15:24 ` Ingo Molnar [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080305152450.GA19300@elte.hu \
--to=mingo@elte.hu \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=ghaskins@novell.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=sripathik@in.ibm.com \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome