All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pradyumna Sampath <pradysam@gmail.com>
To: "M. Koehrer" <mathias_koehrer@arcor.de>
Cc: linux-rt-users@vger.kernel.org, rachana.rao@in.abb.com
Subject: Re: mq_timedrecieve timeout accuracy
Date: Wed, 24 Mar 2010 14:37:23 +0100	[thread overview]
Message-ID: <6d09081c1003240637w28ee6861tfcef4c7876ef3e40@mail.gmail.com> (raw)
In-Reply-To: <8226231.1269436934345.JavaMail.ngmail@webmail10.arcor-online.net>

Hi,

On Wed, Mar 24, 2010 at 2:22 PM, M. Koehrer <mathias_koehrer@arcor.de> wrote:
> Does it help to run the posix threads with realtime priority by calling
> pthread_setschedparam() with SCHED_FIFO and a suitable priority?
> As fas as I understand your code, the threads run with standard (non realtime
> priority).

Yes. I tried this with a chrt -f 99. But I still end up getting those
large deviations.

John, mq_timedrecieve takes abstime. Isnt it supposed to be
CLOCK_REALTIME ? Anyway, I tried with MONOTONIC .. mq_timedrecieve
doesnt block on that.

I was just looking at some code in the kernel. linux/ipc/mqueue.c
+442. This line says:

time = schedule_timeout(timeout);

Maybe this is why produces a timeout that is inaccurate. Shouldnt it
be schedule_hrtimeout ?

regards
/prady

--
http://www.prady.in

  reply	other threads:[~2010-03-24 13:37 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-24 12:27 mq_timedrecieve timeout accuracy Pradyumna Sampath
2010-03-24 13:12 ` John Kacur
2010-03-24 13:21 ` Sujit K M
2010-03-24 13:22 ` M. Koehrer
2010-03-24 13:37   ` Pradyumna Sampath [this message]
2010-03-24 13:45     ` Sujit K M
2010-03-24 13:47       ` Pradyumna Sampath
2010-03-24 14:03     ` Pradyumna Sampath
2010-03-24 15:46       ` [PATCH] " Pradyumna Sampath
2010-03-29 15:08         ` [PATCH] " Carsten Emde
2010-03-30  7:41           ` Pradyumna Sampath

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=6d09081c1003240637w28ee6861tfcef4c7876ef3e40@mail.gmail.com \
    --to=pradysam@gmail.com \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=mathias_koehrer@arcor.de \
    --cc=rachana.rao@in.abb.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.