All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wojciech Kromer <krom@dgt-lab.com.pl>
To: "Linuxppc-Embedded (E-mail)" <linuxppc-embedded@lists.linuxppc.org>
Subject: kernel/timer.c
Date: Fri, 11 Apr 2003 15:17:47 +0200	[thread overview]
Message-ID: <3E96C07B.4060809@dgt-lab.com.pl> (raw)


Anyone knows why tehere is a line:

expire = timespec_to_jiffies(&t) + (t.tv_sec || t.tv_nsec);

in kernel/timer.c sys_nanosleep
It adds additional time tick to expire. If anyone uses small HZ value
(eg 100 which is default for arch-ppc) this causes aditional 10ms delay
when calling nanosleep.


For me ( found by Andrzej Kass)
 it should be:

expire = timespec_to_jiffies(&t) + !(t.tv_sec || t.tv_nsec);
   //^^add extra tick if there is
  // nothing in tv_sec and nothing in tv_nsec


--
* * * * * * * * * * * *
* per pedes ad astra! *
* * * * * * * * * * * *    mailto:krom@dgt-lab.com.pl


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

             reply	other threads:[~2003-04-11 13:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-11 13:17 Wojciech Kromer [this message]
2003-04-11 14:38 ` kernel/timer.c Joakim Tjernlund
2003-04-12  7:07   ` kernel/timer.c Wojciech Kromer
2003-04-12  8:29     ` kernel/timer.c Joakim Tjernlund
2003-04-12  9:32       ` kernel/timer.c Wojciech Kromer
2003-04-12 10:35         ` kernel/timer.c Joakim Tjernlund
2003-04-12 12:52           ` kernel/timer.c Joakim Tjernlund
  -- strict thread matches above, loose matches on Subject: below --
2003-04-11 21:25 kernel/timer.c Darin.Johnson

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=3E96C07B.4060809@dgt-lab.com.pl \
    --to=krom@dgt-lab.com.pl \
    --cc=linuxppc-embedded@lists.linuxppc.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 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.