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 15:03:50 +0100	[thread overview]
Message-ID: <6d09081c1003240703o19ad3dffx20abae9d15e2d0b@mail.gmail.com> (raw)
In-Reply-To: <6d09081c1003240637w28ee6861tfcef4c7876ef3e40@mail.gmail.com>

Hi,

On Wed, Mar 24, 2010 at 2:37 PM, Pradyumna Sampath <pradysam@gmail.com> wrote:
> 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 ?

Ok, I just moved the HZ value from 250 to 1000 and the accuracy has
improved significantly from 5-7 to 1-2 miliseconds. But IMHO, we
should still change schedule_timeout to schedule_hrtimeout for better
accuracy on the timeout because in many cases 1-2 miliseconds is just
not good enough.

I will try to push out a patch for this later today.

regards
/prady

-- 
http://www.prady.in

  parent reply	other threads:[~2010-03-24 14:03 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
2010-03-24 13:45     ` Sujit K M
2010-03-24 13:47       ` Pradyumna Sampath
2010-03-24 14:03     ` Pradyumna Sampath [this message]
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=6d09081c1003240703o19ad3dffx20abae9d15e2d0b@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.