From: Thomas Gleixner <tglx@linutronix.de>
To: Mike Galbraith <efault@gmx.de>
Cc: Sankara Muthukrishnan <sankara.m@gmail.com>,
linux-rt-users <linux-rt-users@vger.kernel.org>,
Steven Rostedt <rostedt@goodmis.org>
Subject: Re: timerfd functions hang on both x86 and ARM with RT patch and RT scheduling policies
Date: Wed, 25 Jan 2012 11:11:01 +0100 (CET) [thread overview]
Message-ID: <alpine.LFD.2.02.1201251110190.2716@ionos> (raw)
In-Reply-To: <1327478618.6973.2.camel@marge.simson.net>
On Wed, 25 Jan 2012, Mike Galbraith wrote:
> On Tue, 2012-01-24 at 10:04 -0600, Sankara Muthukrishnan wrote:
> spin_unlock_irq(&ctx->wqh.lock);
> +#ifndef CONFIG_PREEMPT_RT_BASE
Bah.
> cpu_relax();
> +#else
> + /*
> + * Current may be an RT task with priority high enough
> + * to prevent the thread currently _wanting_ to execute
> + * the timer callback function from receiving the CPU.
> + */
> + usleep_range(1, 10);
Even more bah.
> +#endif
> }
Index: linux-3.2/fs/timerfd.c
===================================================================
--- linux-3.2.orig/fs/timerfd.c
+++ linux-3.2/fs/timerfd.c
@@ -313,7 +313,7 @@ SYSCALL_DEFINE4(timerfd_settime, int, uf
if (hrtimer_try_to_cancel(&ctx->tmr) >= 0)
break;
spin_unlock_irq(&ctx->wqh.lock);
- cpu_relax();
+ hrtimer_wait_for_timer(&ctx->tmr);
}
/*
next prev parent reply other threads:[~2012-01-25 10:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAFQPvXdTb-=oo8OC6MAa++X6u4ZoWM2XXmKog-WK6DPookJyvg@mail.gmail.com>
2012-01-24 16:04 ` timerfd functions hang on both x86 and ARM with RT patch and RT scheduling policies Sankara Muthukrishnan
2012-01-25 8:03 ` Mike Galbraith
2012-01-25 10:11 ` Thomas Gleixner [this message]
2012-01-25 10:24 ` Mike Galbraith
2012-01-26 0:22 ` Sankara Muthukrishnan
2012-01-26 2:01 ` Mike Galbraith
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=alpine.LFD.2.02.1201251110190.2716@ionos \
--to=tglx@linutronix.de \
--cc=efault@gmx.de \
--cc=linux-rt-users@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=sankara.m@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).